Modifying select off-diagonal items in a matrix

September 25, 2012 | is.R()

This is something I have had the occasion to do, and never remember how, so this is legitimately a reminder to my future self of how to do things with off-diagonal elements of a matrix. Select rows and columns are easy: mat[1:10, ] or mat[, -c(5)], for... [Read more...]

Converting an R object to text, with dput()

September 20, 2012 | is.R()

We’ve already briefly covered making a reproducible example, but I thought I’d go a little more in-depth on the very helpful function dput(). Whenever I am having trouble applying an operation to some R object, and need help, but want to av... [Read more...]


September 16, 2012 | is.R()

Chris and I started this blog as an outlet for the work we were already doing every day: writing code and trying to avoid forgetting how we wrote it. To that end, is an extremely useful resource, and this blog allows us to add a little ... [Read more...]

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)