1 Introduction to R
R is a statistical computing framework widely used by scientists and researchers all over the world. Technically, what we think of as R is made up of different layers that build on each other to make using statistics as easy and powerful as possible.
Learning Objectives
- Learn what R and RStudio are and what they do.
- Learn how to extend the functionality of R.
- Learn basic uses of R.
- Learn how to access online and built-in help with R.
Useful Functions
- Use
install.packages()
to install additional functionality to R. - Use
library()
to load a package and make using its functions easy. Use the
::
operator to use a function without callinglibrary()
.- Use the
+
,-
,*
,/
, and^
operators to perform calculations. - Use the
<-
operator to save data to a variable. - Use
round()
to round values. - Use
c()
to concatenate values into a vector. Use
plot()
,barplot()
, andpie()
to create simple plots.- Use
help()
or the?
operator to access documentation on specific functions. Use the
??
operator to search for functions and documentation.