Skip to content

create tibble with numeric(0) doesn't give same result as NULL column #1569

Open
@xtimbeau

Description

@xtimbeau

When creating a tibble with a NULL column no column is created. If the column is a numeric(0) vector, thant the tibble has no line (but the column is created). I may have missed the logic or a previous issue.

library(tibble)
# gives a one line tibble with one column
tibble(a=1, b=NULL)
# gives an empty tibble (surprinsingly and I'd prefer solution 1)
tibble(a=1, b=numeric(0))

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions