We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Firefox.

Creating Tibbles

tibble(___ = ___, 
       ___ = ___, 
View Interactive Version

The creation of tibbles works exactly the same as for data frames. We can use the tibble() function from the tibble package to create a new tabular object.

For example, a tibble containing data from four different people and three columns can be created like this:

  id = c(1, 2, 3, 4),
  name = c("Louisa", "Jonathan", "Luigi", "Rachel"),
  female = c(TRUE, FALSE, FALSE, TRUE)
# A tibble: 4 x 3
     id name     female
  <dbl> <chr>    <lgl> 
1     1 Louisa   TRUE  
2     2 Jonathan FALSE 
3     3 Luigi    FALSE 
4     4 Rachel   TRUE