Parse a character vector.
parse_vector(x, collector, na = c("", "NA"), locale = default_locale(),
trim_ws = TRUE)
Character vector of elements to parse.
Column specification.
Character vector of strings to interpret as missing values. Set this
option to character()
to indicate no missing values.
The locale controls defaults that vary from place to place.
The default locale is US-centric (like R), but you can use
locale()
to create your own locale that controls things like
the default time zone, encoding, decimal mark, big mark, and day/month
names.
Should leading and trailing whitespace be trimmed from each field before parsing it?
Other parsers: col_skip
,
cols_condense
, cols
,
parse_datetime
, parse_factor
,
parse_guess
, parse_logical
,
parse_number
# NOT RUN {
x <- c("1", "2", "3", "NA")
parse_vector(x, col_integer())
parse_vector(x, col_double())
# }
Run the code above in your browser using DataLab