I updated the latest version of r language today. I find that I cannot draw graph use ggtern package. The wrong message is :":geom_point requires the following missing aesthetics: x and y.'' But I have defined x and y variables , I don't know how to fix it.
> ggtern(data=data.frame(x=2,y=4,z=3))+geom_point()
错误: geom_point requires the following missing aesthetics: x and y
Run `rlang::last_error()` to see where the error occurred.
> rlang::last_error()
<error/rlang_error>
geom_point requires the following missing aesthetics: x and y
Backtrace:
1. (function (x, ...) ...
2. ggtern:::print.ggplot(x)
4. ggtern:::ggplot_build.ggplot(x)
5. ggtern:::by_layer(function(l, d) l$compute_geom_1(d))
6. ggtern:::f(l = layers[[i]], d = data[[i]])
7. l$compute_geom_1(d)
8. ggplot2:::f(..., self = self)
9. ggplot2:::check_required_aesthetics(...)
Run `rlang::last_trace()` to see the full context.
>rlang::last_trace()
<error/rlang_error>
geom_point requires the following missing aesthetics: x and y
Backtrace:
x
1. +-(function (x, ...) ...
2. \-ggtern:::print.ggplot(x)
3. +-ggtern::ggplot_build(x)
4. \-ggtern:::ggplot_build.ggplot(x)
5. \-ggtern:::by_layer(function(l, d) l$compute_geom_1(d))
6. \-ggtern:::f(l = layers[[i]], d = data[[i]])
7. \-l$compute_geom_1(d)
8. \-ggplot2:::f(..., self = self)
9. \-ggplot2:::check_required_aesthetics(...)