Is there a way to identify (means: show the observation number) some points in a Scatterplot (using qplot()) such as identify does for plot()?
Best regards, Sarah
Try this modified from the link I provided above
dat <- data.frame(x = rnorm(10), y = rnorm(10), label = seq(1:10))
ggplot(dat, aes(x,y)) + geom_point() +
geom_text(data = dat, aes(x,y, label = label), hjust = 2)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With