Guide R

Find the solution to these exercises without using R.

Exercise 1: Which function will I use to know the installed packages?

Answer

The function installed.packages() or, more specifically, names(installed.packages()[,1]).

Exercise 2: Which function will I use to know the loaded packages?

Answer

search()

Exercise 3: How can I load the dplyr package?

Answer

library(dplyr)

Exercise 4: Which function will I use to know the objects that I have created?

Answer

ls()

Exercise 5: How can I remove the sdg object?

Answer

rm(sdg)

Exercise 6: Which function will I use to list the files in my working directory?

Answer

dir()

Exercise 7: Which function will I use to list the files in the “Datasets” folder of my working directory?

Answer

dir("Datasets")

Exercise 8: Which function from which package I will use to read CSV documents?

Answer

The function read_csv() from the package readr.

Exercise 9: Which function from which package I will use to read Excel documents?

Answer

The function read_xlsx() or the function read_xls() from the package readxl.

Next