Skip to content

Commit

Permalink
Merge pull request #139 from alan-turing-institute/fix/132-purr-contains
Browse files Browse the repository at this point in the history
replace purrr::contains with purrr::has_element
  • Loading branch information
jack89roberts authored Jun 6, 2022
2 parents 19d7a82 + 193f6c6 commit 06e2f28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/dhist.R
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ is_dhist <- function(x, fast_check = TRUE) {
return(has_class_attr)
}
# Otherwise check structure
has_locations <- purrr::contains(attr(x, "name"), "locations")
has_masses <- purrr::contains(attr(x, "name"), "masses")
has_locations <- purrr::has_element(attr(x, "name"), "locations")
has_masses <- purrr::has_element(attr(x, "name"), "masses")
# Require list with correct class and presence of 1D numeric vector named
# elements "locations" and "masses"
return(has_class_attr
Expand Down

0 comments on commit 06e2f28

Please sign in to comment.