Skip to content
Prev 10514 / 10988 Next

[Rcpp-devel] Incorrect result of NA_REAL and NA_INTEGER

a) Does the 'rds' file you tried to make exist?
   file.exists("mat.RDs")
b) It should have a more than c. 10 bytes in it.
   file.size("mat.RDs")
c) It should start with the with the 2-byte "magic number" for gzip files,
1f 8b:
   readBin("mat.RDs", what=raw(), n=20)
 [1] 1f 8b 08 00 00 00 00 00 00 06 8b e0 62 60 60 60 66 60 61 60
d) When unzipped it should start with the rds header, 58 0a, then version 3,
then the version of R that made it (4 0 2), and the earliest version of R
that can
read it (3 5 0):
  readBin(gzfile("mat.RDs","rb"), what=raw(), n=20)
 [1] 58 0a 00 00 00 03 00 04 00 02 00 03 05 00 00 00 00 06 43 50

Failure of d will give you the "unknown input format" error'.  Failure
of c means you used compress=FALSE in the call to saveRDS.

-Bill
On Tue, Sep 8, 2020 at 4:11 PM Dirk Eddelbuettel <edd at debian.org> wrote:

            
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20200908/9a570578/attachment-0001.html>