Skip to content

Commit

Permalink
Never lower minimum R version via use_data()
Browse files Browse the repository at this point in the history
  • Loading branch information
jennybc committed Nov 20, 2024
1 parent da18b7c commit ffc33bd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,13 @@ use_data <- function(...,

objs <- get_objs_from_dots(dots(...))

if (version < 3) {
use_dependency("R", "depends", "2.10")
} else {
use_dependency("R", "depends", "3.5")
original_minimum_r_version <- pkg_minimum_r_version()
serialization_minimum_r_version <- if (version < 3) "2.10" else "3.5"
if (is.na(original_minimum_r_version) ||
original_minimum_r_version < serialization_minimum_r_version) {
use_dependency("R", "depends", minimum_to_support_serialization)
}

if (internal) {
use_directory("R")
paths <- path("R", "sysdata.rda")
Expand Down

0 comments on commit ffc33bd

Please sign in to comment.