Buenos días y felices fiestas, a ver si alguien puede decirme por qué me da este error, si mi argumento (que creo que se refiere a "sum") si es numérico: Error in c(0, max) + labs(title = "Esumap 5085"): non-numeric argument to binary operator.

Este es el código:

myPalette <- colorRampPalette(rev(brewer.pal(11, "Spectral")))

ggplot(legend=FALSE)+geom_path(data=map_data('world'), aes(x=long, y=lat,group=group))+ theme(panel.background=element_blank())+theme(panel.grid.major = element_blank())+ theme(panel.grid.minor = element_blank())+theme(axis.text.x=element_blank(),axis.text.y=element_blank())+
  theme(axis.ticks = element_blank())+xlab("") + ylab("")+
  geom_point(data=sumdf,aes(x=lon,y=lat,color= sum),size=1) +
  scale_colour_gradientn(colours = myPalette(100), limits=c(0, 200)+
  geom_path(data=map_data('world'), aes(x=long, y=lat,group=group))+
  labs(title =  "Esumap 5085"))

Gracias, como siempre,
Manuel




























.

--
Dr Manuel Mendoza
Department of Biogeography and Global Change
National Museum of Natural Science (MNCN)
Spanish Scientific Council (CSIC)
C/ Serrano 115bis, 28006 MADRID
Spain

_______________________________________________
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es

Responder a