R Data Frame
An R Data Frame is a list of variables of the same number of rows. List of variables are transformed to columns in Data Frame. And respective values in each of these columns together form rows.
In this tutorial, we will see a basic example of an R Data Frame, and the list of tutorials covering different scenarios of Data Frame.
The following is an example for R Data Frame.
c1, c2, c3 are the columns. 1, 2, 3 and 4 are the rows.
And we have used following R script to generate the above Data Frame.
df <- data.frame("c1" = c(41, 42, 43, 44), "c2" = c(45, 46, 47, 48), "c3" = c(49, 50, 51, 52))
data.frame() function creates a Data Frame.
R Data Frame Tutorials
Create Data Frame
Read Elements / Rows / Columns
Rows / Columns
- R – Get Number of Rows in Data Frame
- R – Get Number of Columns in Data Frame
- R – Add Row to Data Frame
- R – Add Column to Data Frame
- R – Remove Row(s) in Data Frame
- R – Delete Duplicate Rows in Data Frame
- R – Remove NA Rows in Data Frame
- R – Delete Column(s) in Data Frame
- R – Reset Row Numbers of Data Frame
- R – Replace NA with 0 in Data Frame
- R – Rename Column(s) of Data Frame
Two or More Data Frames
Import / Export
In this R Tutorial, we learned what a Data Frame is, in R language, and listed out different tutorials on R Data Frames.