Hi Deepayan,
The following code creates a dummy dataset which has the same similar as
my usual datasets. I did not try to implement the changes proposed by
Hadley, hoping that a solution can be found using the original dataset.
# My code
# Creating dataset
nPts-10# number
Hi Sebastian,
I think the following does what you want:
library(ggplot2)
names(mydata) - tolower(names(mydata))
obs - rename(subset(mydata, model==A, -predicted), c(observed = value))
obs$model - factor(observed)
pred - rename(mydata[, -5], c(predicted = value))
all - rbind(obs, pred)
On 6/22/07, Sébastien [EMAIL PROTECTED] wrote:
Hi Deepayan,
The following code creates a dummy dataset which has the same similar as
my usual datasets. I did not try to implement the changes proposed by
Hadley, hoping that a solution can be found using the original dataset.
# My
Hadley,
I have some troubles to run your code with ggplot version 0.4.1. Is the
package ggplot2 mandatory ?
Sebastien
hadley wickham a écrit :
Hi Sebastian,
I think the following does what you want:
library(ggplot2)
names(mydata) - tolower(names(mydata))
obs - rename(subset(mydata,
Yes - you'll need ggplot2.
Hadley
On 6/22/07, Sébastien [EMAIL PROTECTED] wrote:
Hadley,
I have some troubles to run your code with ggplot version 0.4.1. Is the
package ggplot2 mandatory ?
Sebastien
hadley wickham a écrit :
Hi Sebastian,
I think the following does what you want:
Hi Sebastian,
I think you need to rearrange your data a bit. Firstly, you need to
put observed on the same footing as the different models, so you would
have a new column in your data called value (previously observed and
predicted) and a new model type (observed). Then you could do:
Sorry, I have forgotten to tell that I work on R version 2.5.0 on
Windows XP sp2.
Sébastien a écrit :
Dear R Users,
I recently posted an email on this list about the use of data.frame and
overlaying multiple plots. Deepayan kindly indicated to me the
panel.superposition command which
Hi Hadley,
Hopefully, my dataset won't be too hard to changed. Can I modify the
aspect of each group using your code (symbols for observed and lines for
predicted)?
Sebastien
hadley wickham a écrit :
Hi Sebastian,
I think you need to rearrange your data a bit. Firstly, you need to
put
Sebastian,
You should be able to, but I don't know how to do it with lattice. In
ggplot (http://had.co.nz/ggplot2) you would do it as follows:
ggplot(mydata, aes(x = time, y = value, colour=model)) +
geom_point(subset(data, model != observed)) +
geom_line((subset(data, model == observed)) +
On 6/21/07, Sébastien [EMAIL PROTECTED] wrote:
Hi Hadley,
Hopefully, my dataset won't be too hard to changed. Can I modify the
aspect of each group using your code (symbols for observed and lines for
predicted)?
Sebastien
hadley wickham a écrit :
Hi Sebastian,
I think you need to
Dear R Users,
I recently posted an email on this list about the use of data.frame and
overlaying multiple plots. Deepayan kindly indicated to me the
panel.superposition command which worked perfectly in the context of the
example I gave.
I'd like to go a little bit further on this topic using
Thanks for the information. These commands work perfectly fine and the
?panel.superpose help was most informative.
If you don't mind, I will certainly come back to you as there will
certainly be additionnal complexities in my datasets that I will be
unable to handle (e.g. data in more than one
On 6/12/07, Seb [EMAIL PROTECTED] wrote:
Hello
I apologize in advance if this question has already be posted on the
list, although I could not find a relevant thread in the archives.
I would like to overlay xyplots using different datasets for each plot.
I typically work on the following
Hello
I apologize in advance if this question has already be posted on the
list, although I could not find a relevant thread in the archives.
I would like to overlay xyplots using different datasets for each plot.
I typically work on the following data.frame (mydata) structure
mydata
On 6/11/07, Seb [EMAIL PROTECTED] wrote:
Hello
I apologize in advance if this question has already be posted on the
list, although I could not find a relevant thread in the archives.
I would like to overlay xyplots using different datasets for each plot.
I typically work on the following
15 matches
Mail list logo