Error in custom_check_file_exists()
:
! Could not find file Downloads/IPUMS/ipumsi_00001.dat
Use data_file
to specify the path to the data file associated with the provided ddi
.
It appears that R cannot find the .dat data file. Please follow the steps below to read the data file correctly. You can refer to this ipumsr vignette if you are not sure about any of these steps.
-
Make sure the .dat data file and .xml codebook file are downloaded, the .dat file is decompressed (we recommend 7-zip for Windows users and The Unarchiver for Mac), and are in the same folder.
-
Set your working directory as the folder where these files are located:
setwd(“C:/enter/path/to/folder”)
- Run the following commands, where read_ipums_ddi() references the name of the codebook file in your working directory:
ddi ← read_ipums_ddi(“ipumsi_00005.xml”)
data ← read_ipums_micro(ddi)