Data Types and Variables in R
Data Types and Variables in R - Important Points
1. | Which of the following is not a basic data type in R? |
---|
A. Integer
B. Character
C. Logical
D. Matrix
View Answer Discuss Work SpaceAnswer: option d
Explanation:
Matrix is not a basic data type in R, it is a data structure that can be constructed using basic data types.
2. | What is the default data type of a variable in R? |
---|
A. Numeric
B. Integer
C. Character
D. Logical
View Answer Discuss Work SpaceAnswer: option a
Explanation:
The default data type of a variable in R is numeric.
3. | Which of the following data types can store both numeric and character data? |
---|
A. Vector
B. List
C. Data frame
D. Matrix
View Answer Discuss Work SpaceAnswer: option a
Explanation:
A vector in R can store both numeric and character data.
4. | Which of the following data types is used to represent a sequence of values in R? |
---|
A. Vector
B. List
C. Data frame
D. Array
View Answer Discuss Work SpaceAnswer: option a
Explanation:
A vector in R is used to represent a sequence of values.
5. | Which of the following data types is used to represent a collection of objects of different types in R? |
---|
A. Vector
B. List
C. Data frame
D. Array
View Answer Discuss Work SpaceAnswer: option b
Explanation:
A list in R is used to represent a collection of objects of different types.