title: "bad restore file magic number" error in R
body: <p>As in <a href="https://stackoverflow.com/questions/12463583/what-could-cause-a-bad-magic-number-error-when-loading-an-r-workspace-and-how?rq=1">What could cause a &quot;bad magic number&quot; error when loading an R workspace and how to avoid it?</a> and <a href="https://stackoverflow.com/questions/10806867/r-has-magic-number-epng-error?rq=1">R has magic number &#39;&#235;PNG&#39; error</a>, I'm getting a <em>bad restore file magic number</em> error:</p>
  
  <pre><code>&gt; 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 
  </code></pre>
  
  <p>Using the <code>source</code> function gives me a different error (similar to <a href="https://stackoverflow.com/questions/13377206/unexpected-string-constant">unexpected string constant</a>):</p>
  
  <pre><code>&gt; source("fossilien.dat")
  Error in source("fossilien.dat") : 
    fossilien.dat:1:10: unexpected string constant
  1: "Sample" "Sname"
              ^
  </code></pre>
  
  <p>This is especially frustrating as I'm confident the source of data is legit - its for a homework problem: <a href="ftp://stat.ethz.ch/Teaching/Datasets/WBL/fossilien.dat" rel="nofollow noreferrer">ftp://stat.ethz.ch/Teaching/Datasets/WBL/fossilien.dat</a></p>
  
  <p>None of the SO questions above were really answered properly so I thought I would try again. </p>
  
  <p>Some details about my R installation: </p>
  
  <pre><code>&gt; R.Version()
  $platform
  [1] "x86_64-apple-darwin9.8.0"
  $version.string
  [1] "R version 2.15.3 (2013-03-01)"
  </code></pre>