OranjeStride emblemDataStride Blog Start learning free
Blog / Data Science & AI/ML
Data Science & AI/ML

R: Tibbles vs. Data Frames – What You Need to Know

HRHiemal Rana26 October 2026 · 2 min read

When you start working with data in R, you'll quickly see two main ways to store tabular data: data frames and tibbles. A data frame is R's traditional format for rectangular data. A tibble is a modern take on the data frame, part of the tidyverse, and it's built to be more consistent and user-friendly. Knowing the differences is key for working with data effectively in R, especially as you get into more advanced analysis.

Why use tibbles?

For a long time, R's data.frame objects were powerful but sometimes a bit odd. They'd change strings into factors without asking, print every row of a huge dataset, and had slightly tricky rules for picking out data. The tidyverse project, led by Hadley Wickham, wanted to fix these issues. That's how the tibble package and its tibble data structure came about. Think of a tibble as a modern, opinionated data frame—it's still a data frame at its core, but it acts better.

Let's look at some key differences.

1. How they print

One big difference is how tibbles show up when you print them. Regular data frames will print all rows and all columns. This can be overwhelming and slow if you have a lot of data. Tibbles, though, are made to give you a better view in the console. They only print the first 10 rows and as many columns as fit on your screen. They also show you the column names and their data types. This is super useful when you're just checking out a big dataset.

Let's build a simple data frame and a tibble to see this in action.

# Create a data frame
df <- data.frame(
  id = 1:15,
  name = paste("Item", 1:15),
  value = runif(15, 10, 100),
  category = sample(c("A", "B", "C"), 15, replace = TRUE)
)

# Create a tibble (you need to install and load the 'tibble' package)
# install.packages("tibble")
library(tibble)
tbl <- tibble(
  id = 1:15,
  name = paste("Item", 1:15),
  value = runif(15, 10, 100),
  category = sample(c("A", "B", "C"), 15, replace = TRUE)
)

# Print the data frame
print("Printing data frame:")
df

# Print the tibble
print("Printing tibble:")
tbl

When you run this, you'll see df prints all 15 rows. tbl, however, gives you a neat summary, showing only the first 10 rows and telling you how many more rows and columns are there but not shown. This helps a lot when you quickly check data without filling up your console.

2. Picking out data (Subsetting)

Subsetting means selecting specific parts of your data. Data frames have a few odd things here, especially when you pick out a single column. If you subset a data frame to get one column using df[, "column_name"] or df[[1]], it often turns the result into a simple vector. This is called

Topic inspired by ListenData.