1 Lab 1: Introduction to R and RStudio
The course tools for the lab include the software programs R and RStudio.
1.1 Learning Outcomes
Students will be able to:
- Know the difference between R and RStudio, how to run the applications, and which one to use choose
- Identify the various panes and tabs in RStudio
- Use the Console tab to run commands
- Locate the command prompt in the Console tab
- Run a command
- Locate the output after running a command
- Distinguish between a clean prompt and a waiting prompt, and clear a waiting prompt
- Scroll through previous commands with the up and down arrows
- Use the History tab to view previous commands and copy them to the console
- Run commands using arithmetic operators
- Know the basic arithmetic operators
+
,-
,/
,*
,^
- Use them to perform mathematical computations
- Understand the order of operations and manipulate it using parentheses
- Know the basic arithmetic operators
- Use simple functions
- Work with objects
- Use the assignment operator
<-
to assign values to objects - Print objects in the console by running their name
- Print objects in the console using the
print()
function - Locate the Environment tab and identify objects in the environment
- List objects in the environment using the
ls()
function - Remove some or all objects from the environment using the Environment tab
- Remove some or all objects from the environment using the
rm()
function
- Use the assignment operator
- Distinguish between values, objects, and functions