51
Which of the following will reverse the order of values in x?
A)
rev(x)
B)
max(x, na.rm=TRUE)
C)
all(x)
D)
x%in%y
Answer & Solution
Answer: Option
A
52
Which of the following finds row sums for each level of a grouping variable?
A)
rowSums (x, na.rm = FALSE, dims = 1)
B)
colMeans(x, na.rm = FALSE, dims = 1)
C)
rowMeans(x, na.rm = FALSE, dims = 1)
D)
rowsum(x, group, reorder = TRUE, ...)
Answer & Solution
Answer: Option
C
53
Which of the following statement applies the function (FUN) to either rows (1) or columns (2) on object X?
A)
apply(x,1,min)
B)
apply(x,2,max)
C)
col.max(x)
D)
apply(X, MARGIN, FUN, ...)
Answer & Solution
Answer: Option
D
54
Which of the following statement finds the maximum for each column?
A)
apply(x,2,max)
B)
col.max(x)
C)
which.min(x)
D)
which.max(x)
Answer & Solution
Answer: Option
A
55
which of the following statement tells the row with the minimum value for every column?
A)
which.min(x)
B)
which.max(x)
C)
z=apply(x,1,which.min)
D)
z=apply(1,1,which.max)
Answer & Solution
Answer: Option
A
56
Which of the following may be used for linear regression?
A)
X %*% Y
B)
solve(A)
C)
solve(A,B)
D)
X $*$ Y
Answer & Solution
Answer: Option
C
57
Which of the following finds row sums for each level of a grouping variable?
A)
as.numeric(x)
B)
rowsum(x, group, reorder = TRUE, ...)
C)
as.order(x)
D)
colSums (x, na.rm = FALSE, dims = 1)
Answer & Solution
Answer: Option
B
58
Which of the following sets the size of the outer margins for the graph?
A)
par(mfrow=c(nrow,mcol))
B)
par(ask=TRUE)
C)
par(omi=c(0,0,1,0) )
D)
par(ask=False)
Answer & Solution
Answer: Option
C
59
Which of the following function is used for plotting histogram?
A)
hist()
B)
histog()
C)
histg()
D)
histo()
Answer & Solution
Answer: Option
A
60
Which of the following will add the title "R language" to the graph?
A)
titleAdd( "R language")
B)
title( "R language")
C)
titleBar( "R language")
D)
var(x, na.rm=TRUE)
Answer & Solution
Answer: Option
B