Dplyr and TidyR
摘要
This chapter explores the dynamic realm of cultural analytics, highlighting the transformative impact of the tidy data paradigm on data manipulation and analysis. It serves as a practical guide to the “tidyverse,” with a particular focus on two of its cornerstone packages, “dplyr” and “tidyr.” These tools are instrumental in reshaping complex and messy datasets into an orderly structure suitable for analysis. Through an engaging case study centered on American films from the 1950s to the 2010s, the chapter offers a hands-on demonstration of the power and utility of “tidyverse” functions in real-world scenarios. The case study further explores the merging of disparate data sources through sophisticated joining functions provided by “dplyr.” This extends the analytical framework, allowing the reader to combine film attributes with external datasets such as economic indicators.