Skip to content

Inconsistent NA-handling between separate_longer_delim() and separate_longer_position() #1625

@etiennebacher

Description

@etiennebacher

In the example below, I suppose separate_longer_position() should also return NA when the input is NA:

library(tidyr)
df <- data.frame(x = c("ab,cd", NA))

separate_longer_delim(df, x, delim = ",")
#>      x
#> 1   ab
#> 2   cd
#> 3 <NA>

separate_longer_position(df, x, width = 2)
#> Error in seq.default(1, max_length, by = width): 'to' must be a finite number

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