Displaying 1 result from an estimated 1 matches for "datey".
Did you mean:
date
2007 Sep 27
1
ifelse and dates do not work together: What workaround?
...provided.
ifelse(test, yes, no) is wonderful since it works well in a dataframe
but only if yes and no are something simple, such as a numeric vector.
But if yes and no are dates then it does not work.
My workaround was quite inelegant.
Instead of the elegance of
official.date<-ifelse(is.na(x),dateyes,dateno)
I resorted to conditional indexing.
official.date<-dateno #only apporopriate when x is not missing
official.date[is.na(x)]<-dateyes[is.na(x)]
Original thread:
On Sat, 3 Jun 2006, ivo welch wrote:
> I wonder if this is an intentional feature or an oversight.
These are documen...