We offer here a couple of introductory tutorials on basic R concepts. It serves as background material for our main tutorial series Elementary Statistics with R.
The only hardware requirement for most of the R tutorials is a PC with the latest free open source R software installed. R has extensive documentation and active online community support. It is the perfect environment to get started in statistical computing.
R can be downloaded from one of the mirror sites in http://cran.r-project.org/mirrors.html. You should pick your nearest location.
R offers plenty of options for loading external data, including Excel, Minitab and SPSS files. We have included a tutorial titled Data Import on the subject for the purpose.
After R is started, there is a console awaiting for input. At the prompt (>), you can enter numbers and perform calculations.
We assign values to variables with the assignment operator “=”. Just typing the variable by itself at the prompt will print out the value. We should note that another form of assignment operator “<-” is also in use.
R functions are invoked by its name, then followed by the parenthesis, and zero or more arguments. The following apply the function c to combine three numeric values into a vector.
All text after the pound sign “#” within the same line is considered a comment.
Sometimes we need additional functionality beyond those offered by the core R library. In order to install an extension package, you should invoke the install.packages function at the prompt and follow the instruction.
R provides extensive documentation. For example, entering ?c or help(c) at the prompt gives documentation of the function c in R. Please give it a try.
If you are not sure about the name of the function you are looking for, you can perform a fuzzy search with the apropos function.
Finally, there is an R specific Internet search engine at http://www.rseek.org for more assistance.