Skip to content

Commit

Permalink
Merge branch 'pharmaR:master' into examples-metric
Browse files Browse the repository at this point in the history
  • Loading branch information
parmsam-pfizer committed Mar 22, 2023
2 parents db1b1e9 + 4bc6f95 commit 693e923
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
.DS_Store

vignettes
!vignettes/*.Rmd

inst/doc
docs

.Rproj.user
.Rhistory
.RData
.Ruserdata
.html
riskmetric.Rproj
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Type: Package
Title: Risk Metrics to Evaluating R Packages
Description: Facilities for assessing R packages against a number of metrics to
help quantify their robustness.
Version: 0.2.0
Version: 0.2.1
Authors@R: c(
person("R Validation Hub", role = c("aut"), email = "[email protected]"),
person("Doug", "Kelkhoff", role = c("aut"), email = "[email protected]"),
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# riskmetric 0.2.1

- Updates for S3 Method consistancy for `vec_cast` and `pillar_shift` per CRAN
comments.

# riskmetric 0.2.0

- We now have a Hex Logo! #233. Thanks to @AARON-CLARK.
Expand Down
2 changes: 1 addition & 1 deletion R/pkg_metric_error.R
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ format_assessment_message <- function(e, name, assessment) {
#' @importFrom pillar pillar_shaft new_pillar_shaft_simple style_na
#' @method pillar_shaft pkg_metric_error
#' @export
pillar_shaft.pkg_metric_error <- function(x) {
pillar_shaft.pkg_metric_error <- function(x, ...) {
pillar::new_pillar_shaft_simple(pillar::style_na(paste0(
"<",
gsub("pkg_metric_", "", class(x)[[1]]),
Expand Down
2 changes: 1 addition & 1 deletion R/pkg_ref_class_format.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ vec_ptype_abbr.pkg_ref <- function(x, ...) {
#' @importFrom vctrs vec_cast.character
#' @method vec_cast.character list_of_pkg_ref
#' @export
vec_cast.character.list_of_pkg_ref <- function(x, to) {
vec_cast.character.list_of_pkg_ref <- function(x, to, ...) {
vapply(x, "[[", character(1L), "name")
}

Expand Down
2 changes: 1 addition & 1 deletion R/vctrs_list_of_pkg_metric.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pillar_shaft.list_of_pkg_metric <- function(x, ...) {
#' @importFrom vctrs vec_cast.double
#' @method vec_cast.double list_of_pkg_metric
#' @export
vec_cast.double.list_of_pkg_metric <- function(x, to) {
vec_cast.double.list_of_pkg_metric <- function(x, to, ...) {
out <- vector("numeric", length(x))
is_error <- vapply(x, inherits, logical(1L), "pkg_metric_error")
out[is_error] <- NA_real_
Expand Down

0 comments on commit 693e923

Please sign in to comment.