Following this assignment students should:
- Have R and Rstudio downloaded
- Be able to access and open Rstudio
- Have an R-Project for the course
- Be able to download packages and load them into your working session
install.packages("tidyverse")
NOTE: Do NOT put
install.packages()
commands in your scripts. Only ever run
them in the console.
Tools
–>
Install Packages
and then entering the package name in the
text box and clicking Install
Make a new script called “lastname_first-assignment.R” and save
it in your homework
folder in your ENVS396
Project.
In your script, type in the following code and make sure it runs correctly:
library(tidyverse)
data("starwars")
starwars %>%
filter(homeworld == "Tatooine") %>%
select(name) %>%
unique()
You should see the following output in your console:
#> # A tibble: 10 × 1
#> name
#> <chr>
#> 1 Luke Skywalker
#> 2 C-3PO
#> 3 Darth Vader
#> 4 Owen Lars
#> 5 Beru Whitesun lars
#> 6 R5-D4
#> 7 Biggs Darklighter
#> 8 Anakin Skywalker
#> 9 Shmi Skywalker
#> 10 Cliegg Lars
For full credit, you must show your instructor that you have accomplished all of the above tasks.