Convert an R logical expression into a JS ternary expression
js_ifelse.Rd
Convert an R logical expression into a JS ternary expression
Arguments
- condition
An R logical expression (supports %in% / %notin% / grepl() / comparisons / & |)
- if_true
String to return when the condition is TRUE. Default is an empty string, which interprets as
null
in JS.- if_false
String to return when the condition is FALSE. Default is an empty string, which interprets as
null
in JS.