Я бы хотел добавить линию регрессии к моему графику.Без регрессии линии график gganimate работает должным образом, и когда я добавляю команду geom_smooth к обычному графику, она работает нормально.Я получаю только ошибку, когда пытаюсь добавить линию регрессии в график gganimate.
g <- ggplot(pdata, aes(x = ole, y = rsv)) +
geom_point(aes(color = region)) +
geom_smooth(aes(group = region, color = region), se = FALSE)
anim <- g + transition_states(region, transition_length = 3, state_length = 5)
anim
Я получаю сообщение об ошибке:
geom_smooth()` using method = 'loess' and formula 'y ~ x'
`geom_smooth()` using method = 'loess' and formula 'y ~ x'
Error in transform_path(all_frames, next_state, ease, params$transition_length[i], :
transformr is required to tween paths and lines