General programming R

Hello,
I want to use the cc by order and not only the first value ? how to do this please?

cashoutflows[i]<-cc
(w <- c(1,2,3,4))
(cc <- ifelse(w<=3,-1800,-11000))

cashoutflows<- vector("numeric",300)
for(i in seq_along(frost)){
if( frost[i]==1 ){
i =i+1
cashoutflows[i]<-cc
}else{cashoutflows[i]==0
}
}

What is frost? Can you make post an example of the dataset?

this seems like a duplicate : Help please ! R programming basics ! vectors operations

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.