Discussion:
Error: could not find function "opts"
Simon Han
2016-05-26 13:25:59 UTC
Permalink
library(ggplot2)
facebookData <- read.delim("FacebookNarcissism.dat", header = TRUE)
graph <- ggplot(facebookData, aes(NPQC_R_Total, Rating))
graph + geom_point() + opts(title = "geom_point()")
Error: could not find function "opts"

What's wrong?
--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility

To post: email ***@googlegroups.com
To unsubscribe: email ggplot2+***@googlegroups.com
More options: http://groups.google.com/group/ggplot2

---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Adriano Fantini
2016-05-26 13:45:47 UTC
Permalink
opts() has been deprecated a long time ago. Use theme() options.
For setting a title, use ggtitle()
Post by Simon Han
library(ggplot2)
facebookData <- read.delim("FacebookNarcissism.dat", header = TRUE)
graph <- ggplot(facebookData, aes(NPQC_R_Total, Rating))
graph + geom_point() + opts(title = "geom_point()")
Error: could not find function "opts"
What's wrong?
--
--
You received this message because you are subscribed to the ggplot2 mailing list.
https://github.com/hadley/devtools/wiki/Reproducibility
More options: http://groups.google.com/group/ggplot2
---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility

To post: email ***@googlegroups.com
To unsubscribe: email ggplot2+***@googlegroups.com
More options: http://groups.google.com/group/ggplot2

---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Brandon Hurr
2016-05-26 13:48:02 UTC
Permalink
You are using very old ggplot2 code. opts() has long been deprecated.

labs() is the easiest way to change plot labels:
http://docs.ggplot2.org/current/labs.html
Post by Simon Han
library(ggplot2)
facebookData <- read.delim("FacebookNarcissism.dat", header = TRUE)
graph <- ggplot(facebookData, aes(NPQC_R_Total, Rating))
graph + geom_point() + opts(title = "geom_point()")
Error: could not find function "opts"
What's wrong?
--
--
You received this message because you are subscribed to the ggplot2 mailing list.
https://github.com/hadley/devtools/wiki/Reproducibility
More options: http://groups.google.com/group/ggplot2
---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility

To post: email ***@googlegroups.com
To unsubscribe: email ggplot2+***@googlegroups.com
More options: http://groups.google.com/group/ggplot2

---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Simon Han
2016-05-26 14:20:24 UTC
Permalink
labs() is working. Thanks.
--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility

To post: email ***@googlegroups.com
To unsubscribe: email ggplot2+***@googlegroups.com
More options: http://groups.google.com/group/ggplot2

---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...