0% found this document useful (0 votes)
113 views4 pages

Assignment1 L0-L4

Uploaded by

Smita Agarwal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
113 views4 pages

Assignment1 L0-L4

Uploaded by

Smita Agarwal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

MOOC Course - Foundations of R Software

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.

2. Which of the following is the correct option to provide help in R?

a. help.search()
b. start.help()
c. search.help()
d. help.start()

Solution: The command to get to the help page in R is help.start()

3. Which of the following function provides the demonstration of the package


graphics in R?

a. demo(graphics)
b. Demo(‘graphics’)
c. demos(graphics)
d. demo(!graphics)

Solution: The demonstration in R can be seen by using the command demo().

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?)

Solution: The command in R for help with packages in library is library(help=).

6. Which of the following command installs the package xlsx?

a. install.package(xlsx)
b. install.packages("xlsx")
c. install.packages(xlsx)
d. install.package("xlsx")

Solution: The command in R to install a package is install.packages("")

7. Which of the following command is used to update the package cluster?

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("")

8. Which of the following command detaches the package lattice?

a. detache(package:lattice, unload=TRUE)
b. detached("package:lattice", unload=TRUE)
c. Detach("package:lattice", unload=FALSE)
d. detach("package:lattice", unload=TRUE)

Solution: The command in R to detach a package is


detach("package:packagename", unload=TRUE)

9. Which of the following command removes the package MASS?

a. remove.packages(MASS)
b. remove.packages("MASS")
c. remove.packages(MASS?)
d. remove.package("MASS")

Solution: The command in R to remove a package is remove.packages("")

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")

Solution: The command in R to provide description of a package is


packageDescription("")

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

You might also like