Errors with ggplot package

Hello, I have a code (summarized below):

ggplot2(data = relevance_data, mapping = aes(sample = relevance_comp, color = Condition, fill = Condition)) +
  stat_qq_band(alpha=0.5, conf=0.95, qtype=1, bandType = "boot") +
  stat_qq_line(identity=TRUE) +
  stat_qq_point(col="black") +
  facet_wrap(~ Condition, scales = "free") +
  labs(x = "Theoretical Quantiles", y = "Sample Quantiles") + theme_bw()

However when i try to run it i get this error:

Error in ggplot2(data = relevance_data, mapping = aes(sample = relevance_comp,  : 
  could not find function "ggplot2"

I have tried reinatalling the package and search for updated version but nothing is working.

Thank you.

The main function in the ggplot2 package is named ggplot not ggplot2. Try

ggplot(data = relevance_data, mapping = aes(sample = relevance_comp, color = Condition, fill = Condition)) +
  stat_qq_band(alpha=0.5, conf=0.95, qtype=1, bandType = "boot") +
  stat_qq_line(identity=TRUE) +
  stat_qq_point(col="black") +
  facet_wrap(~ Condition, scales = "free") +
  labs(x = "Theoretical Quantiles", y = "Sample Quantiles") + theme_bw()

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.