[R] For loop for subset - repeating same over and over?
Mario Valle
mvalle at cscs.ch
Fri Sep 30 08:32:20 CEST 2011
Not reproducible.
Could you please attach the dataset
QInflAvgbyPlot
Otherwise I don't see anything obviously wrong here.
Ciao!
mario
On 30-Sep-11 01:37, kelseyann wrote:
> SiteSpp<-
> c("ADHALP","ADLCON","ADLARC","BDALAT","BDPARC","BDLCON","BDLARC","AWCAQU","AWERUS","AWEANG","AWDPSI","BWCSTA","BWHPAU","BWETRI","BWERUS","BWDFIS","BWPARC","BWLCON","BWLARC","BWJBIG")
>
> n.SiteSpp<- length(SiteSpp)
>
> for (i in (1:n.SiteSpp)) {
> QInfl.aov<- aov(AvgOfnumResponse ~ strTrea*strYear,
> data=QInflAvgbyPlot, subset=(SiteSpp == SiteSpp[i]))
> print(summary(QInfl.aov))
> }
--
Ing. Mario Valle
Data Analysis and Visualization Group | http://www.cscs.ch/~mvalle
Swiss National Supercomputing Centre (CSCS) | Tel: +41 (91) 610.82.60
v. Cantonale Galleria 2, 6928 Manno, Switzerland | Fax: +41 (91) 610.82.82
More information about the R-help
mailing list