You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
lapply can't handle the IDate class (but apply can) #1315
The issue seems to be somewhere in converting from a plain vector to a list.
Compare:
sapply(as.IDate("2015-05-03"), identity)
# Error in as.Date.default(x, ...) :
do not know how to convert 'x' to class “Date”
traceback()
#10: stop(gettextf("do not know how to convert '%s' to class %s",
# deparse(substitute(x)), dQuote("Date")), domain = NA)
#9: as.Date.default(x, ...)
#8: as.Date(x, ...)
#7: as.IDate(as.Date(x, ...))
#6: as.IDate.default(NextMethod())
#5: as.IDate(NextMethod())
#4: as.list.IDate(X)
#3: as.list(X)
#2: lapply(X = X, FUN = FUN, ...)
#1: sapply(as.IDate("2015-05-03"), identity)
Activity
[-]`sapply` can't handle the `IDate` class[/-][+]`lapply` can't handle the `IDate` class (but `apply` can)[/+]