powered by
Predict method for an object of class "flashlight". Pass additional elements to update the flashlight, typically data.
data
# S3 method for flashlight predict(object, ...)
A vector with predictions.
An object of class "flashlight".
Arguments used to update the flashlight.
fit <- lm(Sepal.Length ~ ., data = iris) fl <- flashlight(model = fit, data = iris, y = "Sepal.Length", label = "ols") predict(fl)[1:5] predict(fl, data = iris[1:5, ])
Run the code above in your browser using DataLab