Re: [R] Problem with do.call().

2014-03-28 Thread Philippe Grosjean
On 28 Mar 2014, at 00:57, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 27/03/2014, 7:38 PM, Thomas Lumley wrote: You get what you wanted from do.call(plot,list(x=quote(x),y=quote(y))) By the time do.call() gets the arguments it doesn't know how y was originally computed, just what

Re: [R] Problem with do.call().

2014-03-28 Thread Duncan Murdoch
On 28/03/2014, 2:04 AM, Philippe Grosjean wrote: On 28 Mar 2014, at 00:57, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 27/03/2014, 7:38 PM, Thomas Lumley wrote: You get what you wanted from do.call(plot,list(x=quote(x),y=quote(y))) By the time do.call() gets the arguments it doesn't

Re: [R] Problem with do.call().

2014-03-28 Thread peter dalgaard
On 28 Mar 2014, at 02:37 , Rolf Turner r.tur...@auckland.ac.nz wrote: So there you are. Feel enlightened? Somewhat, actually, but not to such an extent as to have reached nirvana. Promises blow me away. Here's the most useful part of the post: to get what you want, use

Re: [R] Problem with do.call().

2014-03-28 Thread Rolf Turner
On 29/03/14 01:34, peter dalgaard wrote: On 28 Mar 2014, at 02:37 , Rolf Turner r.tur...@auckland.ac.nz wrote: So there you are. Feel enlightened? Somewhat, actually, but not to such an extent as to have reached nirvana. Promises blow me away. Here's the most useful part of the post:

[R] Problem with do.call().

2014-03-27 Thread Rolf Turner
I was under the impression that do.call(foo,list(x=x,y=y)) should yield the same result as foo(x,y). However if I do x - 1:10 y - (x-5.5)^2 do.call(plot,list(x=x,y=y)) I get the expected plot but with the y-values (surrounded by c()) being printed

Re: [R] Problem with do.call().

2014-03-27 Thread Thomas Lumley
You get what you wanted from do.call(plot,list(x=quote(x),y=quote(y))) By the time do.call() gets the arguments it doesn't know how y was originally computed, just what values it has. -thomas On Thu, Mar 27, 2014 at 6:17 PM, Rolf Turner r.tur...@auckland.ac.nzwrote: I was under the

Re: [R] Problem with do.call().

2014-03-27 Thread Duncan Murdoch
On 27/03/2014, 7:17 PM, Rolf Turner wrote: I was under the impression that do.call(foo,list(x=x,y=y)) should yield the same result as foo(x,y). However if I do x - 1:10 y - (x-5.5)^2 do.call(plot) I get the expected plot but with the y-values

Re: [R] Problem with do.call().

2014-03-27 Thread Duncan Murdoch
On 27/03/2014, 7:38 PM, Thomas Lumley wrote: You get what you wanted from do.call(plot,list(x=quote(x),y=quote(y))) By the time do.call() gets the arguments it doesn't know how y was originally computed, just what values it has. This works, but it doesn't make sense to me. The arguments end

Re: [R] Problem with do.call().

2014-03-27 Thread Rolf Turner
On 28/03/14 12:49, Duncan Murdoch wrote: On 27/03/2014, 7:17 PM, Rolf Turner wrote: I was under the impression that do.call(foo,list(x=x,y=y)) should yield the same result as foo(x,y). However if I do x - 1:10 y - (x-5.5)^2 do.call(plot) I get the expected plot but

[R] problem in do.call function

2011-08-08 Thread Kathie
Dear all, I am trying to use do.call, but I don't think I totally understand this function. Here is an simple example. B - matrix(c(.5,.1,.2,.3),2,2) B [,1] [,2] [1,] 0.5 0.2 [2,] 0.1 0.3 x - c(.1,.2) X - cbind(1,x) X x [1,] 1

Re: [R] problem in do.call function

2011-08-08 Thread Duncan Murdoch
On 08/08/2011 4:34 AM, Kathie wrote: Dear all, I am trying to use do.call, but I don't think I totally understand this function. Here is an simple example. B- matrix(c(.5,.1,.2,.3),2,2) B [,1] [,2] [1,] 0.5 0.2 [2,] 0.1 0.3 x-

Re: [R] problem in do.call function

2011-08-08 Thread Duncan Murdoch
On 08/08/2011 8:21 AM, Duncan Murdoch wrote: On 08/08/2011 4:34 AM, Kathie wrote: Dear all, I am trying to use do.call, but I don't think I totally understand this function. Here is an simple example. B- matrix(c(.5,.1,.2,.3),2,2)