Displaying 1 result from an estimated 1 matches for "dateno".
Did you mean:
daten
2007 Sep 27
1
ifelse and dates do not work together: What workaround?
....
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 documented prope...