Create a new mutate branch.

mutate_branch(..., name = NULL)

Arguments

...

branch definition expressions.

name

(optional) Name for the new variable.

Value

a mutate_branch object.

See also

Other mutate branch functions: add_mutate_branch()

Examples

# Define mutate branches.
hurricane_strength <- mutate_branch(
  # damage vs. wind speed vs.pressure
  NDAM,
  HighestWindSpeed,
  Minpressure_Updated_2014,
  # Standardized versions
  scale(NDAM),
  scale(HighestWindSpeed),
  -scale(Minpressure_Updated_2014),
)
# Create a mverse and add the branch.
mv <- create_multiverse(hurricane) %>%
  add_mutate_branch(hurricane_strength)