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
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# readODS 2.05

## Reverse the decision to deprecate `ods_sheets`

See discussion #133

# readODS 2.04

## `col_types` can be character ("shorthand") or list
Expand Down
10 changes: 4 additions & 6 deletions R/list_ods_sheets.R
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#' Get information in an (F)ODS File
#'
#' `list_(f)ods_sheets` lists all sheets in an (f)ods file.
#'
#'
#' `list_(f)ods_sheets` lists all sheets in an (f)ods file.
#'
#' @param path Path to the (f)ods file
#' @param include_external_data A boolean value to show or hide sheets containing archived linked data (default false)
#' @return For `list_(f)ods_sheets`, a character vector of sheet names; for `get_num_sheets_in_(f)ods`, the total number of sheets
#' @details `ods_sheets` will be removed in the next major version. It was kept for backward compatibility. Please use `list_ods_sheet`
#' instead. The default "include_external_data" for `ods_sheets` is TRUE to maintain compatibility with version 1 of readODS.
#' @details The default "include_external_data" for `ods_sheets` is TRUE to maintain compatibility with version 1 of readODS. It will change to `TRUE` in version 3.
#' @author Peter Brohan <peter.brohan+cran@@gmail.com>, Chung-hong Chan <chainsawtiney@@gmail.com>, Gerrit-Jan Schutten <phonixor@@gmail.com>
#' @examples
#' \dontrun{
Expand All @@ -31,6 +30,5 @@ list_fods_sheets <- function(path, include_external_data = FALSE) {
#' @rdname list_ods_sheets
#' @export
ods_sheets <- function(path) {
warning("ods_sheets will be deprecated in the next major version. Use `list_ods_sheets` instead.")
list_ods_sheets(path, include_external_data = TRUE)
}
4 changes: 2 additions & 2 deletions tests/testthat/test_list_sheets.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ test_that("fods works as well", {
c("Sheet1", "Sheet2"))
})

test_that("keep `ods_sheets` #131", {
expect_warning(y <- ods_sheets("../testdata/linkeddata.ods"))
test_that("keep `ods_sheets` #131 #133", {
expect_silent(y <- ods_sheets("../testdata/linkeddata.ods"))
expect_equal(y,
c("Own",
"contains_linked_data",
Expand Down