Skip to content

Commit

Permalink
update param in use_data & related test for default version 3
Browse files Browse the repository at this point in the history
  • Loading branch information
laurabrianna committed Aug 15, 2024
1 parent 3568ae0 commit 65e3c51
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#' files. If you really want to do so, set this to `TRUE`.
#' @param compress Choose the type of compression used by [save()].
#' Should be one of "gzip", "bzip2", or "xz".
#' @param version The serialization format version to use. The default, 2, was
#' the default format from R 1.4.0 to 3.5.3. Version 3 became the default from
#' R 3.6.0 and can only be read by R versions 3.5.0 and higher.
#' @param version The serialization format version to use. The default, 3, can
#' only be read by R versions 3.5.0 and higher. For R 1.4.0 to 3.5.3, use
#' version 2.
#' @inheritParams base::save
#'
#' @seealso The [data chapter](https://r-pkgs.org/data.html) of [R
Expand Down
6 changes: 3 additions & 3 deletions man/use_data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions tests/testthat/test-data.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ test_that("use_data() honors `overwrite` for internal data", {
expect_identical(letters2, rev(letters))
})

test_that("use_data() writes version 2 by default", {
test_that("use_data() writes version 3 by default", {
create_local_package()

x <- letters
use_data(x, internal = TRUE, version = 2, compress = FALSE)
use_data(x, internal = TRUE, compress = FALSE)
expect_identical(
rawToChar(readBin(proj_path("R", "sysdata.rda"), n = 4, what = "raw")),
"RDX2"
"RDX3"
)
})

Expand Down

0 comments on commit 65e3c51

Please sign in to comment.