Skip to content

Commit

Permalink
fix usage warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mllg committed Sep 23, 2020
1 parent 6b17620 commit 1887237
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion R/LearnerClasssifRpart.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ autoplot.LearnerClassifRpart = function(object, ...) { # nolint

require_namespaces(c("partykit", "ggparty"))
autoplot(partykit::as.party(object$model), ...) +
ggparty::geom_node_label(aes(label = paste0("n=", nodesize)), nudge_y = 0.03, ids = "terminal")
ggparty::geom_node_label(aes(label = paste0("n=", .data[["nodesize"]])), nudge_y = 0.03, ids = "terminal")
}
2 changes: 1 addition & 1 deletion R/LearnerRegrRpart.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ autoplot.LearnerRegrRpart = function(object, ...) { # nolint
coord_flip(),
theme(axis.ticks.x = element_blank(), axis.text.x = element_blank())
)) +
ggparty::geom_node_label(aes(label = paste0("n=", nodesize)), nudge_y = 0.03, ids = "terminal")
ggparty::geom_node_label(aes(label = paste0("n=", .data[["nodesize"]])), nudge_y = 0.03, ids = "terminal")
}
2 changes: 1 addition & 1 deletion R/as_precrec.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ as_precrec = function(object) {


roc_data = function(prediction) {
prediction = as_prediction(prediction)
prediction = mlr3::as_prediction(prediction)
if (nlevels(prediction$truth) != 2L) {
stopf("Need a binary classification problem to plot a ROC curve")
}
Expand Down
2 changes: 1 addition & 1 deletion man/autoplot.LearnerClassifRpart.Rd

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

0 comments on commit 1887237

Please sign in to comment.