...perhaps ?all.vars
as in
> form <- y~x+z
> all.vars(form)
[1] "y" "x" "z"
> all.vars(form)[-1]
[1] "x" "z"
-- Bert
On Wed, Nov 7, 2012 at 2:03 PM, Alexander Shenkin wrote:
> Hello,
>
> I'm trying to extract the independent variables from a formula. The
> closest I've been able to come,
On Nov 7, 2012, at 4:03 PM, Alexander Shenkin wrote:
> Hello,
>
> I'm trying to extract the independent variables from a formula. The
> closest I've been able to come, aside from rolling my own, is the following:
>
>> a = y ~ b * x
>> attr(terms(formula(a)),"variables")
>
> The reason I'm do
Hi,
On Wed, Nov 7, 2012 at 5:03 PM, Alexander Shenkin wrote:
> Hello,
>
> I'm trying to extract the independent variables from a formula.
This is somewhat ambiguous. Do you want the actual columns of values?
The quoted variable names? Including the interaction term or not?
If you just want the q
Hello,
I'm trying to extract the independent variables from a formula. The
closest I've been able to come, aside from rolling my own, is the following:
> a = y ~ b * x
> attr(terms(formula(a)),"variables")
The reason I'm doing this is that I'm building a grid of points that I
use to construct a
4 matches
Mail list logo