create_meal_plan: Create a customisable meal plan

View source: R/create_meal_plan.R

create_meal_planR Documentation

Create a customisable meal plan

Description

create_meal_plan() expects a RecipeBook-class object as input. The available options for customizing the meal plan include; the days of the week and the meals ("Lunch" or "Dinner") to plan for, the method to use and whether to only use favourite recipes.

Usage

create_meal_plan(
  recipebook,
  which_days = weekdays(),
  which_meals = c("Lunch", "Dinner"),
  method = c("auto", "random"),
  fav_only = FALSE,
  set_last_eaten = TRUE
)

Arguments

recipebook

a RecipeBook-class object.

which_days

character() which days of the week to plan for, in the format "Mon"

which_meals

character() which meals to plan for, one of "Lunch" or "Dinner".

method

character() the method to use when creating a meal plan, one of "auto", or "random".

fav_only

logical() whether to only pick from favourite recipes.

set_last_eaten

logical() whether to record the that selected recipes were used for a meal plan today. This info is taken into account when optimising the meal planning algorithm if method is set to "auto".

Value

a RecipeBook-class object containing the created meal_plan.

Examples

recipebook <- create_meal_plan(recipebook_example)

meal_plan(recipebook)

dzhang32/autorecipes documentation built on April 15, 2022, 3:29 a.m.