NEW
Font size
WorksheetsR - Unit 1
Total questions: 15
Worksheet time: 8mins
What is R primarily used for?
Web development
Statistical computing and graphics
Mobile app programming
Machine hardware control
Which command is used to install packages in R?
install()
new.package()
install.packages()
library.install()
Which function is used to load an installed package in R?
load()
library()
attach()
run()
Which of the following assigns a value to a variable in R?
var = 10
var <- 10
var := 10
var => 10
Which data type holds TRUE/FALSE values in R?
Character
Complex
Logical
Integer
Which function returns the structure of an R object?
type()
structure()
detail()
str()
7. Which statement is used for conditional execution in R?
8. Which loop is used to repeat code a fixed number of times using a sequence?
9. Which loop continues until a condition becomes FALSE?
10. Which operator in R is considered best practice for assignment?
11. Comments in R begin with which symbol?
12. A matrix in R must contain:
13. Which R function creates a vector?
14. Which of the following breaks a running loop in R?
15. Which control statement skips the current iteration and continues to the next?
