GNU R
The GNU R programming language is often paired with posit's RStudio Desktop IDE and a suit of libraries (language packages) known as tidyverse (includes dplyr
and ggplot2
).
You can also find a web interface to Rstudio on rhea (also Remote Access).
Tutorials contains additional resources.
See R Issues for log of debugged problems.
Notes
na.action
When adding module residuals back to a dataframe, you need residuals()
to return the same length as the input data.frame. use lm(na.action=na.exclude)
.
For example,
d <- data.frame(x=c(1:4,NA),y=1:5); m <- lm(x~y,d,na.action=na.exclude); nrow(d); length(m$residuals); length(residuals(m)) [1] 5 [1] 4 [1] 5
This avoids the error
Error in `$<-.data.frame`(`*tmp*`, ... replacement has 237 rows, data has 348