An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090421/d30447d8/attachment-0001.pl>
how to inspect content of save file
9 messages · Benno Pütz, Dimitri Liakhovitski, Duncan Murdoch +1 more
Can't you just read in the very first line of the file (that contains names)? Dimitri 2009/4/21 Benno P?tz <puetz at mpipsykl.mpg.de>:
Is there a way of listing the variables contained in a file created with the save() command other than load()ing the file? I have a couple of rather larger files that I would rather not load ... Benno P?tz MPI of Psychiatry ? ? ? ? ? Tel: +49+(0)89-30622 222 Kraepelinstr. 2 ? ? ? ? ? ? Fax: +49+(0)89-30622 601 80804 Munich, Germany ? ? ? puetz at mpipsykl.mpg.de ? ? ? ?[[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Dimitri Liakhovitski MarketTools, Inc. Dimitri.Liakhovitski at markettools.com
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090422/8cf9a11b/attachment-0001.pl>
Why do you use save()? Can't you write out data frame(s) with your variables in a .txt or a .csv file and then read in just the variable names?
On Wed, Apr 22, 2009 at 5:12 AM, Benno P?tz <puetz at mpipsykl.mpg.de> wrote:
Am 21.Apr.2009 um 19:16 schrieb Dimitri Liakhovitski: Can't you just read in the very first line of the file (that contains names)? Dimitri 2009/4/21 Benno P?tz <puetz at mpipsykl.mpg.de>: Is there a way of listing the variables contained in a file created with the save() command other than load()ing the file? I have a couple of rather larger files that I would rather not load ... As save() writes a binary (and by default compressed) format that is not directly possible - at least I haven't figured out how. That is why I addressed the list with my question. Also save allows a list of variables to be included in one file. Benno
Dimitri Liakhovitski MarketTools, Inc. Dimitri.Liakhovitski at markettools.com
Am 22.Apr.2009 um 17:21 schrieb Dimitri Liakhovitski:
Why do you use save()? Can't you write out data frame(s) with your variables in a .txt or a .csv file and then read in just the variable names?
I could, but ...
As save() writes a binary (and by default compressed) format that is not
... the files I look at now have a size of around 875MB (and this is after compression of the binary format) - text files (even compressed) are usually bigger. But while this question arose from these files, it is the structure of the files I am after. Benno
On 4/22/2009 12:59 PM, Benno P?tz wrote:
Am 22.Apr.2009 um 17:21 schrieb Dimitri Liakhovitski:
Why do you use save()? Can't you write out data frame(s) with your variables in a .txt or a .csv file and then read in just the variable names?
I could, but ...
As save() writes a binary (and by default compressed) format that is not
... the files I look at now have a size of around 875MB (and this is after compression of the binary format) - text files (even compressed) are usually bigger. But while this question arose from these files, it is the structure of the files I am after.
It is not designed to be read bit-by-bit. If you want to read only part of the data, the only easy way is to write it in multiple files. You can read the documentation for the format in the source (see src/main/serialize.c), but I don't think it would be easy to put together a function to do what you want. Duncan Murdoch
Duncan Murdoch wrote:
On 4/22/2009 12:59 PM, Benno P?tz wrote:
Am 22.Apr.2009 um 17:21 schrieb Dimitri Liakhovitski:
Why do you use save()? Can't you write out data frame(s) with your variables in a .txt or a .csv file and then read in just the variable names?
I could, but ...
As save() writes a binary (and by default compressed) format that is not
... the files I look at now have a size of around 875MB (and this is after compression of the binary format) - text files (even compressed) are usually bigger. But while this question arose from these files, it is the structure of the files I am after.
It is not designed to be read bit-by-bit. If you want to read only part of the data, the only easy way is to write it in multiple files. You can read the documentation for the format in the source (see src/main/serialize.c), but I don't think it would be easy to put together a function to do what you want. Duncan Murdoch
Thanks, Duncan! While this is not quite what I had hoped for I was afraid it would turn out this way. Benno
Hi Benno et al.
I have had some code for reading RDA files via R functions
and binary connections. It is available from
http://www.omegahat.org/RDA
or
install.packages("RDA", repos = "http://www.omegahat.org/R",
dep = TRUE)
It could be made faster if there is interest.
One of the motivations was to allow Spotlight on the mac
be able to index R files. In the future, I might create
an extended RDA format that puts the table of contents
at the end of the file and so we could look that up
directly as well as append new objects to the file.
And there are other good things we might do.
But we might be better off using a zip file as
a container for individually serialized objects. We
could deserialize these directly from the file without
having to unzip them.
Anyway, hope this helps somewhat
D.
Duncan Murdoch wrote:
On 4/22/2009 12:59 PM, Benno P?tz wrote:
Am 22.Apr.2009 um 17:21 schrieb Dimitri Liakhovitski:
Why do you use save()? Can't you write out data frame(s) with your variables in a .txt or a .csv file and then read in just the variable names?
I could, but ...
As save() writes a binary (and by default compressed) format that is not
... the files I look at now have a size of around 875MB (and this is after compression of the binary format) - text files (even compressed) are usually bigger. But while this question arose from these files, it is the structure of the files I am after.
It is not designed to be read bit-by-bit. If you want to read only part of the data, the only easy way is to write it in multiple files. You can read the documentation for the format in the source (see src/main/serialize.c), but I don't think it would be easy to put together a function to do what you want. Duncan Murdoch
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
4 days later
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090427/17f18af0/attachment-0001.pl>