menu

Data Types and Variables in R


1. Which of the following functions is used to sort a vector in ascending order in R?

sort()

order()

rank()

aggregate()


2. Which of the following data types is used to represent not-a-number values in R?

NA

NaN

Inf

#NAME?


3. Which of the following data types is used to represent a collection of objects of different types in R?

Vector

List

Data frame

Array


4. Which of the following data types is used to represent positive infinity in R?

NA

NaN

Inf

#NAME?


5. Which of the following is not a basic data type in R?

Integer

Character

Logical

Matrix


6. Which of the following data types is used to represent a two-dimensional table in R?

Vector

List

Data frame

Matrix


7. Which of the following data types can store both numeric and character data?

Vector

List

Data frame

Matrix


8. Which of the following data types is used to represent negative infinity in R?

NA

NaN

Inf

#NAME?


9. Which of the following functions is used to merge two data frames in R based on a common column?

merge()

cbind()

rbind()

bind_rows()


10. Which of the following functions is used to remove missing values from a vector in R?

na.omit()

complete.cases()

is.na()

drop_na()