A Short Introduction to R Programming

In R, data structures are referred to as objects. Each object can hold vectors as mentioned above, scalars, matrices, arrays, data frames and lists. Amongst all the objects, the list is the most special. This is because a list can hold any or all data types.

Matrices

Matrices are a single two-dimensional data set. And one can create a matrix using the matrix() function. A matrix contains a vector element and nrow & ncol represents the row and column dimensions of the matrix.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store