Re: [R] Exclude 2014 data from mean

2015-07-31 Thread Bert Gunter
This is very basic. Have you made **any** effort to learn R -- e.g. by going through an R tutorial? If not, please do this before posting further. This will save you -- and foks on this list, probably -- a lot of grief in the long (or even short) run. Also, if/when you do post further, post in pla

Re: [R] Exclude 2014 data from mean

2015-07-31 Thread Marc Schwartz
> On Jul 31, 2015, at 1:49 PM, Adam Jauregui wrote: > > Hello R-help, > > I am trying to compute the mean of a quarterback's career fantasy football > stats, but I wish to exclude his 2014 stats from the mean, as that will be > the test data for the model I am trying to build for my academic un

Re: [R] Exclude 2014 data from mean

2015-07-31 Thread Sarah Goslee
Hi Adam, Possibly subset() or & would be helpful. Or even aggregate(), depending on your ultimate goal. Without a reproducible example that includes some sample data provided using dput() (fake is fine), the code you used, and some clear idea of what output you expect, it's impossible to figure o