# NOT RUN {
plot(sunspots ~ year, data = Sunspot, type = "l")
# }
# NOT RUN {
library(ggplot2)
lattice::xyplot(sunspots ~ year, data = Sunspot,
main = "Yearly sunspots", type = "l")
lattice::xyplot(sunspots ~ year, data = Sunspot, type = "l",
main = "Yearly sunspots", aspect = "xy")
ggplot2::ggplot(data = Sunspot, aes(x = year, y = sunspots)) +
geom_line() +
theme_bw()
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab