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