This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
notes:r_cheat_sheet [2026/06/10 20:38] 43.133.3.6 old revision restored (2026/05/30 10:47) |
notes:r_cheat_sheet [2026/06/13 20:30] (current) 216.73.217.75 old revision restored (2026/06/12 20:50) |
||
|---|---|---|---|
| Line 6: | Line 6: | ||
| * '' | * '' | ||
| + | * '' | ||
| + | |||
| * Expressions are evaluated and displayed e.g. 1, 1+1, "Hello World" | * Expressions are evaluated and displayed e.g. 1, 1+1, "Hello World" | ||
| * Booleans are e.g. '' | * Booleans are e.g. '' | ||
| * For variable assignment '' | * For variable assignment '' | ||
| - | * For help on a function use '' | + | * For help on a function use '' |
| * Operations are '' | * Operations are '' | ||
| * '' | * '' | ||
| - | |||
| ===== Vectors ===== | ===== Vectors ===== | ||
| * To create a vector, use the combine command '' | * To create a vector, use the combine command '' | ||
| Line 20: | Line 21: | ||
| * '' | * '' | ||
| * Use a vector as an index to access multiple elements e.g. '' | * Use a vector as an index to access multiple elements e.g. '' | ||
| - | * The '' | + | * The '' |
| names(myseq)=c(' | names(myseq)=c(' | ||
| myseq[' | myseq[' | ||
| * '' | * '' | ||
| * Scalar operations or functions on vectors typically produce other vectors e.g. + - == sin(myseq) | * Scalar operations or functions on vectors typically produce other vectors e.g. + - == sin(myseq) | ||
| + | * '' | ||
| ===== Plotting ===== | ===== Plotting ===== | ||
| - | * '' | + | * '' |
| * '' | * '' | ||
| x=seq[0, | x=seq[0, | ||
| Line 36: | Line 38: | ||
| * '' | * '' | ||
| * '' | * '' | ||
| + | * '' | ||
| ===== Matrices ===== | ===== Matrices ===== | ||
| Line 45: | Line 47: | ||
| * '' | * '' | ||
| + | ===== Data Sets ===== | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * A data frame collects sets of related values (i.e. sets of columns with values in the same order) e.g. '' | ||
| + | * To extract a column, use double-square brackets with the column index or name e.g. '' | ||
| + | * '' | ||
| + | |||
| + | ===== Statistics ===== | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * | ||
| ===== File Handling ===== | ===== File Handling ===== | ||
| * '' | * '' | ||
| * '' | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||