get_juiced_data {healthyR.ai} | R Documentation |
Get the Juiced Data
Description
This is a simple function that will get the juiced data from a recipe.
Usage
get_juiced_data(.recipe_object)
Arguments
.recipe_object |
The recipe object you want to pass. |
Details
Instead of typing out something like:
recipe_object %>% prep() %>% juice() %>% glimpse()
Value
A tibble of the prepped and juiced data from the given recipe
Author(s)
Steven P. Sanderson II, MPH
See Also
Other Data Generation:
generate_mesh_data()
Examples
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)
[Package healthyR.ai version 0.1.1 Index]