Data Science Desktop Survival Guide
by Graham Williams |
|||||
Data Frame |
# Display the table structure of the ingested dataset.
ds[1:10,1:6] %>% print.data.frame()
Alternatively we might sample 10 random observations (dplyr::sample_n()) of 5 random variables (dplyr::select()): |
# Display a random selection of observations and variables.
ds %>% sample_n(10) %>% select(sample(1:ncol(ds), 5)) %>% print.data.frame()
This tabular form (i.e., it has rows and columns) is common for data science. |