Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
sentence structure
Source Link
user11422223
user11422223

In general, to provide your own formula you should use arguments x and y that will correspond to values you provided in ggplot() - in this case x will be interpreted as x.plot and y as y.plot. MoreYou can find more information about smoothing methods and formula you can find invia the help page of function stat_smooth() as it is the default stat used by geom_smooth().

ggplot(data,aes(x.plot, y.plot)) + stat_summary(fun.data=mean_cl_normal) + geom_smooth(method='lm', formula= y~x) 

If you are using the same x and y values that you supplied in the ggplot() call and need to plot the linear regression line then you don't need to use the formula inside geom_smooth(), just supply the method="lm".

ggplot(data,aes(x.plot, y.plot)) + stat_summary(fun.data= mean_cl_normal) + geom_smooth(method='lm') 

In general, to provide your own formula you should use arguments x and y that will correspond to values you provided in ggplot() - in this case x will be interpreted as x.plot and y as y.plot. More information about smoothing methods and formula you can find in help page of function stat_smooth() as it is default stat used by geom_smooth().

ggplot(data,aes(x.plot, y.plot)) + stat_summary(fun.data=mean_cl_normal) + geom_smooth(method='lm', formula= y~x) 

If you are using the same x and y values that you supplied in the ggplot() call and need to plot linear regression line then you don't need to use the formula inside geom_smooth(), just supply the method="lm".

ggplot(data,aes(x.plot, y.plot)) + stat_summary(fun.data= mean_cl_normal) + geom_smooth(method='lm') 

In general, to provide your own formula you should use arguments x and y that will correspond to values you provided in ggplot() - in this case x will be interpreted as x.plot and y as y.plot. You can find more information about smoothing methods and formula via the help page of function stat_smooth() as it is the default stat used by geom_smooth().

ggplot(data,aes(x.plot, y.plot)) + stat_summary(fun.data=mean_cl_normal) + geom_smooth(method='lm', formula= y~x) 

If you are using the same x and y values that you supplied in the ggplot() call and need to plot the linear regression line then you don't need to use the formula inside geom_smooth(), just supply the method="lm".

ggplot(data,aes(x.plot, y.plot)) + stat_summary(fun.data= mean_cl_normal) + geom_smooth(method='lm') 

In general, to provide your own formula you should use arguments x and y that will correspond to values you provided in ggplot() - in this case x will be interpreted as x.plot and y as y.plot. More information about smoothing methods and formula you can find in help page of function stat_smooth() as it is default stat used by geom_smooth().

ggplot(data,aes(x.plot, y.plot))+stat_summary + stat_summary(fun.data=mean_cl_normal) + geom_smooth(method='lm',formula=y~x formula= y~x) 

If you are using the same x and y values that you supplied in the ggplot() call and need to plot linear regression line then you don't need to use the formula inside geom_smooth(), just supply the method="lm".

ggplot(data,aes(x.plot, y.plot))+stat_summary + stat_summary(fun.data=mean_cl_normaldata= mean_cl_normal) + geom_smooth(method='lm') 

In general, to provide your own formula you should use arguments x and y that will correspond to values you provided in ggplot() - in this case x will be interpreted as x.plot and y as y.plot. More information about smoothing methods and formula you can find in help page of function stat_smooth() as it is default stat used by geom_smooth().

ggplot(data,aes(x.plot,y.plot))+stat_summary(fun.data=mean_cl_normal) + geom_smooth(method='lm',formula=y~x) 

If you are using the same x and y values that you supplied in the ggplot() call and need to plot linear regression line then you don't need to use the formula inside geom_smooth(), just supply the method="lm".

ggplot(data,aes(x.plot,y.plot))+stat_summary(fun.data=mean_cl_normal) + geom_smooth(method='lm') 

In general, to provide your own formula you should use arguments x and y that will correspond to values you provided in ggplot() - in this case x will be interpreted as x.plot and y as y.plot. More information about smoothing methods and formula you can find in help page of function stat_smooth() as it is default stat used by geom_smooth().

ggplot(data,aes(x.plot, y.plot)) + stat_summary(fun.data=mean_cl_normal) + geom_smooth(method='lm', formula= y~x) 

If you are using the same x and y values that you supplied in the ggplot() call and need to plot linear regression line then you don't need to use the formula inside geom_smooth(), just supply the method="lm".

ggplot(data,aes(x.plot, y.plot)) + stat_summary(fun.data= mean_cl_normal) + geom_smooth(method='lm') 
Source Link
Didzis Elferts
  • 99.2k
  • 17
  • 275
  • 207

In general, to provide your own formula you should use arguments x and y that will correspond to values you provided in ggplot() - in this case x will be interpreted as x.plot and y as y.plot. More information about smoothing methods and formula you can find in help page of function stat_smooth() as it is default stat used by geom_smooth().

ggplot(data,aes(x.plot,y.plot))+stat_summary(fun.data=mean_cl_normal) + geom_smooth(method='lm',formula=y~x) 

If you are using the same x and y values that you supplied in the ggplot() call and need to plot linear regression line then you don't need to use the formula inside geom_smooth(), just supply the method="lm".

ggplot(data,aes(x.plot,y.plot))+stat_summary(fun.data=mean_cl_normal) + geom_smooth(method='lm')