limiting dependencies

This commit is contained in:
Andreas Gammelgaard Damsbo 2025-04-23 14:24:07 +02:00
commit 2d35001c33
No known key found for this signature in database
4 changed files with 46 additions and 41 deletions

View file

@ -87,7 +87,7 @@ read_input <- function(file, consider.na = c("NA", '""', "")) {
if (ext == "csv") {
df <- readr::read_csv(file = file, na = consider.na)
} else if (ext %in% c("xls", "xlsx")) {
df <- openxlsx2::read_xlsx(file = file, na.strings = consider.na)
df <- readxl::read_excel(file = file, na.strings = consider.na)
} else if (ext == "dta") {
df <- haven::read_dta(file = file)
} else if (ext == "ods") {
@ -428,7 +428,7 @@ sort_by <- function(x, y, na.rm = FALSE, ...) {
get_ggplot_label <- function(data, label) {
assertthat::assert_that(ggplot2::is.ggplot(data))
assertthat::assert_that(ggplot2::is_ggplot(data))
data$labels[[label]]
}