R is self-documenting, meaning all the help you need can be found within the program. This means that there are no excuses for not having help in case your Internet is down!
To get a more interactive version of the help prompt from within your browser, you can use the
This help features allows you to browse through manuals and help pages of packages already installed.
To find help on a particular function, use the
help() function, with the name of the function within the parentheses.
You can also use the question mark symbol as a shortcut.
Without RStudio, the man page will pop up within the console. The controls to navigate this page are simple. Here are the most basic controls to help you get started.
For any special characters, such as the
+ arithmetic function use quotation marks.
> help("+") > ?"+"
Still lost trying to figure out what a function does? That's okay! R also provides examples per function to help you get started.
> example(seq) seq> seq(0, 1, length.out = 11)  0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 seq> seq(stats::rnorm(20)) # effectively 'along'  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 seq> seq(1, 9, by = 2) # matches 'end'  1 3 5 7 9 seq> seq(1, 9, by = pi) # stays below 'end'  1.000000 4.141593 7.283185 ...
Here, we can see examples of the
seq command, which gives sequence variations in numeric sequence.
Let's say you need help solving a system of equations, but are not sure of which function to use. You may search R's available functions based on their descriptions with the
> help.search("solve system of equations") Help files with alias or concept or title matching ‘solve system of equations’ using fuzzy matching: base::solve Solve a System of Equations Type '?PKG::FOO' to inspect entries 'PKG::FOO', or 'TYPE?PKG::FOO' for entries like 'PKG::FOO-TYPE'.
You may also use
?? as a shortcut.
The words before the two colons is the package name (in this case base) that the function comes from.
To run a keyword search, you may use
apropos(). This will look through all functions containing some string.
> apropos("sum") ...  "colSums" "contr.sum"  "cumsum" "format.summaryDefault"  "print.summary.table" "print.summaryDefault"  "rowsum" "rowsum.data.frame"  "rowsum.default" "rowSums"  "sum" "sumAndDouble" ...
If you're looking for a fun and easy entry point into bioinformatics algorithms, this book it just for you! Filled with graphics, and written in a light-hearted and humorous story-telling persona, Bioinformatics Algorithms guides you through the intricacies of the problems faced in biology, and the clever solutions used to solve them.$ Check price
Linux for Beginners doesn't make any assumptions about your background or knowledge of Linux. You need no prior knowledge to benefit from this book. You will be guided step by step using a logical and systematic approach. As new concepts, commands, or jargon are encountered they are explained in plain language, making it easy for anyone to understand.$ Check price