Re: [R] Hmisc xYplot

2006-07-17 Thread Frank E Harrell Jr
Erin Berryman wrote:
 Dear R community,
 
 I am having trouble with a particular plot that I am trying to produce 
 using Hmisc's xYplot function. I've been using primarily lattice and 
 Hmisc packages for my plotting needs for the past few years, with great 
 success.
 However, what I want to do now with xYplot is plot more than one data 
 trend in the same panel, much as I would use xyplot from package lattice 
 in conjunction with superpose, with type=b. My problem is I can't get 
 the error bars to plot when I use xYplot this way. I've attached my data 
 set for reference.
 
 Here are my inputs:
 
  p1sum-read.csv(file=p1sum.csv, header=T)
  library(Hmisc)
  xYplot(Cbind(DRP, SE) + Cbind(Fe, FeSE) ~ Day | Group + Port,  p1sum, 
 type='b')
 
 The plotted result is two lines per panel, one labeled Cbind(DRP, SE) 
 and the other labeled Cbind(Fe, FeSE). However, the error bars are not 
 plotted at all (I want the error bars to be DRP +/- SE, and Fe +/- 
 FeSE). Any advice on this is greatly appreciated.
 
 Thank you,
 
 Erin

xYplot does not accept multiple Cbind terms.  You'll have to string out 
your data tall and thin to construct a single Cbind(Y, SE) and use 
superposition with groups=.

Sometimes confidence intervals are better than using +-SE, which also 
has the advantage of allowing the intervals to be asymmetric.

Frank
 
 
 
 
 Erin Berryman
 ***PLEASE-- NOTE NEW EMAIL [EMAIL PROTECTED]
 
 
 
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


-- 
Frank E Harrell Jr   Professor and Chair   School of Medicine
  Department of Biostatistics   Vanderbilt University

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Hmisc xYplot

2006-07-16 Thread Erin Berryman

Dear R community,

I am having trouble with a particular plot that I am trying to produce 
using Hmisc's xYplot function. I've been using primarily lattice and 
Hmisc packages for my plotting needs for the past few years, with great 
success.
However, what I want to do now with xYplot is plot more than one data 
trend in the same panel, much as I would use xyplot from package 
lattice in conjunction with superpose, with type=b. My problem is I 
can't get the error bars to plot when I use xYplot this way. I've 
attached my data set for reference.


Here are my inputs:

p1sum-read.csv(file=p1sum.csv, header=T)
library(Hmisc)
xYplot(Cbind(DRP, SE) + Cbind(Fe, FeSE) ~ Day | Group + Port,  p1sum, 
type='b')


The plotted result is two lines per panel, one labeled Cbind(DRP, SE) 
and the other labeled Cbind(Fe, FeSE). However, the error bars are not 
plotted at all (I want the error bars to be DRP +/- SE, and Fe +/- 
FeSE). Any advice on this is greatly appreciated.


Thank you,

Erin





Erin Berryman
***PLEASE- NOTE NEW EMAIL [EMAIL PROTECTED]__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] Hmisc xYplot: two ablines?

2006-01-10 Thread Michael Kubovy
Dear r-helpers,

Happy New Year.

To a plot

xYplot(lo ~ vaR, groups = v, data = abc1.fp,aspect = xy,
xlab=expression(frac(abs( bold(v) ),abs( bold(a) ))),
ylab = grid::textGrob(expression(paste(log, frac( italic(p) ( italic 
(v) ), italic(p) ( italic(a)  ),
abline =list(a = 5.71442, b = -5.71442, col = 2)
)

I would like to add another abline such as abline = list(a = 8.8460,  
b = -8.8460, col = 3). Any advice?


_
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS: P.O.Box 400400Charlottesville, VA 22904-4400
Parcels:Room 102Gilmer Hall
 McCormick RoadCharlottesville, VA 22903
Office:B011+1-434-982-4729
Lab:B019+1-434-982-4751
Fax:+1-434-982-4766
WWW:http://www.people.virginia.edu/~mk9y/

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Hmisc xYplot: two ablines?

2006-01-10 Thread Michael Kubovy
To r-help:

Thanks to Mat Soukup for the help:

To draw two ablines:

xYplot(lo ~ vaR, groups = v, data = abc.fp, aspect = xy, col = c 
(red,blue),
xlab=expression(frac(abs( bold(v) ),abs( bold(a) ))),
ylab = grid::textGrob(expression(paste(log, frac( italic(p) ( italic 
(v) ), italic(p) ( italic(a)  ),
panel=function(x,y,...){
panel.xYplot(x, y, ...)
panel.abline(a = 7.985090, b= -7.985090, col = red)
panel.abline(a = 7.926507, b = -7.926507, col = blue, lty = 2)
}
)

This is (to me) a surprising syntactic leap from one abline in  
xYplot, which can be requested without writing a panel function:

xYplot(lo ~ vaR, groups = v, data = abc.fp, aspect = xy, col = c 
(red,blue),
xlab=expression(frac(abs( bold(v) ),abs( bold(a) ))),
ylab = grid::textGrob(expression(paste(log, frac( italic(p) ( italic 
(v) ), italic(p) ( italic(a)  ),
panel.abline(a = 7.985090, b= -7.985090, col = red)
)

_
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS: P.O.Box 400400Charlottesville, VA 22904-4400
Parcels:Room 102Gilmer Hall
 McCormick RoadCharlottesville, VA 22903
Office:B011+1-434-982-4729
Lab:B019+1-434-982-4751
Fax:+1-434-982-4766
WWW:http://www.people.virginia.edu/~mk9y/

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html