Skip to content

skip bug in read_lines and read_fwf if unpaired quotes in the data #991

Closed

Description

Functions read_lines() and read_fwf() don't behave correctly wrt skip parameter if there are unpaired double quotes (") in the data.

library(readr)
#> Warning: package 'readr' was built under R version 3.5.3
data <-
"a\"b
cde
f\"g
hij"
read_fwf(data, fwf_widths(1:2, LETTERS[1:2]), skip=1)
#> # A tibble: 1 x 2
#>   A     B    
#>   <chr> <chr>
#> 1 h     ij
read_lines(data, skip=1)
#> [1] "hij"

Created on 2019-04-15 by the reprex package (v0.2.1)

Created on 2019-04-15 by the reprex package (v0.2.1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions