Skip to content

Commit

Permalink
Merge pull request #26 from saferactive/fix-tc_upset-example
Browse files Browse the repository at this point in the history
Fix #25
  • Loading branch information
Robinlovelace committed Jul 17, 2020
2 parents bce0785 + 1f305c3 commit 80c1bda
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
12 changes: 11 additions & 1 deletion R/upset.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,17 @@
#' TRUE ~ "Other"
#' )
#' )
#' crash_summary = tc_join_stats19(crashes_wf, casualties_wf2, vehicles_wf)
#' table(casualties_wf2$casualty_type_simple)
#' table(vehicles_wf$vehicle_type)
#' vehicles_wf2 = dplyr::mutate(
#' vehicles_wf,
#' vehicle_type_simple = dplyr::case_when(
#' vehicle_type == "Car" ~ "Car",
#' vehicle_type == "Bicycle" ~ "Pedal cycle",
#' TRUE ~ "Other"
#' )
#' )
#' crash_summary = tc_join_stats19(crashes_wf, casualties_wf2, vehicles_wf2)
#' tc_upset(crash_summary, casualty_type = c("Car", "Pedestrian", "Bicycle", "Other"))
tc_upset = function(crash_summary,
casualty_type = c(
Expand Down
11 changes: 10 additions & 1 deletion man/tc_upset.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 80c1bda

Please sign in to comment.