Assignment1 L0-L4
Assignment1 L0-L4
July 2024
Assignment 1
1. Which of the following command is used to get help on the matrix function?
a. "?matrix"
b. ?’matrix’
c. ?matrix
d. matrix?
Solution: The command to get help in R starts with ? followed by the command
name.
a. help.search()
b. start.help()
c. search.help()
d. help.start()
a. demo(graphics)
b. Demo(‘graphics’)
c. demos(graphics)
d. demo(!graphics)
1
4. Which of the function provides the help on finding an example on the function lm?
a. example("lm")
b. ex(lm)
c. show.example(lm)
d. show.example("lm")
Solution: The example for a command in R can be seen by using the command
example(“”).
5. Which of the function provides the help in finding the contents of the library boot?
a. library(help=boot)
b. Library(help="boot")
c. library(help='?boot')
d. library(help=boot?)
a. install.package(xlsx)
b. install.packages("xlsx")
c. install.packages(xlsx)
d. install.package("xlsx")
a. update.package(cluster)
b. update.packages("cluster")
c. update.packages(cluster?)
d. update.package("cluster")
2
Solution: The command in R to update a package is update.packages("")
a. detache(package:lattice, unload=TRUE)
b. detached("package:lattice", unload=TRUE)
c. Detach("package:lattice", unload=FALSE)
d. detach("package:lattice", unload=TRUE)
a. remove.packages(MASS)
b. remove.packages("MASS")
c. remove.packages(MASS?)
d. remove.package("MASS")
10. Which of the following command provides the description of the package
cluster?
a. packagedescription("cluster")
b. packageDescribe("cluster")
c. PackageDescription("cluster")
d. packageDescription("cluster")
3
MOOC Course – Foundations of R Software
Answers of Assignment 1
1. c
2. d
3. a
4. a
5. a
6. b
7. b
8. d
9. b
10. d