Learn R Programming

mverse (version 0.2.3)

mutate_branch: Create a new mutate branch.

Description

Create a new mutate branch.

Usage

mutate_branch(..., name = NULL)

Value

a mutate_branch object.

Arguments

...

branch definition expressions.

name

(optional) Name for the new variable.

See Also

Other mutate branch functions: add_mutate_branch()

Examples

Run this code
# 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)

Run the code above in your browser using DataLab