geom_abline does not show a line

Hi all I have used following code to draw a plot. But Geom abline won't appear.

r<-cor(is.na(bmi$HT),is.na(bmi$WT))

bmi %>% ggplot(aes(HT,WT)) + geom_point(alpha=0.5) + geom_abline(intercept=0,slope=r)

What I got isRplot

Please help

If you calculate the value of r*160, I think you will find that the value does not lie within the displayed y values.

This topic was automatically closed 21 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.