Skip to content

s4 objects in j groups are wrong #4415

Description

@MichaelChirico

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions