Well, I know the problem now. The Rweb at math.montana.edu is rather old (and slow!), I think. Try the one at stat.umn.edu: http://spider.stat.umn.edu/Rweb/ and you'll get the right result.
Regards, Yihui -- Yihui Xie <[EMAIL PROTECTED]> Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086 Mobile: +86-15810805877 Homepage: http://www.yihui.name School of Statistics, Room 1037, Mingde Main Building, Renmin University of China, Beijing, 100872, China On Thu, Oct 23, 2008 at 10:36 PM, Natalie O'Toole <[EMAIL PROTECTED]> wrote: > > Hi, > > The code I submitted to RWeb and R is below. The only difference with R is > that I added a read.table line of code, and in RWeb I opened the data file > from the submit button. It does not matter how I subset the data file, it > still doesn't work in RWeb either way. I am attaching my file that I am > using to extract this data from so it is easier to reproduce the result. > > > #subset the file to only include certain values: >> >> test<-subset(X, GRADE == 7 & Y_Q10A < 9) >> >> #sort the data by province and the variable Y_Q10A >> >> mydata<-test >> >> mydataSorted<-mydata[ order(mydata$PROV,mydata$Y_Q10A), ] >> >> #Weight the data and aggregate it by province and Y_Q10A >> >> myag<-aggregate(mydataSorted$WTPP, >> by=list(mydataSorted$PROV,mydataSorted$Y_Q10A), FUN=sum, na.rm=TRUE) >> >> #print the aggregated data >> >> print(myag) >> > > > > Thank-you, > > > Nat > __________________ ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.