Abstract
Even if we only consider tabular data, there are still many different ways to format this data. The packages in the Tidyverse expect that data is represented as so-called “tidy data” (which is where the name Tidyverse comes from). The tidyr package helps you with formatting your data into tidy data.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
- 2.
The gather() and spread() functions transform tibbles in opposite directions in the sense that I have described here, but they are not truly each other’s reverse. The types of values can change depending on the convert argument to gather(), and the order of rows can change.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2019 Thomas Mailund
About this chapter
Cite this chapter
Mailund, T. (2019). Reformatting Tables: tidyr. In: R Data Science Quick Reference. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-4894-2_4
Download citation
DOI: https://doi.org/10.1007/978-1-4842-4894-2_4
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-4893-5
Online ISBN: 978-1-4842-4894-2
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)