Hi everyone! Today me and my colleagues had some problem with ggplot. Actually we have to do an assignment and the answer says 'Make the scatter plots in ggplot2 as in the script on openness' and so we wrote on R '
p <- qplot(x = gravity.ita$ldistw, y = gravity.ita$lflow, data=gravity.ita, colour=gravity.ita$lgdp_d) + theme_bw() + labs(title="gravity.ita", x="log of distance", y="log of exports",color="lgdp_d")
p
p + stat_smooth(method = "gam", formula = y ~ s(x, k = 10), size = 1)
#6-7
p <- qplot(x = gravity.ita$lgdp_d, y = gravity.ita$lflow, data=gravity.ita, colour=1/gravity.ita$ldistw) + theme_bw() + labs(title="gravity.ita", x="log of GDP of importing country", y="log of exports",color="1/ldistw")
p
p + stat_smooth(method = "gam", formula = y ~ s(x, k = 10), size = 1)
but then, when we went to knit the all work with word, we have this message from R Markdown
'Quitting from lines 130-137 (Homework1.Annmarkdown.ultimo.Rmd)
Error in qplot(x = gravity.ita$ldistw, y = gravity.ita$lflow, data = gravity.ita, :
non trovo la funzione "qplot"
Calls: ... handle -> withCallingHandlers -> withVisible -> eval -> eval
Esecuzione interrotta'
I already have this package.
What can we do to solve this problem?
Thank you!