Displaying 1 result from an estimated 1 matches for "rhsexpr".
Did you mean:
rhs_expr
2014 Oct 17
2
Most efficient way to check the length of a variable mentioned in a formula.
Dear R gurus,
I need to know the length of a variable (let's call that X) that is
mentioned in a formula. So obviously I look for the environment from which
the formula is called and then I have two options:
- using eval(parse(text='length(X)'),
envir=environment(formula) )
- using length(get('X'),
envir=environment(formula) )
a bit of