R Data StructuresLesson 21Free preview
R Arrays
This lesson is part of R · All levels
Summary
This lesson discusses Arrays in R which are multi-dimensional homogeneous data structures (more than 2 dimensions). The array is created by calling the function array() and giving the parameter 'dim' as a dimension vector. The developer will learn how to navigate a multi-dimensional data table like spatiotemporal data.
Key points
- Arrays can accommodate multi-dimensional data (1D, 2D, 3D, to nD)
- Created with the function 'array(data, dim = c(row, column, lapisan))'
- All elements in the array must have a uniform data type.
- Indexing uses square brackets by separating each dimension using a comma
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.