similar to: recordPlot/replayPlot not working with saveRDS/readRDS

Displaying 20 results from an estimated 1000 matches similar to: "recordPlot/replayPlot not working with saveRDS/readRDS"

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
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
2013 Sep 13
1
inconsistency/bug in recordPlot/replayPlot
Hey all, I've run accross what seems to be a bug in the recordPlot/replayPlot functionality (or at least the lack of a feature which seems pretty reasonable to expect to be there) When drawing to a file-based graphics device (I tested with png()), the file resulting from calling replayPlot on a recordedplot object does not contain an identical image to that captured by the same graphics
2013 Sep 24
1
recordPlot() on non-interactive graphics device?
Hi. Q. Is there a way to record a plot using grDevices::recordPlot() without opening an interactive (=visible GUI window) graphics device (not even for a flash of a second)? Related: help("recordPlot", package="grDevices") says: "These functions record and replay the displaylist of the current graphics device." Is the intention that recordPlot() should be able to
2012 Jan 09
1
serializing recordedplot object
I use recordPlot() to save plots to disk that I render later to a variety of formats. This works fine for base R plots and ggplot2 plots, and also used to work for lattice plots. However somewhere in version 2.14 things stopped working for lattice plots. Here is an example: library(lattice); histogram(rnorm(100)); x <- recordPlot(); saveRDS(x, "myplot.rds"); y <-
2008 Apr 21
1
Use of recordPlot
I am trying to save plots that I create using calls to windows() folowed by multiple calls to plot to place several plots on a page. I want to store the plots as variables to be able to recall them later. The documentation states: "Recorded plot histories are of class "SavedPlots". They have a print method, and a subset method. As the individual plots are of class
2001 Jun 20
0
recordPlot usage: add snaps to a list.
I have trouble understanding the R list object and how to add objects and get them out. I''m trying to collect snapshots with recordPlot and replay them. Got great help from everybody here yesterday on my histogram function, works fine to make the pictures: histomatic <- function (s1,s2,s3,var){ if (is.numeric (s2[[var]])) { par(mfrow=c(3,1)); rz <- range(s1[[var]],
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/
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
2002 Nov 01
1
recordPlot in 1.5.x, replayPlot in 1.6.0 problem
I have plots that were stored using recordPlot() in a fairly recent but pre-1.6.0 version of R that will not replayPlot() in R 1.6.0. The error message is Error in replayPlot(x) : invalid hex digit in color or lty The plots were stored in June (2002-6-14), each as an element of a list named 'rpl'. The version of R that was current then is what I used. At that time I was able to
2014 May 01
2
Request to Replace Recordplot ,, replayplot
Record plot which stores a plot to an internal R data structure and Replay Plot which replays the plot enables one to keep plots around and use them accross sessions at least until version 3. If you cannot restore old plots and treat them as data and save accross sessions, there is little reason for recordPlot. Either R needs to dispense with internal formats entirelly, a bad move in my opinion
2008 Apr 21
5
Documentation General Comments
I realize the R developers are probably overwhelmed and have little time for this, but the documentation really needs some serious reorganizaton. A good through description of basic variable types would help a lot, e.g. the difference between lists, arrays, matrices and frames. And, it appears there is some object-orientation to R, but it is not complete. I can't, for instance find a
2004 Nov 30
1
RecordPlot
I want to do a zoom with recordPlot(). I have problems with lists. (R-2.0.1 patched 2004-11-30 , various linux). I have problems with RecordPlot class structure. > plot(1:10) > saveP <- recordPlot() > dev.off() > sx <- saveP[[1]][[2]][[2]] > saveP[[1]][[2]][[2]] <- sx Error in "[[<-"(`*tmp*`, 1, value = list(list( .Primitive("plot.new")),
2004 Sep 01
1
Advice on good programming practice, lexical scope
In "An Introduction to R" (See R help menu), there is an example of a function 'open.account' that makes use of the lexical scope in R. I have a set of functions that can be used to output R tables and graphics into a single report document. (I am aware that several tools can do this already). While reorganizing my code, I realize that I can collect my functions in a list, in
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
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
2000 Jun 22
1
R 1.1 congrat; undocumented behaviour of recordPlot
Hello, first, I'd like to congratulate the core team to the new R version 1.1. I think it's a great update, with glimpses into an even greater future (tcltk!). While playing around with the new functions (on Win 95), I found the following: As the documentation states, when I generate a plot and save it with recordPlot, I can regenerate it by printing the variable: > plot(1:10) >
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)
2014 Apr 30
0
ReplayPlot, limited to single session for RecordPlot()
R had an internal Plot format which could be saved in files and then reused. Just like one can save data.frames or lists of data which I routinely do could save plot which could be used for further elaboration and analysis. Thus you could modify a plot after you saved it. Matlab has a fig format which it uses for that purpose. The current version of R version 3 allows plots only to be used
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,