Closed sannegovaert closed 6 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 85.60%. Comparing base (
9279121
) to head (936a361
).:exclamation: Current head 936a361 differs from pull request most recent head fe5d32e. Consider uploading reports for the commit fe5d32e to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Does this help Sanne?
str_replace_na <- function(string, replacement = ""){
string[is.na(string)] <- replacement
return(string)
}
c("a", NA, "c") |> str_replace_na(replacement = "") |> paste0(collapse = " ")
#> [1] "a c"
Does this help Sanne?
str_replace_na <- function(string, replacement = ""){ string[is.na(string)] <- replacement return(string) } c("a", NA, "c") |> str_replace_na(replacement = "") |> paste0(collapse = " ") #> [1] "a c"
I don't think it would fix the problem in this case. It was using coalesce()
and paste()
together that didn't work.
So I solved it differenlty, thought less elegantly, with ifelse()
and is.na()
.
I fixed the requested changes :-)
Fixing #61
dplyr::mutate()