Define Vector, Scalar, Array, Matrix, List, Data frame and Table.
Vector: variable with several values of the same type
Scalar: just one value, in R a scalar is a vector of length 1
Array: multidimensional collection of objects of the same type (numbers or characters or factors)
Matrix: special two dimensional array, as it is so often used, it has it’s own command
List: ordered collections of objects not necessarily of the same type
Data frame: a list of vectors (columns) with same length
Table: often representing counted items in R
What is the problem with one dimensional matrices? How can this be avoided?
R converts one-dimensional matrices to vectors. This can be avoided by:
mt[1,,drop=FALSE]
How can data containers be converted into each another?
List number of dimension and types and embed containers for data containers in R.
dimension
types
embed containers
Scalar
0
1
No
Vector
Matrix
2
Array
>=2
Table
1 (Integer)
Lists
>=1
Yes
Data-Frame
Zuletzt geändertvor 2 Monaten