Skip to content

add_column() with zero-row data frame #167

@krlmlr

Description

@krlmlr

The following still doesn't work as expected:

add_column(iris[0, ], a = character(), b = 1)
## Error: Variables must be length 1 or 1.
## Problem variables: 'a'

I'd expect the result to be a zero-row data frame with two new columns a (character) and b (numeric).

I suspect we need a special case for zero-row input. @LaDilettante: Would you mind taking a look?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviorcategory:interface

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions