Skip to content

Commit

Permalink
get_SDA_interpretation: update simplified rule names to retain inequa…
Browse files Browse the repository at this point in the history
…lity information

 - Updates `.cleanRuleColumnName()`
 - note that this will add several characters to calculated column names for several `mrulename`, most of which are state-specific
  • Loading branch information
brownag committed Oct 27, 2023
1 parent 63f9083 commit 780295f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/get_SDA_interpretation.R
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ get_SDA_interpretation <- function(rulename,
)
}

.cleanRuleColumnName <- function(x) gsub("[^A-Za-z0-9]", "", x)
.cleanRuleColumnName <- function(x) gsub("[^A-Za-z0-9]", "", gsub(">", "GT", gsub("<", "LT", gsub("=", "EQ", x, fixed = TRUE), fixed = TRUE), fixed = TRUE))

.interpretation_by_condition <- function(interp, where_clause, dominant = TRUE, sqlite = FALSE) {
aggfun <- "STRING_AGG(CONCAT(rulename, ' \"', interphrc, '\" (', interphr, ')'), '; ')"
Expand Down

0 comments on commit 780295f

Please sign in to comment.