Re: [R] how to inspect content of save() file
Am 22.Apr.2009 um 21:45 schrieb Duncan Temple Lang: 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, Thanks a lot! After some further investigation in the organization of the R hierarchy and the interplay of GUI and manual installation on my Mac I just got to compile and load everthing. This is pretty much what I was looking for - it is however, as you already seem to indicate, a bit slow. It took several minutes for a 10 MB file ... I'll time the big files at the office tomorrow. So, if you think about improving speed, I'd be looking forward to it. On the other hand, if you are already considering an overhaul of the format that would have a faster readout as a byproduct, I'd happily wait for that. Benno [[alternative HTML version deleted]] __ R-help@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.
Re: [R] how to inspect content of save file
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 pu...@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 [[alternative HTML version deleted]] __ R-help@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.
Re: [R] how to inspect content of save file
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 pu...@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 pu...@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.liakhovit...@markettools.com __ R-help@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.
Re: [R] how to inspect content of save() file
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 __ R-help@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.
Re: [R] how to inspect content of save() file
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@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.
Re: [R] how to inspect content of save() file
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 __ R-help@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.
Re: [R] how to inspect content of save() file
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@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. __ R-help@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.
Re: [R] how to inspect content of save file
Can't you just read in the very first line of the file (that contains names)? Dimitri 2009/4/21 Benno Pütz pu...@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 pu...@mpipsykl.mpg.de [[alternative HTML version deleted]] __ R-help@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.liakhovit...@markettools.com __ R-help@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.