After you have successfully (with your help) in constructing meta variables in single (single variable) graphs, I try to create a panel with time series of different variables in my data in one panel, for example, as an example of the ggplot2 web page . I tried to reproduce this example (the last graph at the bottom of the page) with my data, but without success
My data is spread over several years, but I attach only a month. You can see the output of dput (datos) at http://ubuntuone.com/42j1RqUmNmxUuCppW4gElX
and this is the code I'm trying
datos=read.csv("paterna.dat",sep=";",header=T,na.strings="-99.9") dm=melt(datos,id="FECHA.H_SOLAR") datos$PRECIP[is.na(datos$PRECIP)]=0 dm=melt(datos,id="FECHA.H_SOLAR") qplot(date, value, data = dm, geom = "line", group = variable) + facet_grid(variable ~ ., scale = "free_y") Error: geom_line requires the following missing aesthetics: x Además: Mensajes de aviso perdidos 1: In min(x) : ningún argumento finito para min; retornando Inf 2: In max(x) : ningun argumento finito para max; retornando -Inf
I am trying to use qplot as shown in the above example, but it might be better to use ggplot and set the aesthetics. Then I could also adjust the axis.
Thanks in advance
pacomet
source share