Skip to content

mutate(index = row_number()) fails on an empty frame (version 0.3.0.2) #762

@sbisaacson

Description

@sbisaacson

The command

mutate(frame, index = row_number())

fails if nrow(frame) == 0:

mutate(data.frame(a = numeric(0)), index = row_number())
## Error: upper value must be greater than lower value
mutate(data.frame(a = 1), index = row_number())
##   a index
## 1 1     1

Metadata

Metadata

Labels

bugan unexpected problem or unintended behavior

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions