Dealing with change in a dependency
You could make your package work with both new and old versions.
your_existing_function <- function(..., cool_new_feature = FALSE) {
if (isTRUE(cool_new_feature) && packageVersion("otherpkg") < "1.0.0") {
message("otherpkg >= 1.0.0 is needed for cool_new_feature")
cool_new_feature <- FALSE
}
# the rest of the function
}
your_new_function <- function(...) {
if (packageVersion("otherpkg") < "1.0.0") {
stop("otherpkg >= 1.0.0 needed for this function.")
}
# the rest of the function
}