Re: [R] .Rdata not loading

2021-12-24 Thread Rich Shepard
On Fri, 24 Dec 2021, Jeff Newmiller wrote: The qsave/qread functions from the qs package are functionally interchangeable with saveRDS/readRDS, but faster and create smaller files. A simple if ( file.exists( "obj1.qs" ) ) { obj1 <- qread( "onj1.qs" ) } else { obj1 <- compute_obj1() q

Re: [R] .Rdata not loading

2021-12-24 Thread Rich Shepard
On Fri, 24 Dec 2021, Rui Barradas wrote: Can section Adoption of this Library of Congress link https://www.loc.gov/preservation/digital/formats/fdd/fdd000470.shtml help? I'm really not sure. Rui, After reading that interesting page I don't see how it helps me. I think that re-running all my s

Re: [R] .Rdata not loading

2021-12-24 Thread Jeff Newmiller
The qsave/qread functions from the qs package are functionally interchangeable with saveRDS/readRDS, but faster and create smaller files. A simple if ( file.exists( "obj1.qs" ) ) { obj1 <- qread( "onj1.qs" ) } else { obj1 <- compute_obj1() qsave( obj1, "obj1.qs" ) } can be used

Re: [R] .Rdata not loading

2021-12-24 Thread Rui Barradas
Hello, Can section Adoption of this Library of Congress link https://www.loc.gov/preservation/digital/formats/fdd/fdd000470.shtml help? I'm really not sure. Happy Holidays, Rui Barradas Às 16:31 de 24/12/21, Rich Shepard escreveu: On Fri, 24 Dec 2021, Adrian Dușa wrote: Package admisc h

Re: [R] .Rdata not loading

2021-12-24 Thread Rich Shepard
On Fri, 24 Dec 2021, Adrian Dușa wrote: Package admisc has a function called obj.rda(), which returns the names of the objects from an .Rdata file. Not sure how it handles corrupt .Rdata files, but should generally give an idea about what's inside. Adrian, Thank you. I know what dataframes an

Re: [R] .Rdata not loading

2021-12-24 Thread Adrian Dușa
On Fri, 24 Dec 2021 at 17:35, Rich Shepard wrote: > On Fri, 24 Dec 2021, Rasmus Liland wrote: > > > If you want to look at Rdata-files in a quick way in the > > terminal, use this little gem in your .zshrc.local: > > > > readrdata() { Rscript -e "options(width=$COLUMNS); load('$1'); > sapply(ls()

Re: [R] .Rdata not loading

2021-12-24 Thread Rich Shepard
On Fri, 24 Dec 2021, Rasmus Liland wrote: If you want to look at Rdata-files in a quick way in the terminal, use this little gem in your .zshrc.local: readrdata() { Rscript -e "options(width=$COLUMNS); load('$1'); sapply(ls(), get, simplify=F)" | less } Rasmus, I use bash, not zsh. And runn

Re: [R] .Rdata not loading

2021-12-24 Thread Rasmus Liland
Dear Rich, If you want to look at Rdata-files in a quick way in the terminal, use this little gem in your .zshrc.local: readrdata() { Rscript -e "options(width=$COLUMNS); load('$1'); sapply(ls(), get, simplify=F)" | less } Merry Christmas! Best, Rasmus ___

Re: [R] .Rdata not loading

2021-12-24 Thread Rich Shepard
On Thu, 23 Dec 2021, Bill Dunlap wrote: Three things you might try using R (and show the results in this email thread): Bill, * load(verbose=TRUE, ".RData") # see how far it gets before stopping load(verbose=TRUE, ".RData") Loading objects: all_turb_plot disc_all Error in load(verbose =

Re: [R] .Rdata not loading

2021-12-23 Thread Bill Dunlap
And a fourth thing to do: * dput(tail(n=20, readBin(".RData", what=raw(), n=file.size(".RData" This can show if the file got truncated. -Bill On Thu, Dec 23, 2021 at 5:25 PM Bill Dunlap wrote: > Three things you might try using R (and show the results in this email > thread): > > * load(v

Re: [R] .Rdata not loading

2021-12-23 Thread Bill Dunlap
Three things you might try using R (and show the results in this email thread): * load(verbose=TRUE, ".RData") # see how far it gets before stopping * file.info(normalizePath(".RData")) # is this the file you think it is? * dput(readBin(".RData", what=raw(), n=100)) The last will print some hex n

Re: [R] .Rdata not loading

2021-12-23 Thread Rich Shepard
On Thu, 23 Dec 2021, Jeff Newmiller wrote: This practice (saving and resuming from Rdata files) often ends badly this way. Objects that are "shared" in memory get saved as separate data and may not "fit" when re-loaded. This is why re-running from scratch should always be part of your workflow.

Re: [R] .Rdata not loading

2021-12-23 Thread Jeff Newmiller
This practice (saving and resuming from Rdata files) often ends badly this way. Objects that are "shared" in memory get saved as separate data and may not "fit" when re-loaded. This is why re-running from scratch should always be part of your workflow. There are caching approaches that track ind

[R] .Rdata not loading

2021-12-23 Thread Rich Shepard
Each time I finish with a session I save the image. Today the saved image did not load and manually running 'load('.RData') fails: load('.RData') Error in load(".RData") : ReadItem: unknown type 0, perhaps written by later version of R This has not happened before. Installed is R-4.1.2-x8