Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tools:r [2023/09/30 20:58] – more text, link tidyverse will | tools:r [2025/07/22 17:01] (current) – [na.action] vid79 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | === GNU R === | + | ====== GNU R ====== |
The [[https:// | The [[https:// | ||
- | You can also find a web interface to [[http:// | + | You can also find a web interface to [[http:// |
[[: | [[: | ||
+ | |||
+ | See [[: | ||
+ | ===== Notes ===== | ||
+ | ==== na.action for residual ==== | ||
+ | When adding module residuals back to a dataframe, you need '' | ||
+ | |||
+ | For example, | ||
+ | |||
+ | < | ||
+ | d <- data.frame(x=c(1: | ||
+ | m <- lm(x~y, | ||
+ | nrow(d); | ||
+ | length(m$residuals); | ||
+ | length(residuals(m)) | ||
+ | </ | ||
+ | |||
+ | |||
+ | This avoids the error | ||
+ | |||
+ | Error in `$< | ||
+ | replacement has 237 rows, data has 348 | ||
+ | |||
+ | |||
+ | ==== MASS:: | ||
+ | If you load MASS after dplyr, '' | ||
+ | |||
+ | > Error in select ... : unused arguments | ||
+ | |||
+ | **solutions** include | ||
+ | - load MASS first | ||
+ | - force select to be '' | ||
+ | - unload MASS if you don't need it | ||
+ | |||
+ | < | ||
+ | # load mass before dplyr to have ' | ||
+ | library(MASS) | ||
+ | library(dplyr) | ||
+ | |||
+ | # force which select (if MASS was already loaded after dplyr and overwrite the function) | ||
+ | select <- dplyr:: | ||
+ | |||
+ | # or unload MASS | ||
+ | detach(" | ||
+ | |||
+ | # check to see | ||
+ | environment(select) # if " | ||
+ | </ | ||
+ | ===== Backlinks ===== | ||
+ | |||
{{backlinks> | {{backlinks> |