FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

`rowwiseDT` with column of functions · Issue #7219 · Rdatatable/data.table · GitHub

rowwiseDT with column of functions #7219

Description

I'm trying to create a column with functions using rowwiseDT. This creates an error.

Debugging, I see the current implementation checks needs_list = lengths(body) != 1L. This check, while simple, misses out on functions (or more generally anything that needs to be wrapped in list).

Reprex:

data.table::rowwiseDT(
  x=, func=,
  1e3, \(x) x + 1,
  1e4, \(x) x + 1,
  1e5, \(x) x + 1,
  1e6, \(x) x + 1
)
#> Error in rbindlist(body): invalid type/length (closure/4) in vector allocation

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL