Skip to content

Commit

Permalink
for tibble this line gave a warning, so it is safer to refer through …
Browse files Browse the repository at this point in the history
…`names()` functions
  • Loading branch information
pbiecek committed Jan 13, 2023
1 parent 72163b3 commit f061a70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/show_observations.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ show_observations <- function(x, ...,
data.frame(`_x_` = all_observations[[var]],
`_vname_` = var,
`_yhat_` = all_observations$`_yhat_`,
`_y_` = if (is.null(all_observations$`_y_`)) NA else all_observations$`_y_`,
`_y_` = if ("_y_" %in% names(all_observations)) all_observations$`_y_` else NA,
`_color_` = if (!is_color_points_a_variable) NA else {
if (color == "_vname_") var else all_observations[[color]]
},
Expand Down

0 comments on commit f061a70

Please sign in to comment.