Skip to content

parsing failure- read_fwf includes a column of NAs when told to ignore the column? #322

Description

@ajdamico

sorry if i'm misreading something. thanks!

library(readr)
fwf_sample <- system.file("extdata/fwf-sample.txt", package = "readr")
cat(read_lines(fwf_sample))

# works
read_fwf(fwf_sample, fwf_widths(c(2, 5, 3)),col_types='ddd')

# includes a column of NAs because the column contains data even though it was told to skip?
read_fwf(fwf_sample, fwf_widths(c(2, 5, 3)),col_types='d-d')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions