Hello,

I'm trying to learn R (for fun!), and I've tried to find any previous discussion of this problem (or something like it) and haven't found one.

When I run the following command, R seems to simply stop. I get no error message, but I also have no ">" or "+" to type after (although I can type). The only solution seems to be restarting the program. Here's the code:

for(i in 1:150)
for(j in 1:150)
(average <-c(
(if(NO[i]==1)
{i*0}
else
{if(HA[i]==HA[j])
{while(G[j]==1)
{mean(PT[j:(i-1)])}}})))

Also, if what I'm trying to do makes any sense and someone sees an easier way of doing it, that would be great.

Thanks!

Milo
Undergraduate -- Reed College
Portland, OR

______________________________________________
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.

Reply via email to