I know using eval is not optimal and maybe bad, but how to avoid using eval
in the following example
func1 - function(dat, eval.this) {
eval(parse(text = paste0(with(dat, , eval.this,
}
dat - data.frame(x = 1:2, y = 2:3)
func1(dat, x*2+y)
func1(dat, sin(x)*cos(y))
Here eval.this is a
This has been discussed extensively, on this list as well as
elsewhere. I suggest doing a web search, read up on the issue, and
post back here only if you have specific questions that are not
answered already.
Best,
Ista
On Sat, Feb 1, 2014 at 11:40 AM, Hai Qian hq...@gopivotal.com wrote:
I
I have been searching around for some time, but with no luck for this
particular problem.
--
*Pivotal http://www.gopivotal.com/*
A new platform for a new era
On Sat, Feb 1, 2014 at 9:02 AM, Ista Zahn istaz...@gmail.com wrote:
This has been discussed extensively, on this list as well as
You have set up your criteria for success to be that your user has full freedom
to specify code in strings to evaluate. Then you ask how to achieve this goal
without evaluating that code. Are you thinking objectively at all about your
question?
The advice to not use eval has a number of
On 14-02-01 11:40 AM, Hai Qian wrote:
I know using eval is not optimal and maybe bad, but how to avoid using eval
in the following example
func1 - function(dat, eval.this) {
eval(parse(text = paste0(with(dat, , eval.this,
}
dat - data.frame(x = 1:2, y = 2:3)
func1(dat, x*2+y)
Hi Jeff,
Your answer is good. It makes me think that maybe I should revise some of
my designs.
Now I know that it is impossible to do this under my settings.
Thanks
On Sat, Feb 1, 2014 at 9:55 AM, Jeff Newmiller jdnew...@dcn.davis.ca.uswrote:
You have set up your criteria for success to be
On Sat, Feb 1, 2014 at 11:40 AM, Hai Qian hq...@gopivotal.com wrote:
I know using eval is not optimal and maybe bad, but how to avoid using eval
in the following example
func1 - function(dat, eval.this) {
eval(parse(text = paste0(with(dat, , eval.this,
}
dat - data.frame(x = 1:2,
7 matches
Mail list logo