liveBook · Manning

Tibble

As explained in Statistics Slam Dunk

A tibble is an R-specific modern form of data frame with enhanced printing and data-manipulation behavior.

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

How Statistics Slam Dunk covers it

How deep it goes
Defines printing, data-frame similarities, dplyr outputs, and conversion for legacy compatibility, but does not describe internal implementation.
Examples
Uses NBA draft win shares, grouped year summaries, frequency tallies, and summary-statistics objects such as first_tibble and second_tibble.
What you can do after
Apply tibbles through dplyr pipelines, inspect compact output, and convert them with as.data.frame() when older code requires it.
How it connects
Connects tibbles to data frames, dplyr, pipes, group_by(), summarize(), tally(), and RStudio.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Statistics Slam Dunk. The section links point to the parts of the book it draws on.