-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #108 from nationalparkservice/sarah-dev
add documentation to generate_ll_from_utm
- Loading branch information
Showing
62 changed files
with
13,623 additions
and
3,730 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,7 +59,9 @@ Imports: | |
tidyselect, | ||
glue, | ||
sp, | ||
withr | ||
withr, | ||
cli, | ||
purrr | ||
RoxygenNote: 7.3.1 | ||
Suggests: | ||
knitr, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#' Remove empty tables from a list | ||
#' | ||
#' @param df_list A list of tibbles or dataframes. | ||
#' | ||
#' @return The same list but with empty tables removed. | ||
#' @export | ||
#' | ||
#' @examples | ||
#' | ||
#' test_list <- list(item_a = tibble::tibble, | ||
#' item_b = mtcars, | ||
#' item_c = iris) | ||
#' | ||
#' tidy_list <- removeEmptyTables(test_list) | ||
#' | ||
removeEmptyTables <- function(df_list) { | ||
non_empty_list <- purrr::compact(df_list) # Remove empty dataframes | ||
tables_removed <- setdiff(names(df_list), names(non_empty_list)) # Get names of removed dataframes | ||
|
||
# Warn about removed empty dataframes | ||
if (length(tables_removed) > 0) { | ||
warning(cli::pluralize("{length(tables_removed)} empty table{?s} {?was/were} omitted from dataset. Affected table{?s}: {paste(tables_removed, collapse = ", ")}")) | ||
} | ||
|
||
return(non_empty_list) | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.