install.packages(c("dplyr", "lme4", "effectsize", "mediation", "ggplot2",
"psych", "emmeans", "lavaan", "readxl", "reghelper"))
There will be grey blocks in R markdown which is where you write your R Code
Each block of code begins with something that looks like this
```{r exclusions} # the block and it's ouput will appear in full in your pdf
```{r exclusions, include = FALSE} # neither the block nor its output will appear
```{r exclusions, echo = FALSE} #the block will not appear but the output will
The names of all of your blocks must be different in order to allow RMarkdown to print a pdf of your output. In the example above the name is “exclusions”. Never delete the “```{r”
To refer to a variable in a dataset in R, you use the dollar sign. For example, if I want to use a variable called “normViolation_1” that comes from a dataset that I have called dta, then I would write
dta$normViolation_1