Thank you for your response. Here is the problem that I find with your code
(which I had tried). When you pass a value to the subset argument of the
function, it will not hold the quotes on the subsetting variable’s value.
For example, if I want the function to do Y[Z==‘skinny’] so that we
> On 02 Dec 2015, at 16:09, Brant Inman wrote:
>
> Thank you for your response. Here is the problem that I find with your code
> (which I had tried). When you pass a value to the subset argument of the
> function, it will not hold the quotes on the subsetting variable’s
Your example and explanation are not complete, but I have the gut feeling that
you could do all this both more efficiently *and* more R-ish.
First of all, why would you pass Y and X separately, to ultimately build the Y
~ X formula within the body of your function?
Secondly, it seems to me
On 02.12.2015 06:11, Brant Inman wrote:
I am trying to build a function that can accept variables for a regression. It
would work something like this:
---
# Y = my response variable (e.g. income)
# X = my key predictor variable (e.g. education)
# subY = a subsetting variable for Y (e.g.
I am trying to build a function that can accept variables for a regression. It
would work something like this:
---
# Y = my response variable (e.g. income)
# X = my key predictor variable (e.g. education)
# subY = a subsetting variable for Y (e.g. race)
# subY.val = the value of the subsetting
5 matches
Mail list logo