A tibble is an R-specific modern form of data frame. It can be wrangled, used as a data source for visualizations, and passed through analysis workflows. section 2.5.3
Tibbles make analytical results easier to inspect while retaining familiar data-frame behavior:
- Prints only the first 10 rows and the columns that fit onscreen, keeping large results readable. section 2.5.3
- Stores outputs from dplyr workflows such as summarize(), group_by(), and tally(); results display their dimensions and column types. section 2.5.3
- May not work with some base R functions or older code; convert it with as.data.frame() when compatibility is required. section 2.5.3
Summarizing NBA draft data
A pipeline can create a tibble containing summary statistics: draft %>% summarize(MIN = min(WS), LQ = quantile(WS, .25), UQ = quantile(WS, .75), AVG = mean(WS), M = median(WS), MAX = max(WS)) -> first_tibble. Printing it shows one row with the minimum, quartiles, average, median, and maximum career win shares. Grouping first produces a tibble with one average per draft year. section 2.5.3 section 2.5.3
