【发布时间】:2013-05-08 09:40:26
【问题描述】:
在What could cause a "bad magic number" error when loading an R workspace and how to avoid it? 和R has magic number 'ëPNG' error 中,我收到了一个bad restore file magic number 错误:
> load("fossilien.dat")
Error: bad restore file magic number (file may be corrupted) -- no data loaded
In addition: Warning message:
file ‘fossilien.dat’ has magic number '"Samp'
Use of save versions prior to 2 is deprecated
使用source 函数给我一个不同的错误(类似于unexpected string constant):
> source("fossilien.dat")
Error in source("fossilien.dat") :
fossilien.dat:1:10: unexpected string constant
1: "Sample" "Sname"
^
这尤其令人沮丧,因为我确信数据来源是合法的 - 它是一个家庭作业问题:ftp://stat.ethz.ch/Teaching/Datasets/WBL/fossilien.dat
上面的 SO 问题都没有真正得到正确回答,所以我想我会再试一次。
关于我的 R 安装的一些细节:
> R.Version()
$platform
[1] "x86_64-apple-darwin9.8.0"
$version.string
[1] "R version 2.15.3 (2013-03-01)"
【问题讨论】: