View source: R/get-juiced-data.R
get_juiced_data | R Documentation |
This is a simple function that will get the juiced data from a recipe.
get_juiced_data(.recipe_object)
.recipe_object |
The recipe object you want to pass. |
Instead of typing out something like:
recipe_object %>% prep() %>% juice() %>% glimpse()
A tibble of the prepped and juiced data from the given recipe
Steven P. Sanderson II, MPH
Other Data Wrangling:
pca_your_recipe()
suppressPackageStartupMessages(library(timetk))
suppressPackageStartupMessages(library(dplyr))
suppressPackageStartupMessages(library(purrr))
suppressPackageStartupMessages(library(healthyR.data))
suppressPackageStartupMessages(library(rsample))
suppressPackageStartupMessages(library(recipes))
data_tbl <- healthyR_data %>%
select(visit_end_date_time) %>%
summarise_by_time(
.date_var = visit_end_date_time,
.by = "month",
value = n()
) %>%
set_names("date_col", "value") %>%
filter_by_time(
.date_var = date_col,
.start_date = "2013",
.end_date = "2020"
)
splits <- initial_split(data = data_tbl, prop = 0.8)
rec_obj <- recipe(value ~ ., training(splits))
get_juiced_data(rec_obj)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.