Explore topic-wise MCQs in R Programming.

This section includes 10 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.

___________ remove all the variables from the workspace.

A. rm(x)
B. rm(list=ls())
C. ls()
D. attach(mat)
Answer» C. ls()
2.

_____ list the variables in the workspace.

A. rm(x)
B. rm(list=ls())
C. ls()
D. attach(mat)
Answer» D. attach(mat)
3.

Which of the following is Mac menu command?

A. browse.workspace
B. browse.works
C. browser.workspace
D. a statistical transformation
Answer» B. browse.works
4.

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» B. x[ordersort(x$B),]
5.

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» C. sub(dataset,logical)
6.

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» C. subsetcon(dataset,logical)
7.

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» B. read.CSV(filename,header=TRUE)
8.

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» B. read.csv(filename,header=TRUE,sep= , )
9.

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» D. x1 >- c(norm(n))
10.

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» C. z <- binom(n,size,prob)