# Load the Jack-o'-Lantern data
data <- jackolantern_surreal_data
# Fit a linear model to the surreal Jack-o'-Lantern data
model <- lm(y ~ ., data = data)
# Plot the residuals to reveal the hidden image
plot(model$fitted, model$resid, type = "n", main = "Residual plot from transformed data")
points(model$fitted, model$resid, pch = 16)
Run the code above in your browser using DataLab