我正在使用haven库从sas7bdat文件中读取SAS文件元数据。以下是我使用的代码
library(haven)
sas_file <- read_sas("/dbfs/mnt/test1/Disease/Heart Attack/SAS/airline.sas7bdat", catalog_file = "/dbfs/mnt/test1/Disease/Heart Attack/SAS/airline.sas7bdat")
我在此之后收到以下错误:
&#34; df_parse_sas_file出错(spec_data,spec_cat,encoding = encoding,catalog_encoding = catalog_encoding,:&#34;
请指导我如何解决此问题。当我在sas viewer中查看时,两个文件都指向相同的位置,因为单个文件包含数据和元数据。
答案 0 :(得分:0)
You should not be using the catalog
option, that's not a catalog - that's for things like an associated format catalog. That's not definitely causing the error (I tested a similar syntax and it didn't error), but it's definitely wrong.