menu

Data Types and Variables in R


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

NA

NaN

Inf

#NAME?


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

merge()

cbind()

rbind()

bind_rows()


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

Vector

List

Data frame

Matrix


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

NA

NaN

Inf

#NAME?


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

Vector

List

Data frame

Matrix


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

na.omit()

complete.cases()

is.na()

drop_na()


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

NA

NaN

Inf

#NAME?


8. Which of the following functions is used to check the data type of a variable in R?

typeof()

class()

str()

summary()


9. Which of the following data types is used to represent a sequence of values in R?

Vector

List

Data frame

Array


10. What is the default data type of a variable in R?

Numeric

Integer

Character

Logical