0
0
R Programmingprogramming~10 mins

RStudio IDE setup 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 RStudio IDE package.

R Programming
install.packages([1])
Drag options to blanks, or click blank then click option'
A"RStudio"
B"studio"
C"rstudio"
D"rstudioapi"
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect capitalization in the package name.
Trying to install a package that does not exist.
2fill in blank
medium

Complete the code to load the RStudio API library after installation.

R Programming
library([1])
Drag options to blanks, or click blank then click option'
Astudioapi
Brstudioapi
Crstudio
DRStudio
Attempts:
3 left
💡 Hint
Common Mistakes
Loading a non-existent library like 'studioapi'.
Using incorrect capitalization.
3fill in blank
hard

Fix the error in the code to open a new RStudio project.

R Programming
rstudioapi::[1]("path/to/project")
Drag options to blanks, or click blank then click option'
AOpenProject
Bopenproject
CopenProject
Dopen_proj
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect capitalization in the function name.
Using a non-existent function name.
4fill in blank
hard

Fill both blanks to create a new RStudio project in a specified directory without opening it.

R Programming
rstudioapi::[1](path = "path/to/new_project", open = [2])
Drag options to blanks, or click blank then click option'
AcreateProject
BopenProject
CFALSE
DTRUE
Attempts:
3 left
💡 Hint
Common Mistakes
Using openProject instead of createProject.
Setting open to TRUE when you want to avoid opening.
5fill in blank
hard

Fill all three blanks to check if RStudio is running and get the version.

R Programming
if (rstudioapi::[1]()) {
  version <- rstudioapi::[2]()
  print(version$[3])
}
Drag options to blanks, or click blank then click option'
AisAvailable
BversionInfo
Cversion
DisRunning
Attempts:
3 left
💡 Hint
Common Mistakes
Using a non-existent function like isRunning.
Accessing a wrong element of the version object.