Displaying 20 results from an estimated 900 matches similar to: "Problem with serialization via readRDS() on a textConnection()"
2017 Aug 08
0
Problem with serialization via readRDS() on a textConnection()
Hi All,
I had working code under R v3.2 that serialized an object, stored the
serialized object in a database, and then successfully retrieved and
hydrated that object.
I recently updated to R v3.4.1 and the same code now fails.
Here is the code in question (simplified), and the resulting error:
> zz = textConnection('tempConnection', 'wb')
> saveRDS(c("a",
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-----
2020 Jan 22
1
Memory error in the libcurl connection code
Hi All,
I think there is a memory error in the libcurl connection code that
typically happens when libcurl reads big chunks of data. This
potentially affects all code that use url() with the libcurl download
method, which is the default in most builds. In practice it tends to
happen more with HTTP/2 and if the connection is wrapped into a
gzcon(). macOS Catalina has a libcurl build with HTTP/2
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
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
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
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
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)
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
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
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
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
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/
2006 Nov 02
3
CRAN task views work only once per session (PR#9330)
Cran task views seems to be a "once-per-session" process -- the first
attempt to access views in a (RGui for Windows) session works, but
subsequent attempts fail. There is a noticeably long pause before
the failing call returns.
Example session with two calls to "available.views" follows, but similar
effects have been observed with two calls to "install.views" and
2018 May 01
1
possible internal (un)tar bug
>>>>> Martin Maechler <maechler at stat.math.ethz.ch>
>>>>> on Tue, 1 May 2018 16:14:43 +0200 writes:
>>>>> G?bor Cs?rdi <csardi.gabor at gmail.com>
>>>>> on Tue, 1 May 2018 12:05:32 +0000 writes:
>> This is a not too old R-devel on Linux, it already fails
>> in R 3.4.4, and on macOS as well.
2010 Sep 16
3
funciones en R potencialmente peligrosas via web?
Hola:
Para el desarrollo del nuevo PluginR de Tiki (para poder ejecutar
scripts de R desde Tiki: en páginas Wiki, hojas de cálculo web, etc,
http://dev.tiki.org/PluginR ), por ahora estamos usando la lista de
funciones que se usaban en el proyecto r-php, y que fueran heredadas por
la extensión R de MediaWiki.
Como r-php se hizo hace algunos años (2006), me pregunto si alguien sabe
si hay
2011 Jan 21
1
Reading gz compressed csv file - 'incomplete line found'
Hi all,
I am trying to download, decompress and read a csv file. My code:
myurl <-
"ftp://ftp.ncbi.nih.gov/pub/geo/DATA/supplementary/series/GSE24729/GSE24729_MitoNuclear_suppl_male_stats.csv.gz"
#
myfile <- "GSE24729_MitoNuclear_suppl_male_stats.csv.gz"
#
download.file(myurl, destfile=myfile, mode="w")
#
mycon <- gzcon(gzfile(myfile,
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:
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