Skip to contents

Parse a character vector.

Usage

parse_vector(
  x,
  collector,
  na = c("", "NA"),
  locale = default_locale(),
  trim_ws = TRUE,
  .return_problems = FALSE
)

Arguments

x

Character vector of elements to parse.

collector

Column specification.

.return_problems

Whether to hide the problems tibble from the output

Value

a parsed vector

See also

Examples

x <- c("1", "2", "3", "NA")
parse_vector(x, col_integer())
#> [1]  1  2  3 NA
parse_vector(x, col_double())
#> [1]  1  2  3 NA