

MCQOPTIONS
Saved Bookmarks
This section includes 9 Mcqs, each offering curated multiple-choice questions to sharpen your R Programming knowledge and support exam preparation. Choose a topic below to get started.
1. |
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» C. titleBar( R language ) | |
2. |
Which of the following function is used for plotting histogram? |
A. | hist() |
B. | histog() |
C. | histg() |
D. | histo() |
Answer» B. histog() | |
3. |
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» D. par(ask=False) | |
4. |
Which of the following may be used for linear regression? |
A. | X %*% Y |
B. | solve(A) |
C. | solve(A,B) |
D. | X $*$ Y |
Answer» D. X $*$ Y | |
5. |
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» B. which.max(x) | |
6. |
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» B. col.max(x) | |
7. |
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» E. | |
8. |
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» D. rowsum(x, group, reorder = TRUE, ) | |
9. |
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» B. max(x, na.rm=TRUE) | |