Displaying 1 result from an estimated 1 matches for "specialweeks".
2011 Apr 05
1
Value between which elements of a vector?
Dear R-useRs,
I am looking for a why to perform the following:
specialweeks<-c(0,2,5,12,18,19,20)
weeks<-c(1:30)
Now I would like that for every week it is even between which elements of
vector special weeks it is.
For weeks after 20, the value NA or 20, or even 20-30is fine.
Thus for
week 1: 0-2
week 2: 2-5
week 3: 2-5
week 4: 2-5
week 5: 5-12
ect....
It is no...