stat_regline_Linear equation decimal digits

In my Linear equation showing y= -200000+15x, I want more 3 digit after 15. Would you please see how can I can do that?

Thank You!

Codes
ggplot(BancroftLand, aes(SellDate, PricePerDU))+
geom_point(size=5, shape=16, color = 'green')+
geom_smooth(aes(color = "Linear Trend"), method = "lm", formula = y~poly(x,1), se = F) +
geom_smooth(aes(color = "3rd Order Trend"), method = "lm", formula = y~poly(x,3), se = F) +
theme_economist() +
coord_cartesian(ylim = c(0, 260000)) +
stat_regline_equation(label.y=255000, color = 'blue')+
stat_regline_equation( ## Fit polynomial regression line and add labels
aes(label = paste(..eq.label.., sep = "~~~~")),
formula = y~poly(x,3), se = F, color = 'red'
)

dput(head(BancroftLand))
structure(list(ted = c(1, 2, 3, 4, 5, 6), SellDate = structure(c(15856,
19023, 16493, 18039, 16874, 17281), class = "Date"), PricePerDU = c(52091.8367346939,
247126.436781609, 88570.7070707071, 77822.5806451613, 40104.1666666667,
54687.5), APricePerDU = c(106271.086734694, 252628.896781609,
132959.267070707, 98449.1206451613, 78636.7566666667, 86964.5
)), row.names = c(NA, -6L), class = c("tbl_df", "tbl", "data.frame"

Looking for an answer from expert, please

Sorry, no expert but when I get the plot to work do you want the equation

y  =  820000 + 53 x

to look like

y  = 820000 + 53.000

Your dput() is missing the last two ) and we need to load these libraries:

library(ggplot2)
library(ggthemes)
library( ggpubr)

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.