> The reason R is powerful is becasue it can handle large vectors without 
each
> element being manipulated? Please let me know where I am wrong.
> 
> for(i in 1:length(news1o)){
> + if(news1o[i]>s2o[i])
> + s[i]<-1
> + else
> + s[i]<--1
> + }

You might give ifelse() a shot here. 
s <- ifelse(news1o > s2o, 1, -1)

Learning to think in vectors is important in R, just like thinking in sets 
is important for SQL, or thinking in rows and steps is important in SAS.

cur
-- 
Curt Seeliger, Data Ranger
Raytheon Information Services - Contractor to ORD
seeliger.curt@epa.gov
541/754-4638
	[[alternative HTML version deleted]]

