Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: readODS
Type: Package
Title: Read and Write ODS Files
Version: 2.2.0.999
Version: 2.2.0.9999
Authors@R:
c(person("Gerrit-Jan", "Schutten", role = c("aut"), email = "[email protected]"),
person("Chung-hong", "Chan", role = c("aut", "cre"), email = "[email protected]", comment = c(ORCID = "0000-0002-6232-7530")),
Expand All @@ -25,7 +25,7 @@ URL: https://docs.ropensci.org/readODS/, https://github.com/ropensci/readODS
BugReports: https://github.com/ropensci/readODS/issues
Imports:
cellranger,
readr (>= 1.2.1),
minty,
stringi,
tibble,
vctrs (>= 0.4.2),
Expand All @@ -40,7 +40,8 @@ Suggests:
covr,
knitr,
rmarkdown,
withr
withr,
readr (>= 1.2.1)
License: GPL-3
RoxygenNote: 7.2.3
Roxygen: list(markdown = TRUE)
Expand Down
13 changes: 1 addition & 12 deletions R/read_ods.R
Original file line number Diff line number Diff line change
Expand Up @@ -139,22 +139,11 @@
return(data.frame())
}

.type_convert <- function(df, col_types = NULL, verbose = TRUE, na = c("", "NA"), trim_ws = TRUE) {
if (verbose) {
res <- readr::type_convert(df = df, col_types, na = na)
} else {
suppressMessages({
res <- readr::type_convert(df = df, col_types, na = na, trim_ws = trim_ws)
})
}
return(res)
}

.handle_col_types <- function(res, col_types, verbose, na, trim_ws) {
if (isTRUE(is.na(col_types)) || nrow(res) == 0) {
return(res)
}
.type_convert(df = res, col_types = col_types, verbose = verbose, na = na, trim_ws = trim_ws)
minty::type_convert(df = res, col_types = col_types, verbose = verbose, na = na, trim_ws = trim_ws)
}

## standardise `sheet` parameter as a number, i.e. sheet_index
Expand Down