Data Types and Variables in R
Data Types and Variables in R - Important Points
11. | Which of the following data types is used to represent not-a-number values in R? |
---|
A. NA
B. NaN
C. Inf
D. #NAME?
View Answer Discuss Work SpaceAnswer: option b
Explanation:
NaN is used in R to represent not-a-number values.
12. | Which of the following data types is used to represent positive infinity in R? |
---|
A. NA
B. NaN
C. Inf
D. #NAME?
View Answer Discuss Work SpaceAnswer: option c
Explanation:
Inf is used in R to represent positive infinity.
13. | Which of the following data types is used to represent negative infinity in R? |
---|
A. NA
B. NaN
C. Inf
D. #NAME?
View Answer Discuss Work SpaceAnswer: option d
Explanation:
-Inf is used in R to represent negative infinity.
14. | What is the maximum length of a vector in R? |
---|
A. 2^31-1
B. 2^32-1
C. 2^63-1
D. There is no maximum length
View Answer Discuss Work SpaceAnswer: option a
Explanation:
The maximum length of a vector in R is 2^31-1.
15. | Which of the following functions is used to check the data type of a variable in R? |
---|
A. typeof()
B. class()
C. str()
D. summary()
View Answer Discuss Work SpaceAnswer: option b
Explanation:
The class() function is used to check the data type of a variable in R.