Please run RStudio. The window is devided into 4 sections" scripts, console, variables and other (files, plots, packages, help).
You can use console for typing commands for instant execution and accessing the variables. When you perform several operations it is better to write script instead. Lines of script can be run by pressing Ctrl+R.
Now, try to type some simple calculations in the console.
##  4
##  1024
##  4
##  4
In RStudio, you can install packages via “Packages” in the bottom-right section.
Alternatively, the following line should install a package
install.packages("package_name") If this does not work:
Select all repositories in “packages” menu or by calling
If still does not work - use Bioconductor installation:
if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install("package_name")
Do not run: in R older than v.3.5 - use
Function always have
() when it is called. Try to type
There are several ways to set function parameters
log(100, base=10) # full parameter name log(100, b=10) # distinctive part of a parameter name log(100, 10) # no parameter name. The order defines
In R the vast majority of functions is well-annotated. Try some variants.
#is a comment character. The code after
help("sqrt") # help on "sqrt" function ?sqrt # ...the same... ?round ??round # fuzzy search for "round" in all help topics apropos("plot") # propose commands with the word "plot" inside name
There are some demos as well. They are quite old (and majority - ugly), but still we can see them.
demo() # show available demos demo("image") # start demo "image" demo(persp) demo(plotmath)