similar to: Problem with serialization via readRDS() on a textConnection()

Displaying 20 results from an estimated 500 matches similar to: "Problem with serialization via readRDS() on a textConnection()"

2017 Aug 09
1
Problem with serialization via readRDS() on a textConnection()
(Sorry for not linking to your message; I accidentally deleted the original copy of your message.) Your code > zz = textConnection('tempConnection', 'wb') > saveRDS(c("a", "b", "c"), zz, ascii = TRUE) > serialized_obj = paste(textConnectionValue(zz), collapse='\n') > readRDS(textConnection(serialized_obj)) Error in
2009 Apr 16
1
Error in .readRDS(nsInfoFilePath) : unknown input format (PR#13659)
Full_Name: Jeroen Jansen Version: 2.7.2 OS: Windows XP Pro Submission from: (NULL) (131.211.169.89) Allready with startup I get error message: R version 2.7.2 (2008-08-25) Copyright (C) 2008 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type
2018 Apr 02
0
[FORGED] recordPlot/replayPlot not working with saveRDS/readRDS
Hi What you are doing "wrong" is loading a recordedplot into the same session that it was created in. The saveRDS()/readRDS() works if you save in one R session and then read in a different R session. The assumption is that if you are still in the same session that created the recordedplot you still have the recordedplot (e.g., you can just do replayPlot(r) instead of
2023 Nov 15
1
saveRDS()/readRDS() on environments
Dear r-devel, I was surprised to see that saveRDS() and readRDS() work quite well with environments, see below: ``` z <- 3 # in global env y <- new.env() y$a <- 1 x <- new.env(parent = y) x$b <- 2 saveRDS(x, "x.RDS") # in a new session x <- readRDS("x.RDS") y <- parent.env(x) x$b #> [1] 2 y$a #> [1] 1 parent.env(y) #> <environment:
2009 Apr 16
0
Error in .readRDS(nsInfoFilePath) : unknown input format (PR#13660)
On 4/16/2009 4:50 AM, j.w.a.jansen at uu.nl wrote: > Full_Name: Jeroen Jansen > Version: 2.7.2 > OS: Windows XP Pro > Submission from: (NULL) (131.211.169.89) > > > Allready with startup I get error message: > R version 2.7.2 (2008-08-25) That version is not current, but it looks to me as though you've corrupted a file on your system. It would be named
2011 Dec 10
2
install.packages readRDS error
Hi, I am running Ubuntu 10.10 and I have just installed R 2.14.0. When I try to install a package: install.packages("SPOT") it returns an error message: "Error in readRDS(file) : error reading from the connection". Also, when I try the command in R: update.packages(), it returns the same error message described previously. Any ideas? Regards, Monica [[alternative
2009 Mar 12
0
help.search(): "Error in .readRDS(hs_file) : error reading from connection" (PR#13591)
Full_Name: Don Maszle Version: R version 2.8.1 (2008-12-22) OS: Linux hood.mendelbio.com 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64 x86_64 GNU/Linux Submission from: (NULL) (206.86.87.3) I have resolved the problem, but this is a possible regression to a problem listed in the bug fixes for 2.3.1. After a new installation, help.search() on any search string without a
2017 Aug 22
0
How to benchmark speed of load/readRDS correctly
You need to study how reading files works in your operating system. This question is not about R. -- Sent from my phone. Please excuse my brevity. On August 22, 2017 5:53:09 AM PDT, raphael.felber at agroscope.admin.ch wrote: >Dear all > >I was thinking about efficient reading data into R and tried several >ways to test if load(file.Rdata) or readRDS(file.rds) is faster. The
2012 Jul 29
1
readRDS, In as.double.xts(fishReport$count) : NAs introduced by coercion
Hello, I looked in the R-help but could not find an archive addressing the following. I would like to convert a character to numeric after reading a file with RDS extension. After using as.numeric, I checked if it is numeric. It was not converted. Please help. Here is my code >Report <- readRDS(file="RDS/Report.RDS") > Report[1:2,] dive_id date
2018 Apr 02
3
recordPlot/replayPlot not working with saveRDS/readRDS
The documentation for recordPlot says the following: > As of R 3.3.0, it is possible (again) to replay a plot from another R session using, for example, saveRDS and readRDS. However, I haven't been able to save and restore a plot displaylist and have it work within the same R session, using R 3.4.3 or 3.3.3. Here's an example: # Save displaylist for a simple plot
2018 Apr 03
1
[FORGED] recordPlot/replayPlot not working with saveRDS/readRDS
>>>>> Paul Murrell <paul at stat.auckland.ac.nz> >>>>> on Tue, 3 Apr 2018 09:41:56 +1200 writes: > Hi What you are doing "wrong" is loading a recordedplot > into the same session that it was created in. The > saveRDS()/readRDS() works if you save in one R session and > then read in a different R session. The
2017 Jun 06
0
Error in readRDS(dest) SOLVED
On Wed, 31-May-2017 at 10:05AM -0400, Martin Morgan wrote: |> On 05/31/2017 04:38 AM, Patrick Connolly wrote: |> >When I check out those directories in a terminal, there's a big diffrence: |> > |> >With R-3.4.0 |> >~ > ll /tmp/RtmpFUhtpY |> >total 4 |> >drwxr-xr-x 2 hrapgc hrapgc 4096 May 31 10:45 downloaded_packages/ |> >-rw-r--r-- 1 hrapgc
2018 Sep 18
0
memory footprint of readRDS()
The ratio of object size to rds file size depends on the object. Some variation is due to how header information is stored in memory and in the file but I suspect most is due to how compression works (e.g., a vector of repeated values can be compressed into a smaller file than a bunch of random bytes). f <- function (data, ...) { force(data) tf <- tempfile()
2011 Oct 18
9
readRDS and saveRDS
Hi all, Is there any chance that readRDS and saveRDS might one day become read.rds and write.rds? That would make them more consistent with the other reading and writing functions. Hadley -- Assistant Professor / Dobelman Family Junior Chair Department of Statistics / Rice University http://had.co.nz/
2017 Aug 22
0
How to benchmark speed of load/readRDS correctly
The large value for maximum time may be due to garbage collection, which happens periodically. E.g., try the following, where the unlist(as.list()) creates a lot of garbage. I get a very large time every 102 or 51 iterations and a moderately large time more often mb <- microbenchmark::microbenchmark({ x <- as.list(sin(1:5e5)); x <- unlist(x) / cos(1:5e5) ; sum(x) }, times=1000)
2012 Sep 15
2
Risk of readRDS() not detecting race conditions with parallel saveRDS()?
I hardly know anything about the format used in (non-compressed) serialization/RDS, but hoping someone with more knowledge could give me some feedback; Consider two R processes running in parallel on the same unknown file system. Both of them write and read to the same RDS file foo.rds (without compression) at random times using saveRDS(object, file="foo.rds", compress=FALSE) and
2017 Aug 22
1
How to benchmark speed of load/readRDS correctly
Note that if you force a garbage collection each iteration the times are more stable. However, on the average it is faster to let the garbage collector decide when to leap into action. mb_gc <- microbenchmark::microbenchmark(gc(), { x <- as.list(sin(1:5e5)); x <- unlist(x) / cos(1:5e5) ; sum(x) }, times=1000, control=list(order="inorder")) with(mb_gc,
2017 Aug 22
0
How to benchmark speed of load/readRDS correctly
Caching happens, both within the operating system and within the C standard library. Ostensibly the intent for those caches is to help performance, but you are right that different low-level caching algorithms can be a poor match for specific application level use cases such as copying files or parsing text syntax. However, the OS and even the specific file system drivers (e.g. ext4 on flash disk
2017 Aug 23
1
How to benchmark speed of load/readRDS correctly
Hi there Thanks for your answers. I didn't expect that this would be so complex. Honestly, I don't understand everything you wrote since I'm not an IT specialist. But I read something that reading *.rds files is faster than loading *.Rdata and I wanted to proof that for my system and R version. But thanks anyway for your time. Cheers Raphael > -----Urspr?ngliche Nachricht-----
2017 Aug 22
4
How to benchmark speed of load/readRDS correctly
Dear all I was thinking about efficient reading data into R and tried several ways to test if load(file.Rdata) or readRDS(file.rds) is faster. The files file.Rdata and file.rds contain the same data, the first created with save(d, ' file.Rdata', compress=F) and the second with saveRDS(d, ' file.rds', compress=F). First I used the function microbenchmark() and was a astonished