Cleaning and Preparing Data
摘要
In this chapter, the reader learns the skills necessary to prepare a data set for visualization and analysis. Specifically, this chapter covers cleaning data (changing cases, stripping white space, removing characters, and recoding variables), sorting data sets, merging data sets, and subsetting. Each task is presented both in base R and in tidy. This chapter also discusses the differences and similarities between base and tidy.