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
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
> 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]
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
[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)
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
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
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
> 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
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
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
11 matches
Mail list logo