Lumenize icon indicating copy to clipboard operation
Lumenize copied to clipboard

R function summary()

Open jmaccherone opened this issue 12 years ago • 1 comments

Returns a breakdown of the data. If the mode is numbers, breaks down into quartiles, if the mode is text, count of the different labels.

If you have the data.frame myFamily:

myFamily myFamilyNames myFamilyAges myFamilyGenders myFamilyWeights 1 Dad 43 Male 188 2 Mom 42 Female 136 3 Sis 12 Female 83 4 Bro 8 Male 61 5 Dog 5 Female 44

Below is the result of summary() function.

summary(myFamily) myFamilyNames myFamilyAges myFamilyGenders myFamilyWeights Bro:1 Min. : 5 Female:3 Min. : 44.0
Dad:1 1st Qu.: 8 Male :2 1st Qu.: 61.0
Dog:1 Median :12 Median : 83.0
Mom:1 Mean :22 Mean :102.4
Sis:1 3rd Qu.:42 3rd Qu.:136.0
Max. :43 Max. :188.0

summary(myFamilyGenders) Length Class Mode 5 character character

jmaccherone avatar May 08 '13 16:05 jmaccherone

Do quartiles first.

lmaccherone avatar Jun 16 '13 23:06 lmaccherone