update_types: Update data types after parsing to dataframe

Description Usage Arguments Examples

View source: R/parsing.R

Description

Modify inconsistent data types

Usage

1
update_types(df, dictionary = NULL)

Arguments

df

the output of parse_list_to_df

dictionary

dictionary to interpret

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
df <- dplyr::tibble(
  z = c("1", "2", "3"),
  x = c(9, 8, 7), f = "a"
)
dictionary <- list(
  "numeric" = c("x", "z"),
  "character" = c("m", "f")
)
update_types(df, dictionary)

## End(Not run)

bweiher/pelotonR documentation built on Jan. 9, 2021, 1:36 a.m.