I was going through the Swirl tutorial for my R Programming course and got to the section on data frames. This is a neat pneumonic device for remembering four initial methods to run when encountering a new data set in R. Headstrong dim sum.
- head - retrieve the first 10 rows of the frame; a second argument can be specified if the desired number is different than 10
- str(ong) - prints the structure of the frame including variable type, number of observations (rows), number of variables (columns), names of the columns and their first 10 variable values with respective data types
- dim - get the dimensions (# rows/# columns) of the frame
- sum(mary) - the summary method outputs the min, max, mean, median, and 25th and 75th percentile values for all variables in the data frame
Incidentally, I'm getting dim sum this weekend for the first time with some friends. I'll probably be thinking about this then, too.