diff --git a/R/api.R b/R/api.R index 75fc64f..3c3bb37 100644 --- a/R/api.R +++ b/R/api.R @@ -179,7 +179,7 @@ format.profile_data <- function(x, ...) { #' } dm_from_profile <- function(x) { stopifnot(inherits(x, "profile_data")) - stopifnot(rlang::is_installed("dm")) + check_installed("dm") samples <- x$samples locations <- x$locations diff --git a/R/proto.R b/R/proto.R index abf5ec1..9149fbf 100644 --- a/R/proto.R +++ b/R/proto.R @@ -1,8 +1,5 @@ provide_proto <- function() { - if (!is_installed("RProtoBuf")) { - abort("Package RProtoBuf is required to read pprof files.") - } - + check_installed("RProtoBuf") install_proto_files() }