This repository has been archived by the owner on Aug 4, 2020. It is now read-only.
tidyr - very important package for data analysis #76
Labels
after-lesson-release
complex
enhancement
future goal
type:discussion
Discussion or feedback about the lesson
It's hard to overstate how important it is to understand what it means for data to be 'tidy'. Tidy data is an important concept if you want to make the most of many other features of R, such as
ggplot2
anddplyr
. An introduction to tidy data and thetidyr
package can be found here.Tidy data is generally not the way that we intuitively think about organizing data. When data is considered 'tidy', it generally follows this pattern:
tidyr
has two functions that improve upon the well knownreshape2
functionscast()
andmelt()
. The analog ofcast()
is calledspread()
and the analog ofmelt()
isgather()
. It also contains an important function calledseparate()
, which takes a given column in R and is able to split it into multiple columns based on a delimiter. This is often necessary when a single data column contains multiple pieces of information, perhaps as a type of ID.Learning the basics of tidy data and the
tidyr
package will greatly benefit our students.The text was updated successfully, but these errors were encountered: