Generic Summary Command for Data Frames
* Below is a short guide to the results expected for the generic
software commands in R
* Descriptive Summary Commands that can be applied to Dataframes are :
00) mat01
[,1] [,2] [,3] [,4]
[1,] 1 2 3 4
[2,] 5 6 7 8
[3,] 9 10 11 12
[4,] 13 14 15 16
01) max(mat01)
[1] 16
- The largest value in the entire dataframe
02) min(mat01)
[1] 1
- The smallest value in the entire dataframe
03) sum(mat01)
[1] 136
- The sum of all the values in the entire dataframe
04) fivenum(mat01)
[1] 1.0 4.5 8.5 12.5 16.0
- The summary values for the entire dataframe can be found out
by using the "fivenum" command over a dataframe taken in as parameter
05) length(mat01)
[1] 16
- The length of all the columns within a dataframe can be found
by using the length command over a dataframe
06) summary(mat01)
V1 V2 V3 V4
Min. : 1 Min. : 2 Min. : 3 Min. : 4
1st Qu.: 4 1st Qu.: 5 1st Qu.: 6 1st Qu.: 7
Median : 7 Median : 8 Median : 9 Median :10
Mean : 7 Mean : 8 Mean : 9 Mean :10
3rd Qu.: 10 3rd Qu.:11 3rd Qu.:12 3rd Qu.:13
Max. : 13 Max. :14 Max. :15 Max. :16
- It provides the summary for each of the columns present within
a dataframe
* The list of all the summary / descriptive summary commands
that work on a dataframe are listed and short
* One can always extract a single vector from a dataframe and
perform a summary upon the data
* In general , it is better to use more specialised commands
when dealing with the rows and columns of a dataframe
No comments:
Post a Comment