Help please new to R

I am new to R Studio. Don’t know how to delete this post.

Examples

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.

The labelling provided by gghistogram is more annotative, where you would pick particular points to label, if you want the bin counts, then probably its not the right tool. Something like this

library(tidyverse)

#example data
set.seed(42)
(df <- tibble(
  scores=sample.int(100,1000,TRUE)
))
# histogram with text counts
ggplot(df, aes(scores)) +
  geom_histogram(bins = 8) + 
  stat_bin(geom="text",bins=8,aes(label=..count..), vjust=-1)