I have a series of ggplots that successfully compile into my pdf, and two that do not. The code is identical among the different plots, except for the directories and file names. I get this error message: Error: unexpected '@' in "@". If someone could give me an idea of what I can do to solve this problem, I'd greatly appreciate it. I'm very new to LaTeX, so a simple explanation would be great.
Thanks,
Mike
This one works:
Code: Select all
<<echo=FALSE, fig=TRUE>>=
library(foreign)
library(ggplot2)
#read tables in
school1 <- read.dta("C:/Users/Mike Poletika/Desktop/WFF SQM/INDIANAPOLIS/Report/Data/Datasets/schoolidA425/indianapolis_all.dta")
ggplot(school1, aes(growth, attainment))+
geom_point(aes(colour = yrnstr), size = 3)+
scale_x_continuous(limits=c(-1.35, 1.35))+
scale_y_continuous(limits=c(-1.35, 1.35))+
xlab("Growth")+
ylab("Attainment")+
theme(legend.position="bottom")
@
Code: Select all
<<echo=FALSE, results=tex>>=
#Walton VAM Report#
library(foreign)
library(ggplot2)
#read tables in
allschools <- read.dta("C:/Users/Mike Poletika/Desktop/WFF SQM/INDIANAPOLIS/Report/indianapolis_vam_all.dta")
ggplot(allschools, aes(growth, achievement))+
geom_point(aes(colour = type), size = 3)+
scale_x_continuous(limits=c(-1.35, 1.35))+
scale_y_continuous(limits=c(-1.35, 1.35))+
xlab("Growth")+
ylab("Attainment")+
theme(legend.position="bottom")
@