31
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)
Answer & Solution
Answer: Option
B
32
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))
Answer & Solution
Answer: Option
C
33
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=',')
Answer & Solution
Answer: Option
A
34
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)
Answer & Solution
Answer: Option
A
35
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)
Answer & Solution
Answer: Option
B
36
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)
Answer & Solution
Answer: Option
B
37
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),]
Answer & Solution
Answer: Option
A
38
Which of the following is Mac menu command?
A)
browse.workspace
B)
browse.works
C)
browser.workspace
D)
a statistical transformation
Answer & Solution
Answer: Option
A
39
. . . . . . . . list the variables in the workspace.
A)
rm(x)
B)
rm(list=ls())
C)
ls()
D)
attach(mat)
Answer & Solution
Answer: Option
C
40
. . . . . . . . remove all the variables from the workspace.
A)
rm(x)
B)
rm(list=ls())
C)
ls()
D)
attach(mat)
Answer & Solution
Answer: Option
B