以这个文件为例,我正在尝试读取 data.frame 中的数据。从文档(pdf 文件,表 1)中,它遵循一些 fortran 约定。我尝试了以下但收效甚微:
dir <- "Uncompressed-files/"
file <- "01_hit09.par"
delim <- c("I2", "I1", "F12.6", "E10.3", "E10.3", "F5.4", "F5.4",
"F10.4", "F4.2", "F8.6", "A15", "A15", "A15", "A15", "6I1", "6I2",
"A1", "F7.1", "F7.1")
test <- read.fortran(paste0(dir, file), delim)
test <- read.fwf(paste0(dir, file),
c(2, 1, 12, 10, 10, 5, 5, 10, 4, 8,
15, 15, 15, 15, 6, 12, 1, 7, 7))
指定正确格式的任何提示?