---
output:
html_document: default
pdf_document: default
---
### Mastery Check Week 0
Welcome to your first Mastery Check of the Fundamentals of R for Biologists. In order to complete the mastery check, ensure that you have this document open in Rstudio or Rstudio.cloud
Below are a series of sections that relate to questions in the Mastery Check Assignment. The first section is labeled number 1, and corresponds to question number 1. Section 2 corresponds to question 2, and so on and so forth.
Ensure you are answering the questions on the online course! The quiz has no time limit and allows multiple attempts. The explanation section will only unlock once you have submitted a quiz (pass or fail).
Any instructions for each section are provided in that section. Not all questions have a coding component, but are still listed here. Make sure you answer them in the online course!
If you need help knowing how to run, edit, or view the output of any code, make sure you watch the instructions video!
Many questions have hints present on the online course to point you in the right direction. They are there for your benefit. Use them!
**Estimated time of completion: \~ 20 minutes**
#### Question 1
Assuming you have opened this Rmarkdown file in Rstudio or Rstudio.cloud, which pane is it currently residing in?
#### Question 2
If you run the following code, which pane does the output appear within Rstudio?
```{r}
2+2
```
#### Question 3
The following code creates an object called x. Which pane can we view this object alongside any other objects?
```{r}
x <- "frog"
```
#### Question 4
What is the difference between .R scripts and .Rmd RMarkdown files?
#### Question 5
You create a new folder in your documents that you wish to be your working directory. That folder is screenshotted below. Which of the following setwd() functions correctly sets the working directory to that folder? Select all that apply

#### Question 6
When the following plot function is run, which pane can we see the plot?
```{r}
#lets first make some equal length vectors of data
age <- c(1,2,5,4,5,4,2,3,7,6)
size_cm <- c(1.5,2.6,1,1,5,6,2.7,4,9.8,10)
#then we can plot that data using the arguments x and y.
# argument x relates to the data you place on the x axis
# argument y relates to the data you place on the y axis
plot(x = age, y = size_cm)
```
#### Question 7
What are packages and how do we use them in Rstudio?
#### Question 8
What is a function?
#### Question 9
Looking at the following chunk of code that manipulates the value of x step by step. What would the final output of x be if this code is run from start to finish without any edits?
```{r}
x <- 5
x <- x+2
# x <- x*2
x <- x-4
#x <- x+6
```
#### Question 10
In the below chunk, edit both of the commented lines so that they now run. What is our new output of x?
```{r}
x <- 5
x <- x+2
#x <- x*2
x <- x-4
#x <- x+6
```