Site Tools


Hotfix release available: 2026-07-14c "Mort". upgrade now! [57.3] (what's this?)
Hotfix release available: 2026-07-14b "Mort". upgrade now! [57.2] (what's this?)
Hotfix release available: 2026-07-14a "Mort". upgrade now! [57.1] (what's this?)
New release available: 2026-07-14 "Mort". upgrade now! [57] (what's this?)
Hotfix release available: 2025-05-14b "Librarian". upgrade now! [56.2] (what's this?)
Hotfix release available: 2025-05-14a "Librarian". upgrade now! [56.1] (what's this?)
New release available: 2025-05-14 "Librarian". upgrade now! [56] (what's this?)
Hotfix release available: 2024-02-06b "Kaos". upgrade now! [55.2] (what's this?)
Hotfix release available: 2024-02-06a "Kaos". upgrade now! [55.1] (what's this?)
New release available: 2024-02-06 "Kaos". upgrade now! [55] (what's this?)
Hotfix release available: 2023-04-04b "Jack Jackrum". upgrade now! [54.2] (what's this?)
Hotfix release available: 2023-04-04a "Jack Jackrum". upgrade now! [54.1] (what's this?)
New release available: 2023-04-04 "Jack Jackrum". upgrade now! [54] (what's this?)
Hotfix release available: 2022-07-31b "Igor". upgrade now! [53.1] (what's this?)
Hotfix release available: 2022-07-31a "Igor". upgrade now! [53] (what's this?)
New release available: 2022-07-31 "Igor". upgrade now! [52.2] (what's this?)
New release candidate 2 available: rc2022-06-26 "Igor". upgrade now! [52.1] (what's this?)
New release candidate available: 2022-06-26 "Igor". upgrade now! [52] (what's this?)
Hotfix release available: 2020-07-29a "Hogfather". upgrade now! [51.4] (what's this?)
notes:r_cheat_sheet

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
notes:r_cheat_sheet [2026/11/02 15:32]
47.79.201.228 old revision restored (2026/06/22 06:56)
notes:r_cheat_sheet [2026/11/03 05:09] (current)
157.100.198.61 old revision restored (2026/08/03 07:09)
Line 20: Line 20:
   * ''myseq[3]'' to access third element i.e. vectors indexed starting at 1.   * ''myseq[3]'' to access third element i.e. vectors indexed starting at 1.
   * Use a vector as an index to access multiple elements e.g. ''myseq[c(1,3)]''   * Use a vector as an index to access multiple elements e.g. ''myseq[c(1,3)]''
-  * The ''names'' function can be used to assign names to vector elements. Once names are asigned, they can be sed as indices e.g. <code>+  * The ''names'' function can be used to assign names to vector elements. Once names are asigned, they can be used as indices e.g. <code>
 names(myseq)=c('one','two','three') names(myseq)=c('one','two','three')
 myseq['two']</code> myseq['two']</code>
Line 28: Line 28:
 ===== Plotting ===== ===== Plotting =====
  
-  * ''barplot[myseq]'' creates a bar plot of the ''myseq'' vector.+  * ''barplot[myseq]'' creates a bar plot of the ''myseq'' vector. ''abline(h=y)'' plots a horizontal line at height y.
   * ''plot[x,y]'' plots x vs y e.g. <code>   * ''plot[x,y]'' plots x vs y e.g. <code>
 x=seq[0,20,.1] x=seq[0,20,.1]
Line 45: Line 45:
   * ''mymatrix[,2]'' returns entire second column.   * ''mymatrix[,2]'' returns entire second column.
  
 +===== Statistics =====
 +
 +  * ''mean(myvec)'' returns the mean.
 ===== File Handling ===== ===== File Handling =====
  
   * ''list.files()'' to list files in furrent directory   * ''list.files()'' to list files in furrent directory
   * ''source("file.R")'' to load file of code   * ''source("file.R")'' to load file of code
notes/r_cheat_sheet.1793662363.txt.gz · Last modified: 2026/11/02 15:32 by 47.79.201.228