Re: [R] list of variables of an expression

2010-06-15 Thread Alberto Lusiani
David and Marc, thanks, both your answers work for me. all.vars() is ideal for me as I can get a vector of characters which I can use as argument of deriv() to get a vector of derivatives of an expresssion for all its variables. On Wed, Jun 16, 2010 at 12:28 AM, Marc Schwartz wrote: > On Jun 15

Re: [R] list of variables of an expression

2010-06-15 Thread Marc Schwartz
On Jun 15, 2010, at 5:07 PM, David Winsemius wrote: > > On Jun 15, 2010, at 5:45 PM, Alberto Lusiani wrote: > >> I would like to get the list of variables of an expression: is that >> possible? I searched the help and the web without success. In >> practice, given an expression like >> >> exp

Re: [R] list of variables of an expression

2010-06-15 Thread David Winsemius
On Jun 15, 2010, at 5:45 PM, Alberto Lusiani wrote: I would like to get the list of variables of an expression: is that possible? I searched the help and the web without success. In practice, given an expression like expr = parse(text="x^2+y^3") I would like to have a function such as: var