Is it possibel to use ipums data in R?

I don’t have access to other software besides R. I was wondering if there was a command file to use the .DAT file in R, or if there was a way to adjust one of the other files to use in R.

Thanks

While we do not provide support for using IPUMS data in R, it is possible, and some users do use R to analyze IPUMS data. One common approach is to request a CSV file from us (click ‘change’ to the right of ‘data format’ before submitting your extract request). Then, users often import into a database such as SQLite using a package such as sqldf. You can find a general code template for doing this here.

Here’s what I do:

(1) choose “STATA” as “data format” in, for example, https://usa.ipums.org/usa-action/extr…

(2) in R:

library(foreign)

df <- read.dta(“ipums_filename.dta”)

This reads the ipums file into a dataframe named “df”.