June 2017
Beginner to intermediate
576 pages
15h 22m
English
The summary() function is a convenient way to get a snapshot of the distribution of the variables. For numeric variables, it will give you the six important distribution statistics (mean, min, max, first, fifth, and third quartiles). The function will return a lot of information quickly. For a large number of variables, the output of the summary() function can be overwhelming (and not pretty!).
To limit the output, we will use the column numbers obtained previously and run a summary() function that exclude columns 12, 13, 16, 19, 20, and 21:
summary(df[,-c(12,13,16,19,20,21)],maxsum=7)
Or, if you would rather not use the index numbers and prefer using variable names, you can get the same results with the following code, ...