Displaying 1 result from an estimated 1 matches for "condolots2_".
Did you mean:
condolots
2010 Feb 19
1
Subtracting one based on an If
...ts_ Returns:
1000 1001 1002 1003
3 1 1 3
What i want to do is to subtract 1 from the above for all cases where there
are more than one, so that CondoLots_ returns:
1000 1001 1002 1003
2 1 1 2
I have tried
for(i in 1:length(CondoLots_)){
ifelse(CondoLots_>1){
CondoLots2_<-CondoLots_-1
}
}
But it doesnt seem to work properly. I think this should be simple.
Thanks in advance.
JR
--
View this message in context: http://n4.nabble.com/Subtracting-one-based-on-an-If-tp1561047p1561047.html
Sent from the R help mailing list archive a...