Hi all,

 

I want to plot the grouped means of some variables. The dependent variables
and the grouping factor are stored in different columns. I want to draw a
simple line-plot of means, in which the x-axis represents the variables and
y-axis represents the means. The means of the groups should be connected by
lines. So far, the only function that I could find comes closest to what I'm
looking for, is the error.bars.by-function in the psych-package. To know,
what I'm looking for, just type:

 

library(psych)
x <- matrix(rnorm(500),ncol=20)
y <- sample(4,25 ,replace=TRUE)
x <- x+y
error.bars.by(x,y,ci=0)

 

Now, I want to put a legend for the grouping factor of this graph. I also
would like to manipulate the linetypes and colors of the lines. I've read
the documentation, but it was not clear to me, how to do this. Are there
other plotting functions in R, which can do the same?

 

Erich

 

________________________________________________

Erich Studerus
Lic. Phil. Klinische Psychologie
Psychiatric University Hospital Zurich
Division of Clinical Research
Lenggstr. 31
CH-8008 Zurich
Switzerland
Mail: erich.studerus@bli.uzh.ch
Office: +41 44 384 26 66
Mobile: +41 76 563 31 54
________________________________________________

 


	[[alternative HTML version deleted]]

