[R] How to do a "go to " in a loop in R
Lisa Wang
lisawang at uhnres.utoronto.ca
Wed Jul 21 21:37:00 CEST 2004
Hi there,
I'm writing a function which involves a loop. What to write in the "?"
place would allow it skips the "for loop" and goes to "a[i]<-0".
a<-b[s>3,]
if (nrow(a)==0) ?????????????
for (i in 1:nrow(a)){
a[i]<-1
}
a[i]<-0
Lisa Wang
Cancer Informatics,
Ontario Cancer Institute/Princess Margaret Hospital, University Health
Network;
Email: lisawang at uhnres.utoronto.ca
Phone: 416 946 4501 ext. 5201
Fax: 416 946 4619
More information about the R-help
mailing list