Skip to contents

This function calculates the barrier result for PSCIS data based on the crossing type and final score.

Usage

fpr_xfm_paw_barrier_result(
  dat,
  col_crossing_type = crossing_type,
  col_final_score = final_score,
  col_barrier_result = barrier_result,
  risk_low_value = 15,
  risk_high_value = 19
)

Arguments

dat

[dataframe] A dataframe containing the PSCIS data.

col_crossing_type

[character] A column name specifying the crossing type. Default is `crossing_type`.

col_final_score

[character] A column name specifying the final score. Default is `final_score`.

col_barrier_result

[character] A column name for the output barrier result. Default is `barrier_result`.

risk_low_value

[numeric] A numeric value representing the lower threshold for low-risk final scores. Default is `15`.

risk_high_value

[numeric] A numeric value representing the upper threshold for moderate-risk final scores. Default is `19`.

Value

[dataframe] A dataframe with the specified column for barrier result added or updated.

Examples

dat <- data.frame(
  crossing_type = c("Open Bottom Structure", "Other", NA, "", "Other"),
  final_score = c(10, 16, 25, NA, 18)
)
fpr_xfm_paw_barrier_result(dat)
#>           crossing_type final_score barrier_result
#> 1 Open Bottom Structure          10       Passable
#> 2                 Other          16        Unknown
#> 3                  <NA>          25               
#> 4                                NA               
#> 5                 Other          18        Unknown