I have a model that I created four years ago. The code for ggplot2 uses
`opts()`; I can no longer run some commands because `ggplot2` has
changed the `opts()` function to `theme()` or `element()`. If I try to
run the old code, I get the error: `'could not find function "opts"'`
The `opts()` code used in the model is:
opts(title =
paste(label, \"\\n\", sub=sublabel,sep=\"\")) This is the part of full code that uses `opts():
gg1 <- gg1+ geom_line(aes(y=predicted,
colour="Estimate",
linetype = "Estimate"))+
geom_line(aes(y=tupper,colour="Margins",linetype = "Margins")) +
geom_line(aes(y=tlower,colour="Margins", linetype = "Margins"))+
ylab(plottype) + xlab("Year") +
opts(title = paste(label, "\n", sub=sublabel,sep="")) +
scale_colour_manual("", c("Observation"="darkgrey",
"Estimate" = "blue", "Margins" = "red"))+
scale_linetype_manual("", c("Observation"=1, "Estimate"=1,"Margins"=2))
i tried to replace just "opts" with "labs" and get this Error: Unknown parameters: x
I would be very grateful if someone help me to update this code from `opts()` to the new format.