如何将此 ABES ASCII/.dat 文件转换为 R 中可用的 CSV 文件?
How can I convert this ABES ASCII/.dat file into a workable CSV file within R?
file is clunky, and I cannot find a way to import a workable version into R. I've tried read_csv()
, read_delim()
, readLines()
, and readtable()
, but nothing seems to be able to work. Some columns seem to be delimited by periods and some seem to be delimited by white space. More information on the publicly available data set can be found here
如果您能提供帮助,请告诉我 - 谢谢!
ABES 文档中提供的 tidyverse 与 SAS 和 SPSS 脚本的组合在这里可以节省时间。例如,您可以使用带有 readr::read_fwf()
选项 fwf_cols()
的 SPSS 脚本的宽度。例如,传递给 fwf_cols()
的前几列将如下所示:Q1 = c(1, 17), Q2 = c(18, 18), Q3 = c(19, 19))
。一旦你让它工作,你可以根据 ABES 数据用户指南中的附录 E 检查你的频率。
file is clunky, and I cannot find a way to import a workable version into R. I've tried read_csv()
, read_delim()
, readLines()
, and readtable()
, but nothing seems to be able to work. Some columns seem to be delimited by periods and some seem to be delimited by white space. More information on the publicly available data set can be found here
如果您能提供帮助,请告诉我 - 谢谢!
ABES 文档中提供的 tidyverse 与 SAS 和 SPSS 脚本的组合在这里可以节省时间。例如,您可以使用带有 readr::read_fwf()
选项 fwf_cols()
的 SPSS 脚本的宽度。例如,传递给 fwf_cols()
的前几列将如下所示:Q1 = c(1, 17), Q2 = c(18, 18), Q3 = c(19, 19))
。一旦你让它工作,你可以根据 ABES 数据用户指南中的附录 E 检查你的频率。