From 2dcc5a5a552a20c15c4fa79a71ec94cc88126133 Mon Sep 17 00:00:00 2001 From: Mike Mastanduno Date: Wed, 12 Dec 2018 10:56:56 -0700 Subject: [PATCH] Fixed a bug with R-dev --- DESCRIPTION | 3 --- R/variable_importance.R | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 2f2f2bc2f..b04319254 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -45,9 +45,6 @@ Suggests: testthat, lintr, covr -Remotes: - topepo/caret/pkg/caret, - tidymodels/recipes URL: http://docs.healthcare.ai BugReports: https://github.com/HealthCatalyst/healthcareai-r/issues Encoding: UTF-8 diff --git a/R/variable_importance.R b/R/variable_importance.R index 96a7a677e..db6dbb958 100644 --- a/R/variable_importance.R +++ b/R/variable_importance.R @@ -31,7 +31,7 @@ plot.variable_importance <- function(x, print = TRUE, ... ) { - if ( (is.data.frame(x) && names(x) != c("variable", "importance") ) || + if ( (is.data.frame(x) & names(x) != c("variable", "importance") ) || !is.data.frame(x)) stop("x must be a data frame from get_variable_importance, or at least look like one!")