View source: R/f - As integer.R
f_as_integer | R Documentation |
Converts data frame columns of type character to integers.
f_as_integer(df.input, v.col, c.id)
df.input |
Data frame with columns you want to convert from char to integer. |
v.col |
Names of columns you want to convert from char to integer. |
c.id |
Column name with unique identifier for each row. This is used to report on parsing errors. |
-
Data frame with updated columns.
Pieter Overdevest
df.output <- f_as_integer(
df.input = tibble(id = c("A", "B"), id.product = c("1", "2"), id.variant = c("32", "45")),
v.col = c("id.product", "id.variant"),
c.id = "id"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.