5.4 Conclusion

5.4.1 Summary

Both readr and tibble provide various functions for creating data objects called “tibbles” in R. - readr provides functions for reading vectors and data files into tibbles;

  • tibble provides functions for getting tibbles from other data structures.

5.4.2 Resources

Figure 5.1 shows the RStudio cheatsheet on importing and exporting data:

The RStudio cheatsheet on importing and exporting data with the readr package.

Figure 5.1: The RStudio cheatsheet on importing and exporting data with the readr package.

Figure 5.2 shows the back of the cheatsheet shown in Figure 5.1:

Essential tibble commands on the back of the RStudio cheatsheet on Data Import.

Figure 5.2: Essential tibble commands on the back of the RStudio cheatsheet on Data Import.

The fact that both readr and tibble are covered by the same RStudio cheatsheet on Data Import show the close correspondence between both topics.

5.4.3 Preview

The RStudio cheatsheet on Data Import also summarizes commands of a third package tidyr. This package starts with tibbles, but transforms them into different formats. A key concept in this context is the notion of tidy data.

We will study the tidyr package in the context of the dplyr package for data transformation, which is one of the key packages of the tidyverse.