Re: [R] inconsistent output when using variable substitution

2008-05-31 Thread Dieter Menne
Robert Felty indiana.edu> writes: > > I am extremely puzzled by this behavior in R. I have a data frame called > Trials in which I have results from an experiment. I am trying to do a > subjects analysis, but getting weird results. Each row has 1 trial in it, > which includes a column for the

Re: [R] inconsistent output when using variable substitution

2008-05-30 Thread Robert Felty
Duncan, Mark, et al., > It's a scoping problem. To be helpful, subset looks up variables within > the dataframe first. Since it can find Subj there, that's the one it > uses in the test. > > The easiest solution is just to make sure that Subj is named something > that isn't a column of Trials, e.

Re: [R] inconsistent output when using variable substitution

2008-05-30 Thread Duncan Murdoch
On 30/05/2008 5:50 PM, Robert Felty wrote: Mark, Thanks for the reply. hi: subset doesn't know what i is but I don't have enough knowledge about scope to know what it's actually doing in that case. my point is that i wouldn't put i inside a subset command and expect it to know the value. sc

Re: [R] inconsistent output when using variable substitution

2008-05-30 Thread Robert Felty
Mark, Thanks for the reply. > hi: subset doesn't know what i is but I don't have enough knowledge > about scope to know what it's actually doing in that case. my > point is that i wouldn't put i inside a subset command and expect it to > know the value. scope is very complex in R so > doing t

[R] inconsistent output when using variable substitution

2008-05-30 Thread Robert Felty
I am extremely puzzled by this behavior in R. I have a data frame called Trials in which I have results from an experiment. I am trying to do a subjects analysis, but getting weird results. Each row has 1 trial in it, which includes a column for the subject number I get the list of subject numb