Ok so I am trying to add a subtitle to my xYplot using Hmisc and I have some
dummy code of
x<-seq(1,10,1)
y<-rev(seq(1,10,1))
ci<-y*.10
ciupper<-y+ci
cilower<-y-ci
this code works fine:
xYplot(Cbind(y,ciupper,cilower)~x, type=c("b"),plot.points = TRUE,
method='filled bands', main='main title')
but when I add sub=. at the end and use this
xYplot(Cbind(y,ciupper,cilower)~x, type=c("b"),plot.points = TRUE,
method='filled bands', main='main title',
sub='subtitle')
I get an error saying subscript out of bounds, any help?
-------------------------------------------
Joe King, M.A.
Ph.D. Student
University of Washington - Seattle
206-913-2912
jp@joepking.com
-------------------------------------------
"Never throughout history has a man who lived a life of ease left a name
worth remembering." --Theodore Roosevelt
[[alternative HTML version deleted]]
This is now fixed. Type getLatestSource('xYplot') to override the
distributed version with the fixed version. -Frank
Joe King wrote:> Ok so I am trying to add a subtitle to my xYplot using Hmisc and I have
some
> dummy code of
>
>
>
> x<-seq(1,10,1)
>
> y<-rev(seq(1,10,1))
>
> ci<-y*.10
>
> ciupper<-y+ci
>
> cilower<-y-ci
>
>
>
> this code works fine:
>
>
>
> xYplot(Cbind(y,ciupper,cilower)~x, type=c("b"),plot.points =
TRUE,
> method='filled bands', main='main title')
>
>
>
> but when I add sub=. at the end and use this
>
>
>
> xYplot(Cbind(y,ciupper,cilower)~x, type=c("b"),plot.points =
TRUE,
> method='filled bands', main='main title',
sub='subtitle')
>
>
>
> I get an error saying subscript out of bounds, any help?
>
>
>
> -------------------------------------------
>
> Joe King, M.A.
>
> Ph.D. Student
>
> University of Washington - Seattle
>
> 206-913-2912
>
> jp at joepking.com
>
> -------------------------------------------
>
> "Never throughout history has a man who lived a life of ease left a
name
> worth remembering." --Theodore Roosevelt
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Frank E Harrell Jr Professor and Chair School of Medicine
Department of Biostatistics Vanderbilt University
On Dec 14, 2009, at 7:09 PM, Joe King wrote:> Ok so I am trying to add a subtitle to my xYplot using Hmisc and I > have some > dummy code of > > x<-seq(1,10,1) > y<-rev(seq(1,10,1)) > ci<-y*.10 > ciupper<-y+ci > cilower<-y-ci > > this code works fine: > > xYplot(Cbind(y,ciupper,cilower)~x, type=c("b"),plot.points = TRUE, > method='filled bands', main='main title') > > but when I add sub=. at the end and use thisWhere did you find it documented that "sub" was an argument that would be interpreted as a subtitle for either xYplot or xyplot? (You may be unaware that there are separate graphics systems in R and that arguments for base graphics will not be recognized by Lattice graphics.> > xYplot(Cbind(y,ciupper,cilower)~x, type=c("b"),plot.points = TRUE, > method='filled bands', main='main title', sub='subtitle') > > > I get an error saying subscript out of bounds, any help?Read the help pages? The method I use to get a second line under my "main title" is to use "\n" to force a line break. If you want the sort of subtitle that one gets in base graphics you will need to be more clear.> > [[alternative HTML version deleted]]Please stop sending HTML formatted material. It takes extra time to edit out the wasted space. -- David Winsemius, MD Heritage Laboratories West Hartford, CT