if (X>5) {
  df1<-c(4,5,6,7,8)
  df2<-c(9,10,11,12,13)
}

hth,

Daniel Moreira, MD




jimdare <jamesdare26@gmail.com> 
Sent by: r-help-bounces@r-project.org
03/22/2009 05:27 PM

To
r-help@r-project.org
cc

Subject
[R]  If statement generates two outputs







Hi,

How do I tell an if statement to generate two seperate outputs.

E.g  If X>5 I want to create df1 and df2:

if (X>5) {df1<-c(4,5,6,7,8) AND df2<-c(9,10,11,12,13)}

Thanks,
James
-- 
View this message in context: 
http://www.nabble.com/If-statement-generates-two-outputs-tp22650844p22650844.html

Sent from the R help mailing list archive at Nabble.com.

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


	[[alternative HTML version deleted]]


