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/07/30 05:33] 157.15.78.7 old revision restored (2026/06/09 10:33) |
notes:r_cheat_sheet [2026/07/31 18:55] (current) 47.254.159.162 old revision restored (2026/06/07 07:45) |
||
|---|---|---|---|
| Line 3: | Line 3: | ||
| [[http:// | [[http:// | ||
| + | ===== Basics ===== | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | * Expressions are evaluated and displayed e.g. 1, 1+1, "Hello World" | ||
| + | * Booleans are e.g. '' | ||
| + | * For variable assignment '' | ||
| + | * For help on a function use '' | ||
| + | * Operations are '' | ||
| + | * '' | ||
| + | ===== Vectors ===== | ||
| + | * To create a vector, use the combine command '' | ||
| + | * Vectors must be of the same type, and are cast if not (e.g. to strings). | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * Use a vector as an index to access multiple elements e.g. '' | ||
| + | * The '' | ||
| + | names(myseq)=c(' | ||
| + | myseq[' | ||
| + | * '' | ||
| + | * Scalar operations or functions on vectors typically produce other vectors e.g. + - == sin(myseq) | ||
| + | * '' | ||
| + | |||
| + | ===== Plotting ===== | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | x=seq[0, | ||
| + | y=sin(x) | ||
| + | plot(x,y) </ | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | ===== Matrices ===== | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | * dim(myseq) can be used to change dimensions of a matrix | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | ===== 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 ===== | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||