Learn R Programming

tidysynthesis (version 0.1.2)

add_sequence_factor: Add to visit sequence for factor variables

Description

Add to visit sequence for factor variables

Usage

add_sequence_factor(roadmap, ..., method = c("entropy", "gini"))

Value

An updated visit_sequence

Arguments

roadmap

A roadmap object

...

<tidy-select> One or more unquoted expressions separated by commas. Variable names can be used as if they were positions in the data frame, so expressions like x:y can be used to select a range of variables.

method

A quoted name for the method used to sort the visit_sequence. Current methods include "entropy" and "gini".

Examples

Run this code

roadmap(
  conf_data = acs_conf_nw, 
  start_data = acs_start_nw
) |>
  add_sequence_factor(dplyr::where(is.factor), method = "gini")

Run the code above in your browser using DataLab