To plot the following in R with the ggvis
package,
the code is
mtcars %>%
ggvis(~wt, ~mpg, fill = ~factor(cyl)) %>%
layer_points() %>%
group_by(cyl) %>%
layer_model_predictions(model = "lm")
If I change the fill
to shape
in the above, there would be an error:
Error: Unknown properties: shape.
Did you mean: stroke?
Why? How to achieve the desired outcome?