On Nov 29, 2011, at 2:00 AM, Xu Wang wrote:
Why don't the following two commands work?
eval(parse(text=s))
eval(as.expression(s))
Hm, try to set an object s before calling.
Regards
Petr
__
R-help@r-project.org mailing list
David,
Did my reply get orphaned or are you trying to help me realize that asking
why something does not work is not a straightforward question? I'll try to
cover both bases.
I'll focus just on the first case that I don't understand. Suppose we have
s- ln(a+b)
a-1
b-2
eval(parse(text=s))
Error
Hi
Did my reply get orphaned or are you trying to help me realize that
asking
why something does not work is not a straightforward question? I'll try
to
cover both bases.
I'll focus just on the first case that I don't understand. Suppose we
have
s- ln(a+b)
a-1
b-2
On 11/29/2011 06:30 PM, Xu Wang wrote:
David,
Did my reply get orphaned or are you trying to help me realize that asking
why something does not work is not a straightforward question? I'll try to
cover both bases.
I'll focus just on the first case that I don't understand. Suppose we have
s-
On Nov 29, 2011, at 2:30 AM, Xu Wang wrote:
David,
Did my reply get orphaned
All replies are orphaned. You are asked to include context if your
question relies on code that has previously been posted.
or are you trying to help me realize that asking
why something does not work is not
Petr, thanks for pointing that out. Jim, you are exactly right! Thank you
for catching that. I did not realize in the other replies that they were
using log and not ln.
David, thank you for the lessons. I will improve my question asking skills.
Thanks to all,
Xu
On Tue, Nov 29, 2011 at 9:31
Why don't the following two commands work?
eval(parse(text=s))
eval(as.expression(s))
--
View this message in context:
http://r.789695.n4.nabble.com/Transforming-a-string-into-a-command-tp4112183p4118243.html
Sent from the R help mailing list archive at Nabble.com.
On Nov 29, 2011, at 2:00 AM, Xu Wang wrote:
Why don't the following two commands work?
eval(parse(text=s))
eval(as.expression(s))
Can you think of anything else we might need to know in order to
answer that question?
--
David Winsemius, MD
West Hartford, CT
I would like to make a string executable, e.g,
s- ln(a+b)
a-1
b-2
execute string s to obtain ln(a+b)
How can I make it?
Ciao fron Rome
Vittorio
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do
This is one way to do it.
a = 1
b = 2
c = parse(text = log(a + b))
eval(c)
Hope this helps.
Cheers,
On 27/11/2011 11:16 a.m., Victor wrote:
I would like to make a string executable, e.g,
s- ln(a+b)
a-1
b-2
execute string s to obtain ln(a+b)
How can I make it?
Ciao fron Rome
?eval
s- expression(log(a+b))
a-1
b-2
eval(s)
Andrija
On Sun, Nov 27, 2011 at 11:16 AM, Victor vdem...@gmail.com wrote:
I would like to make a string executable, e.g,
s- ln(a+b)
a-1
b-2
execute string s to obtain ln(a+b)
How can I make it?
Ciao fron Rome
Vittorio
11 matches
Mail list logo