a) names() b) colnames() c) col.names() d) column name cannot be set for a matrix Answer: b Explanation: colnames() is ...
View QuestionWhat is the function used to test objects (returns a logical operator) if they are NaN?
a) as.nan() b) is.na() c) as.na() d) is.nan() Answer: d Explanation: is.nan() is used to test ...
View QuestionWhat is the function used to test objects (returns a logical operator) if they are NA?
a) is.na() b) is.nan() c) as.na() d) as.nan() Answer: a Explanation: is.na() is the function used to test if ...
View QuestionMatrices can be created by row-binding with the help of the following function.
a) rjoin() b) rbind() c) rowbind() d) rbinding() Answer: b Explanation: rbind() is used to create a matrix by ...
View Question
How could be the matrix constructed by using the following R code?
m <- matrix(1:6, nrow = 2, ncol = 3)
How could be the matrix constructed by using the following R code? m <- matrix(1:6, nrow = ...
View QuestionThe dimension attribute is itself an integer vector of length _______
a) 1 b) 2 c) 3 d) 4 Answer: b Explanation: It is itself an integer vector of length ...
View Question
What will be the output of the following R code?
x<- c (“a”,” b”)
as.numeric(x)
What will be the output of the following R code? x<- ...
View QuestionHow do you create an integer suppose 5 in R?
a) 5L b) 5l c) 5i d) 5d Answer: a Explanation: To create an integer L should be added ...
View QuestionWhich one of the following is not a basic datatype?
a) Numeric b) Character c) Data frame d) Integer Answer: c Explanation: Data frame is not the basic data ...
View Question
What is the class defined in the following R code?
y<-c(FALSE,2)
What is the class defined in the following R code? y<-c(FALSE,2) a) Character b) Numeric c) Logical
View Question