无法使用read_ipums_ddi将IPUMS数据加载到R中

时间:2018-11-20 00:29:36

标签: r census

我正在尝试使用IPUMS进行最基本的数据导入,但不断出现错误。我已经下载了IPUMS摘录和DDI码本,并且正在尝试使用read_ipums_ddi。使用以下代码,即使我可以清楚地看到目录中的文件,也会出现以下错误。

> setwd("~/")
> library(ipumsr)
> ddi <- read_ipums_ddi("usa_00003.xml")
Error in custom_check_file_exists(ddi_file) : 
  Could not find file named './usa_00003.xml' in current working directory:
  C:/Users/USERNAME/OneDrive/Documents
Do you need to change the directory with `setwd()`?

有人知道为什么会这样或如何避免吗?

0 个答案:

没有答案