Skip to content

Commit

Permalink
Merge pull request #336 from r-lib/f-181-is-vector
Browse files Browse the repository at this point in the history
- `is_vector_s3()` is no longer generic (#181).
  • Loading branch information
krlmlr authored Jul 23, 2021
2 parents a1623aa + d3cb81f commit 442b7df
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 21 deletions.
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ S3method(format_type_sum,default)
S3method(glimpse,data.frame)
S3method(glimpse,default)
S3method(glimpse,tbl)
S3method(is_vector_s3,default)
S3method(obj_print_data,pillar_vctr)
S3method(obj_print_footer,pillar_vctr)
S3method(obj_print_header,pillar_vctr)
Expand Down
16 changes: 3 additions & 13 deletions R/deprecated.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,15 @@ NULL

#' is_vector_s3()
#'
#' `is_vector_s3()` returns `TRUE` if an object represents an S3 vector.
#' The default implementation forwards to [vctrs::vec_is()].
#' `is_vector_s3()` forwards to [vctrs::vec_is()].
#'
#' @section Lifecycle:
#' `is_vector_s3()` is soft-deprecated, because [vctrs::vec_is()]
#' provides the same functionality based on a robust framework.
#' The generic will remain available for a while but is no longer used.
#' Users and implementers are encouraged to ensure that `vctrs::vec_is()`
#' is `TRUE` for their class.
#' `is_vector_s3()` is soft-deprecated and no longer generic,
#' use [vctrs::vec_is()] instead.
#'
#' @export
#' @rdname deprecated
is_vector_s3 <- function(x) {
deprecate_soft("1.4.4", "pillar::is_vector_s3()", "vctrs::vec_is()")

UseMethod("is_vector_s3")
}

#' @export
is_vector_s3.default <- function(x) {
vec_is(x)
}
10 changes: 3 additions & 7 deletions man/deprecated.Rd

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

0 comments on commit 442b7df

Please sign in to comment.