2
Hello, I am looking for an aid to improve a script in R. I develop it with the help of the ggplot2 package. I have some errors and would like to get some feedback. In the study, I evaluated the effect of intra- and interspecific interaction between two species of tadpoles with two size classes "p" and "g" on the use of spatial resources through two response variables: vertical displacement (sec) and horizontal displacement (cm).
Mistakes:
In the execution of the summarySE function: "/Warning message:In Qt(conf.interval/2 + 0.5, datac$N - 1) Nans produced"
When executing Legend.title=element_blank(): Error: Unexpected Symbol in:"Legend.title=element_blank() Legend.title"
follows the script
#Importar dados. Pacotes para o gráfico
pmed<-read.table("https://drive.google.com/open?id=1cET5cROSb-_D-cZYud3yKBHGR-qamind",header=T, sep=',')
require(Rmisc)
require(ggplot2)
require(EnvStats)
require(sciplot)
require(dplyr)
summarypmed <- summarySE(pmed, measurevar="PV", groupvars=c("ID","INT"),na.rm=T)
# gráfico 1
graf1 <- ggplot(summarypmed, aes(x=INT, y= PV, fill=INT)+ facet_wrap(~INT) +
geom_dotplot(binwidth=0.05,binaxis="y",stackdir = "center") +
geom_errorbar(aes (ymin=PV.y-se,ymax=PV.y+se),width = 0.25,size=0.25)+
xlab("Tratamentos") +
ylab(" Posição Vertical (cm)") +
geom_text(aes(label = paste("N", "==",N,sep = "")),
parse = TRUE, y=-0.15) +
geom_point(aes(y=PV.y), size=1,show.legend = F) +
theme_bw () +
scale_fill_manual(values=c("grey85","grey30")) +
theme(axis.ticks.x=element_blank(),
axis.title.x=element_blank(),
axis.text=element_text(size=7),
axis.text.y=element_text(size=10),
axis.text.x=element_blank(),
axis.title.y=element_text(size=11),
plot.title=element_text(size=12, hjust = 0.5),
panel.grid=element_blank(),
plot.title=element_text(vjust=2),
legend.title=element_blank())