Working with Data Files in R
Alice Paul · 2025
This chapter introduces readers to working with data in R. To start, we need to load our data into R: this requires identifying the type of data file we have (e.g.. csv,. xlsx,. dta,. txt) and finding the appropriate function to load in the data. This creates a data frame object containing the information from the file. After demonstrating how to load in such data, this chapter shows you how to find information about data columns, including finding missing values, summarizing columns, and subsetting or filtering the data. Additionally, we look at how to create new columns through some simple transformations.