Save up to $499! Grab all Python courses for $49 or all online courses we’ve ever launched for only $169. Only Feb 11-16. Happy Valentine's!
Getting started with tibbles
Creating tibbles
5. Create a tibble by column


Let's find out how to create a tibble from scratch. There are several ways we can do this.

Creating a tibble is similar to creating a new data frame. We just list the columns as vectors of the same length. Let's create a tibble for the fruits we have in our kitchen. It goes like this:

  name = c("apple", "orange", "pear", "grapefruit"),
  quantity = c(3,5,6,2)


Create a similar tibble with the vegetables in our fridge:

  • 5 carrots,
  • 2 cauliflowers, and
  • 3 tomatoes.

Make sure your columns are named following the fruit tibble example – name and quantity.

Stuck? Here's a hint!


  name = c("carrot", "cauliflower", "tomato"),
  quantity = c(5,2,3)