0. The Basics of R: Using R
Making calculations
The following video (created by and shared with us by the Univ. of Texas at Austin) provides a first introduction to the use of RStudio by explaining how you can make calculations. Watch it and repeat all the steps yourself in RStudio along with the video.
Keypoints
You are now familiar with:
- the use of basic mathematical operations in R (like +, *, ^)
- the fact that R is 'case sentitive', for example if you type
Sqrt()
, R will not know what you mean and return an error-message; the correct command starts with a small s:sqrt()
- entering code in the R-script window and sending it to the console
- reading the output in the console-windows (i.e. where to find the output from your commands)
- storing results from calculations in variables, and re-using those variables in new calculations
Unlock full access