0
0
R Programmingprogramming~10 mins

Package installation (install.packages) in R Programming - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to install the package named "ggplot2".

R Programming
install.packages([1])
Drag options to blanks, or click blank then click option'
A"ggplot2"
Bggplot2
C'ggplot2'
Dpackage
Attempts:
3 left
💡 Hint
Common Mistakes
Not using quotes around the package name.
Using single quotes instead of double quotes (both work in R but here we expect double quotes).
Passing the package name without quotes.
2fill in blank
medium

Complete the code to install the package "dplyr" from CRAN repository.

R Programming
install.packages([1])
Drag options to blanks, or click blank then click option'
Adplyr
B'dplyr'
C"dplyr"
Dpackage
Attempts:
3 left
💡 Hint
Common Mistakes
Passing the package name without quotes.
Using single quotes instead of double quotes (acceptable but here double quotes expected).
3fill in blank
hard

Fix the error in the code to install the package "tidyr".

R Programming
install.packages([1])
Drag options to blanks, or click blank then click option'
A"tidyr"
B'tidyr'
Ctidyr
Dpackage
Attempts:
3 left
💡 Hint
Common Mistakes
Not using quotes around the package name.
Using an undefined variable instead of a string.
4fill in blank
hard

Fill both blanks to install the package "stringr" from the "https://cran.r-project.org" repository.

R Programming
install.packages([1], repos = [2])
Drag options to blanks, or click blank then click option'
A"stringr"
B"https://cran.r-project.org"
Cstringr
Dcran.r-project.org
Attempts:
3 left
💡 Hint
Common Mistakes
Not quoting the repository URL.
Passing package name without quotes.
5fill in blank
hard

Fill all three blanks to install the package "lubridate" quietly without messages.

R Programming
install.packages([1], quiet = [2], dependencies = [3])
Drag options to blanks, or click blank then click option'
A"lubridate"
BTRUE
CFALSE
DNA
Attempts:
3 left
💡 Hint
Common Mistakes
Not quoting the package name.
Using FALSE for quiet instead of TRUE.
Setting dependencies to TRUE instead of FALSE.