Skip to content

Commit

Permalink
Oops! Forgot a condition and test didn't catch
Browse files Browse the repository at this point in the history
  • Loading branch information
mhweber committed Sep 20, 2024
1 parent f719bb9 commit cde71dd
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions R/sc_get_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,15 @@ sc_get_data <- function(metric = NULL,
# Transform the string response into a data frame.
readr::read_csv()
# Temporary fix for ShowAreaSqKm
if (showAreaSqKm==FALSE & 'WSAREASQKM' %in% colnames(df)){
df <- df |>
dplyr::select(-WSAREASQKM)
}
if (showAreaSqKm==FALSE & 'WSAREASQKMRP100' %in% colnames(df)){
df <- df |>
dplyr::select(-WSAREASQKMRP100)
if (!is.null(showAreaSqKm)){
if (showAreaSqKm==FALSE & 'WSAREASQKM' %in% colnames(df)){
df <- df |>
dplyr::select(-WSAREASQKM)
}
if (showAreaSqKm==FALSE & 'WSAREASQKMRP100' %in% colnames(df)){
df <- df |>
dplyr::select(-WSAREASQKMRP100)
}
}
# End of function. Return a data frame.
return(df)
Expand Down

0 comments on commit cde71dd

Please sign in to comment.