Function in R to get the number of observations in a data frame
Answers
Answered by
1
Answer:
The function str() shows you the structure of your data set. For a data frame it tells you: The total number of observations (e.g. 32 car types) The total number of variables (e.g. 11 car features) A full list of the variables names (e.g. mpg , cyl ... )
Answered by
0
Function in R to get the number of observations in a data frame:
Explanation:
- The str() function displays the structure of your data set. It tells you the following about a data frame:
- The number of observations in total (e.g. 32 car types)
- The number of variables in total (e.g. 11 car features)
- The names of all the variables are listed below (e.g. mpg , cyl ... )
- A data frame is a table or a two-dimensional array-like structure
- in which each column has the values of a single variable and each row holds one set of values from each column.
Similar questions