Skip to content

returned data tables sometimes don't print output #129

@sbfnk

Description

@sbfnk

See https://cran.r-project.org/web/packages/data.table/vignettes/datatable-faq.html#why-do-i-have-to-type-dt-sometimes-twice-after-using-to-print-the-result-to-console

Reproducible example:

range_example_wide <- data.table::setDT(scoringutils::range_example_data_wide)
range_example <- scoringutils::range_wide_to_long(range_example_wide)

Typing range_example afterwards does not print the contents of the data frame. Typing it again does.

Solution is to explicitly call DT[] before returning any data.table that has been modified using :=.

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