mayer79 / flashlight

Machine learning explanations
https://mayer79.github.io/flashlight/
GNU General Public License v2.0
22 stars 4 forks source link

light_profile by clause not working #62

Closed knjenga closed 7 months ago

knjenga commented 7 months ago

when using the light_profile function the by option only works when one variable is entred, when more than one variable is used the error listed bellow is displayed. Previously one could enter multiple rows and get a data frame that has predictions based on the desired variables.   fit <- lm(Sepal.Length ~ ., data = iris) fl <- flashlight(model = fit, label = "iris", data = iris, y = "Sepal.Length")

light_profile(fl, v = "Petal.Length", by = c("Species","Sepal.Width"), type = 'predicted')

Error in nm %in% nms && !is.null(x[[nm]]) && !(x[[nm]] %in% colnames(x$data)) : 'length = 2' in coercion to 'logical(1)'

mayer79 commented 7 months ago

I will soon have a look at it, thanks.

mayer79 commented 7 months ago

Fixed in https://github.com/mayer79/flashlight/pull/63

Thanks for reporting!