ColumnConvert | R Documentation |
Convert columns of a data frame to their desired types. Columns in
source data frame are all of type character
.
ColumnConvert(Data, Converter, Format, Locale)
Data |
A data frame with columns to cast types |
Converter |
A list (see details) |
Format |
A list of formats (see details) |
Locale |
A locale that can be used in case format is missing |
Valid converters: date, time, datetime, character, factor, logical, number,
double, integer. Long and short names are allowed (see vroom::cols()
).
NULL
drops a column. Everything else will be guessed by readr::parse_guess()
.
The types date, time, and datetime support a Format
specification.
If none is available the Locale
is used.
A data frame with changed column data types
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.