LNCD

Table of Contents

  • LNCD Home
  • Administration
  • Notebooks
  • Journal Club Presentations
  • Publications
  • Current Projects
  • Completed Projects
  • Current Grants
  • Datasets by Project
  • Brain ROIs and Measures
  • ️Tools And Methods
  • Big Data
  • RA Homepage
  • Undergrad Resources
  • Recent Changes
  • Maintenance
  • Site Map
  • Random Page
LNCD
Admin » GNU R

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tools:r [2025/08/11 21:48] – [Notes] willtools:r [2026/07/24 12:43] (current) – [GNU R] will
Line 2: Line 2:
  
  
-The [[https://www.r-project.org/|GNU R programming language]] is often paired with [[https://posit.co/download/rstudio-desktop/|posit's RStudio Desktop IDE]] and a suit of libraries (language packages) known as [[:tools:tidyverse|tidyverse]] (includes ''dplyr'' and ''ggplot2''). +The [[https://www.r-project.org/|GNU R programming language]] is often paired with [[https://posit.co/download/rstudio-desktop/|posit's RStudio Desktop IDE]] and a suit of libraries (language packages) known as [[:tools:tidyverse|tidyverse]] (includes ''dplyr'' and ''ggplot2''). R and RStudio (including Rmarkdown code cells) can use python interleaved with R code. See [[:tools:r:python]].
  
 You can also find a web interface to [[http://rhea.wpic.upmc.edu:8787/|Rstudio on rhea]] (also [[:admin:remoteaccess]]). You can also find a web interface to [[http://rhea.wpic.upmc.edu:8787/|Rstudio on rhea]] (also [[:admin:remoteaccess]]).
Line 8: Line 8:
 [[:tools:tutorials|Tutorials]] contains additional resources. [[:tools:tutorials|Tutorials]] contains additional resources.
  
-See [[:tools:r:issues]] for log of debugged problems.+See 
 +  * [[:tools:r:issues]] for log of debugged problems. 
 +  * [[:tools:r:versions]] for using specific older versions 
 ===== Notes ===== ===== Notes =====
-==== Old Versions ==== 
-On [[admin:it:rhea]], older R versions exist for legacy pipelines and scripts. For example, see ''/opt/ni_tools/R/R-4.4.1/bin'' and packages in ''/opt/ni_tools/Rlib/4.4.1'' (created 2025-08-11 with bump to debian 13/"trixie", R  4.5.1 "Great Square Root"). 
  
-In a shell script, you can update the PATH to force older R. +==== Rstudio Chunk output in console ==== 
-<code=bash> +To use the panel for images instead of seeing them inlined within ''.Rmd'' use the "Chunk output in console" setting, either from the gear dropdown menu or in the yaml front matter.  (From Dan & Victoria) 
-export PATH="/opt/ni_tools/R/R-4.4.1/bin:$PATH" # default to R 4.4.1 + 
-</code>+{{.:pasted:20251121-162226.png}} 
 +{{.:pasted:20251121-162127.png}}
  
-Or call explicitly. +<code=R> 
-<code=bash> +--- 
-/opt/ni_tools/R/R-4.4.1/bin/Rscript -e ' +editor_options: 
-       .libPaths("/opt/ni_tools/Rlib/4.4.1"); +  chunk_output_type: console 
-       print(version$version.string); +---
-       installed.packages()["dplyr",c("Built","Version","LibPath")]+
 </code> </code>
  
-> <code> 
-[1] "R version 4.4.1 (2024-06-14)" 
-                      Built                     Version  
-                    "4.4.1"                     "1.1.4"  
-                    LibPath  
-"/home/ni_tools/Rlib/4.4.1"  
-> </code> 
 ==== na.action for residual ==== ==== na.action for residual ====
 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)''. 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)''.