[R] Odp: how to iterate

From: Petr PIKAL <petr.pikal_at_precheza.cz>
Date: Tue, 26 Jun 2007 17:03:28 +0200


Hi

as you did not specify your code (which you said it had failed) I try to give you a suggestion how I would do such tasks.

for (i in 1:100) {

sample(something, no, replace =TRUE)
result <-perform a test
store.a result[i] <- result

}

Regards
Petr

r-help-bounces_at_stat.math.ethz.ch napsal dne 26.06.2007 16:08:16:

> for the following example dataset:-
> Category Variable 1 127 1 261 1 142 1 183 1 234 1 162 2 173 2 321 2
168 2
> 197 2 213 2 261 3 198 3 126 3 167 3 154 3 134 3 187 3 109 3 210
> I have performed Anova on the measured variable (column#2) for the
groups
> 1,2&3 (column#1). Now I want to randomize the values in C#2 and
reperform
> the test, say, a hundred times. Please suggest a way for this iteration.
The
> loop I tried to write didn't work.
> Thanks.
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_stat.math.ethz.ch 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.



R-help_at_stat.math.ethz.ch 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. Received on Tue 26 Jun 2007 - 15:42:04 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 26 Jun 2007 - 16:32:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.