Description Usage Arguments See Also Examples
Add a Date Column to Position 1
1 | date_to_col(data, var = "date")
|
data |
A dataframe or tibble. |
var |
Character string of new column name. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | library(tidyverse)
test_data <-
tibble(Fruits =
c("Apples and pears",
"Citrus – oranges, grapefruits, mandarins and limes",
"Stone fruit – nectarines, apricots, peaches and plums",
"Tropical and exotic – bananas and mangoes",
"Berries – strawberries, raspberries, blueberries, kiwifruit and passionfruit")
)
# Datetime
datetime_to_col(data = test_data,
var = "test_datetime")
# Date
date_to_col(data = test_data,
var = "test_date")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.