data("ToothGrowth")
?ToothGrowth
str(ToothGrowth)
## 'data.frame':    60 obs. of  3 variables:
##  $ len : num  4.2 11.5 7.3 5.8 6.4 10 11.2 11.2 5.2 7 ...
##  $ supp: Factor w/ 2 levels "OJ","VC": 2 2 2 2 2 2 2 2 2 2 ...
##  $ dose: num  0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 ...

1) What do the rows of this dataset represent?

The observations are guinea pigs.

2) What do the columns of this dataset represent? Indicate whether each variable in the study is numerical or categorical. If numerical, identify as continuous or discrete. If categorical, indicate if the variable is ordinal.

len: Length of tooth (numeric - continuous)
supp: Supplement of vitamin c or orange juice (categorical, nominal)
dose: Amount of vitmain c (numeric - discrete )

3) What are the response and explanatory variables in this study?

response: Tooth length (len)
explanatory variables: 
1) supp: vitamin c or oj
2) dose: level of amount of supp

4) Describe how you might assign guinea pigs to treatments.

I would randomly assign gp to supplements and then within the supplement groups randomly assign gp to dose levels. 

* blocking for extra credit....

5) Create a boxplot. Use the following code.

## Here is some pseudo code to help
## i.e. this will not run
boxplot(RESPONSE~EXPLANATORY, data=DATA_SET, xlab="EXPLANATORY",
ylab="RESPONSE")
### variable assignment
resp<-ToothGrowth$len
expl_1<-ToothGrowth$dose
expl_2<-ToothGrowth$supp

boxplot(resp~expl_1)

boxplot(resp~expl_2)

### relative
boxplot(len~dose, data=ToothGrowth)

library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.3     ✔ readr     2.1.4
## ✔ forcats   1.0.0     ✔ stringr   1.5.0
## ✔ ggplot2   3.4.3     ✔ tibble    3.2.1
## ✔ lubridate 1.9.2     ✔ tidyr     1.3.0
## ✔ purrr     1.0.2     
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
ggplot(data=ToothGrowth, aes(x=factor(dose), y=len, fill=supp))+
  geom_boxplot()

6) Based on all the parts above, can you help the researcher find evidence to support or refute their hypothesis? Explain.

YOUR ANSWER HERE