Which of the following data structures in R can store different types of data?
Answers
Answered by
0
Everything present in R is an object.
R contains six atomic vector kinds which are as follows:
- Characters
- Numerics ( whether decimal or real)
- Integers
- Logical expressions
- Complex numbers
It contains single type of data.
- characters: "a", "swc"
- numerics: 4, 16.5
- integers: 2L (the L ascertains R to save this as an integer)
- Logical expressions: FALSE, TRUE
- Complex numbers: 3+5i (complex numbers with real and imaginary parts)
R provides many functions to examine features of vectors and other objects, for example
- class( ) - what kind of objects are this(high-level)?
- type of( ) - what is the data type of object (low-level)?
- length( ) - What about two dimensional objects and its length?
- attributes( ) - does it contain any meta data?
Similar questions