Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tools:r [2023/09/19 21:09] – will | tools:r [2026/07/24 12:43] (current) – [GNU R] will | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | === GNU R === | + | ====== GNU R ====== |
| - | The [[https:// | ||
| - | See [[: | + | The [[https:// |
| + | |||
| + | You can also find a web interface to [[http:// | ||
| + | |||
| + | [[: | ||
| + | |||
| + | See | ||
| + | * [[: | ||
| + | * [[: | ||
| + | ===== Notes ===== | ||
| + | |||
| + | ==== Rstudio Chunk output in console ==== | ||
| + | To use the panel for images instead of seeing them inlined within '' | ||
| + | |||
| + | {{.: | ||
| + | {{.: | ||
| + | |||
| + | < | ||
| + | --- | ||
| + | editor_options: | ||
| + | chunk_output_type: | ||
| + | --- | ||
| + | </ | ||
| + | |||
| + | ==== 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> | ||