Skip to content

Commit

Permalink
Account for partial matching of predictor variables (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
pat-s authored May 24, 2020
1 parent f5f2388 commit 590928f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/helper_funs.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ gam_to_df <- function(model = NULL, pred = NULL) {
plot_df <- no_plot(model) # nolint

# get list index of spec. predictor
set_pred <- which(grepl(pred, plot_df))
set_pred <- grep(paste0("\\b", pred, "\\b"), plot_df)

df <- data.frame(
x = plot_df[[set_pred]]$x,
Expand Down

0 comments on commit 590928f

Please sign in to comment.