# Load data
silo_data <- silo71
empty_diff_path <- system.file("extdata/staggered", "empty_diff_df.csv",
package = "undidR")
# Run `undid_stage_two()`
results <- undid_stage_two(
empty_diff_filepath = empty_diff_path,
silo_name = "71",
silo_df = silo_data,
time_column = "year",
outcome_column = "coll",
silo_date_format = "yyyy"
)
# View results
head(results$diff_df)
head(results$trends_data)
# Clean up temporary files
unlink(file.path(tempdir(), c("diff_df_71.csv",
"trends_data_71.csv")))
Run the code above in your browser using DataLab