[R] How to do a "go to " in a loop in R

From: Lisa Wang <lisawang_at_uhnres.utoronto.ca>
Date: Thu 22 Jul 2004 - 05:37:00 EST


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@uhnres.utoronto.ca
Phone: 416 946 4501 ext. 5201
Fax: 416 946 4619



R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Jul 22 05:44:45 2004

This archive was generated by hypermail 2.1.8 : Fri 18 Mar 2005 - 02:37:25 EST