Data Science Desktop Survival Guide
by Graham Williams |
|||||
Dataset Head and Tail |
20180721 Datasets can be very large, with many observations (millions) and many variables (thousands). We can't be expected to browse through all of the observations and variables. Instead we might review the contents of the dataset using utils::head() and utils::tail() to consider the top six (by default) and the bottom six observations.
# Review the first few observations.
head(ds) %>% print.data.frame()
|
# Review the last few observations.
tail(ds) %>% print.data.frame()
All the time we are building a picture of the data we are looking at. It is beginning to confirm that location has multiple values whilst date does appear to be a sequence for each location.
|