[Rd] Request to Replace Recordplot ,, replayplot

2014-05-01 Thread Michael Cohen
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 f

Re: [Rd] Request to Replace Recordplot ,, replayplot

2014-05-01 Thread Jeroen Ooms
Hi Michael, It is not needed to post this two days in a row on the same mailing list. Also if you search the archives, you find several previous discussions on this topic that might be helpful to develop a more informed opinion on the topic. In short: the problem is well known. Several people hav

Re: [Rd] Quantile issue

2014-05-01 Thread Martin Maechler
> Therneau, Terry M , Ph D > on Wed, 30 Apr 2014 12:00:33 -0500 writes: > This is likely yet another instance of round off error, > but it caught me by surprise. tmt% R --vanilla (headers > skipped, version 3.0.2 on Linux) >> load('qtest.rda') length(temp) > [1]

[Rd] How to test if an object/argument is "parse tree" - without evaluating it?

2014-05-01 Thread Henrik Bengtsson
This may have been asked before, but is there an elegant way to check whether an variable/argument passed to a function is a "parse tree" for an (unevaluated) expression or not, *without* evaluating it if not? Currently, I do various rather ad hoc eval()+substitute() tricks for this that most like

Re: [Rd] Quantile issue

2014-05-01 Thread Martin Maechler
[this was meant as "reply to all" to R-devel :] > Therneau, Terry M , Ph D > on Wed, 30 Apr 2014 12:00:33 -0500 writes: > This is likely yet another instance of round off error, > but it caught me by surprise. tmt% R --vanilla (headers > skipped, version 3.0.2 on Linux)

Re: [Rd] How to test if an object/argument is "parse tree" - without evaluating it?

2014-05-01 Thread Duncan Murdoch
On 01/05/2014, 4:39 PM, Henrik Bengtsson wrote: This may have been asked before, but is there an elegant way to check whether an variable/argument passed to a function is a "parse tree" for an (unevaluated) expression or not, *without* evaluating it if not? "Parse tree" isn't R terminology. Co

Re: [Rd] Request to Replace Recordplot ,, replayplot

2014-05-01 Thread Henrik Bengtsson
Hi, no need to repost and start yet another thread on the same topic as you posted yesterday (R-devel thread ''ReplayPlot, limited to single session for RecordPlot()", 2014-04-30). It just makes it hard to keep a constructive conversation in one place and it clutters up the archives. Replaying p

Re: [Rd] How to test if an object/argument is "parse tree" - without evaluating it?

2014-05-01 Thread Kevin Ushey
Henrik, If I understand correctly, you want something along the lines of (following your example): foo <- function(expr) { if (!is.language(expr)) substitute(expr) else expr } ## first example expr0 <- foo({ x <- 1 }) expr1 <- foo(expr0) stopifnot(identical(ex

Re: [Rd] How to test if an object/argument is "parse tree" - without evaluating it?

2014-05-01 Thread William Dunlap
> This may have been asked before, but is there an elegant way to check > whether an variable/argument passed to a function is a "parse tree" > for an (unevaluated) expression or not, *without* evaluating it if > not? I doubt it. Some packages say that if the argument is a formula then its right

Re: [Rd] How to test if an object/argument is "parse tree" - without evaluating it?

2014-05-01 Thread Hadley Wickham
On Thu, May 1, 2014 at 4:08 PM, Kevin Ushey wrote: > Henrik, > > If I understand correctly, you want something along the lines of > (following your example): > > foo <- function(expr) { > if (!is.language(expr)) substitute(expr) > else expr > } > > ## first example > ex

Re: [Rd] How to test if an object/argument is "parse tree" - without evaluating it?

2014-05-01 Thread peter dalgaard
My take would be that this is barking up the wrong tree. If you want to pass expressions in a way that a function can recognize, use formulas or expression objects. One problem is that pretty much every unevaluated argument is a "parse tree". The only other thing it can be is a constant object