plot_121
plot 1 to 1 line to examine linearity
plot_121(df, xvar, yvar, color = NULL, labx = NULL, laby = NULL, ...)
a dataframe, include columns xvar and yvar
unquoted variable for colmun name for x axis, should be categorical
unquoted variable for column name for y axis, should be numeric
`NULL`, unquoted variable for colmun name for group
string for x axis title, default is xvar.
string for y axis title, default is yvar
a ggplot with 1:1 line
pacman::p_load(ggplot2,toolPhD,ggpmisc)
plot_121(iris,Sepal.Length,Petal.Length,color=Species)
plot_121(iris,Sepal.Length,Petal.Length)
#> Warning: Removed 2 rows containing missing values or values outside the scale range
#> (`geom_smooth()`).