readr (version 0.1.1)

problems: Retrieve parsing problems.

Description

Readr functions will only throw an error if parsing fails in an unrecoverable way. However, there are lots of potential problems that you might want to know about - these are stored in the problems attribute of the output, which you can easily access with this function.

Usage

problems(x)

Arguments

x
An data frame (from read_*) or a vector (from parse_*).

Value

  • A data frame with one row for each problem and four columns:
  • row,colRow and column of problem
  • expectedWhat readr expected to find
  • actualWhat it actually got

Examples

Run this code
x <- parse_integer(c("1X", "blah", "3"))
problems(x)

Run the code above in your browser using DataLab