More tibble tweaks
This commit is contained in:
parent
672acd61aa
commit
cd0e40ff53
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
Throughout this book we work with "tibbles" instead of R's traditional data frame. Tibbles _are_ data frames, but they tweak some older behaviours to make life a littler easier. R is an old language, and some things that were useful 10 or 20 years ago now get in your way. It's difficult to change base R without breaking existing code, so most innovation occurs in packages. Here we will describe the __tibble__ package, which provides opinionated data frames that make working in the tidyverse a little easier.
|
Throughout this book we work with "tibbles" instead of R's traditional data.frame. Tibbles _are_ data frames, but they tweak some older behaviours to make life a littler easier. R is an old language, and some things that were useful 10 or 20 years ago now get in your way. It's difficult to change base R without breaking existing code, so most innovation occurs in packages. Here we will describe the __tibble__ package, which provides opinionated data frames that make working in the tidyverse a little easier.
|
||||||
|
|
||||||
If this chapter leaves you wanting to learn more about tibbles, you might enjoy `vignette("tibble")`.
|
If this chapter leaves you wanting to learn more about tibbles, you might enjoy `vignette("tibble")`.
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ library(tibble)
|
||||||
|
|
||||||
## Creating tibbles {#tibbles}
|
## Creating tibbles {#tibbles}
|
||||||
|
|
||||||
Almost all of the functions that you'll use in this book produce tibbles as using tibbles is one of the common features of packages in the tidyverse. Most other R packages use regular data frames, so you might want to coerce a data frame to a tibble. You can do that with `as_tibble()`:
|
Almost all of the functions that you'll use in this book produce tibbles as tibbles are one of the unifying features of the tidyverse. Most other R packages use regular data frames, so you might want to coerce a data frame to a tibble. You can do that with `as_tibble()`:
|
||||||
|
|
||||||
```{r}
|
```{r}
|
||||||
as_tibble(iris)
|
as_tibble(iris)
|
||||||
|
|
Loading…
Reference in New Issue