Another follow-up of #4131
j doesn't handle S4 objects properly:
library(data.table)
library(lubridate)
dt <- data.table(period_unit = c("days", "months", "weeks", "years"),
period_length = rep(1, times = 4))
dt[ , by = period_unit, do.call(.BY$period_unit, list(period_length))]
# period_unit V1
# 1: days 1d 0H 0M 0S
# 2: months 1d 0H 0M 0S
# 3: weeks 1d 0H 0M 0S
# 4: years 1d 0H 0M 0S
The days object has been cascaded to the other groups.
I think this is a duplicate of #1777, but I'm not sure; if so, I would close that one since I wrote this to be very direct & clear about the issue.
Another follow-up of #4131
jdoesn't handle S4 objects properly:The
daysobject has been cascaded to the other groups.I think this is a duplicate of #1777, but I'm not sure; if so, I would close that one since I wrote this to be very direct & clear about the issue.