Pitfall: Did You Really Mean to Use matrix(nrow, ncol)?
Are you a good R citizen and preallocates your matrices? If you are allocating a numeric matrix in one of the following two ways, then you are doing it the...continue reading.
Are you a good R citizen and preallocates your matrices? If you are allocating a numeric matrix in one of the following two ways, then you are doing it the...continue reading.
The R function capture.output() can be used to “collect” the output of functions such as cat() and print() to strings. For example, > s <- capture.output({ + cat("Hello\nworld!\n") + print(pi)...continue reading.
When processing large data sets in R you often also end up creating large temporary objects. In order to keep the memory footprint small, it is always good to remove...continue reading.
Today it’s 16 years ago and 367,496 messages later since Martin Mächler started the R-help (321,119 msgs), R-devel (45,830 msgs) and R-announce (547 msgs) mailing lists [1] – a great...continue reading.
Sometimes a minor change to your R code can make a big difference in processing time. Here is an example showing that if you’re don’t care about the names attribute...continue reading.
The below code shows how to configure the help.ports option in R such that the built-in R help server always uses the same URL port. Just add it to the...continue reading.
The below code shows how to configure the repos option in R such that install.packages() etc. will locate the packages without having to explicitly specify the repository. Just add it...continue reading.