Commands and Packages- Multiple Choice Questions

Que.Which of the following code create n samples of size “size” with probability prob from the binomial?
a. z <- rinom(n,size,prob)
b. z <- rbinom(n,size,prob)
c. z <- binom(n,size,prob)
d. z >- nom(n,size,prob)
Que.Which of the following code create a n item vector of random normal deviates?
a. x1 <- c(snorm(n))
b. x1 <- c(pnorm(n))
c. x1 <- c(rnorm(n))
d. x1 >- c(norm(n))
Que.Which of the following statement can read csv files?
a. read.table(filename,header=TRUE,sep=’,’)
b. read.csv(filename,header=TRUE,sep=’,’)
c. read.tab(filename,header=TRUE,sep=’,’)
d. read.tab(filename,header=False,sep=’,’)
Que.Which of the following statement read a tab or space delimited file?
a. read.table(filename,header=TRUE)
b. read.CSV(filename,header=TRUE)
c. read.table(filename,header=FALSE)
d. read.tableall(filename,header=TRUE)
Que.Which of the following statement chose those objects meeting a logical criterion?
a. sub(dataset,logical)
b. subset(dataset,logical)
c. subsetcon(dataset,logical)
d. subcon(dataset,logical)
Que.Which of the following statement is another way to get a subset?
a. subsetcon(dataset,logical)
b. data.df[data.df=logical]
c. sub(dataset,logical)
d. subcon(dataset,logical)
Que.Which of the following sort a dataframe by the order of the elements in B?
a. x[rev(order(x$B)),]
b. x[ordersort(x$B),]
c. x[order(x$B),]
d. x[rev(x$B),]
Que.Which of the following is Mac menu command?
a. browse.workspace
b. browse.works
c. browser.workspace
d. a statistical transformation
Que._____ list the variables in the workspace.
a. rm(x)
b. rm(list=ls())
c. ls()
d. attach(mat)
Que.___________ remove all the variables from the workspace.
a. rm(x)
b. rm(list=ls())
c. ls()
d. attach(mat)