View source: R/visit_sequence.R
| visit_sequence | R Documentation |
Generate a visit sequence.
visit_sequence(schema, weight_var = NULL, synthesize_weight = TRUE)
schema |
A |
weight_var |
A numeric weight for the weighted total ordering. |
synthesize_weight |
Boolean for if weight_var should be included in the visit sequence. |
A visit_sequence object.
df <- data.frame(
factor_var = c("1", "1", "2"),
vara = c(10000, 20000, 100000),
varb = c(300, 200, 100),
var_loss = c(1999999, 0, -1000000),
weight = c(1000, 1000, 2000)
)
start_df <- dplyr::select(df, factor_var)
schema1 <- schema(
conf_data = dplyr::select(df, -weight),
start_data = start_df
)
vs1 <- visit_sequence(
schema = schema1
)
schema2 <- schema(
conf_data = df,
start_data = start_df
)
vs2 <- visit_sequence(
schema = schema2,
weight_var = weight,
synthesize_weight = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.