This is the second time I've posted on this topic. Sorry for the duplicate
but it is possible that my earlier post wasn't as clear as it could be.
So, I'm going to try again.
Below is a function I've written to produce qqnorm plots for a suite of
variables conditioned on groups. I continue to be stymied by my inability
to find a way to label the y-axis of each trellis with the name of the
relevant variable.
In my real world example, the call made to this function might be:
joe<-myfunction(howtest[,5:40], howtest[4])
The trellises that result all have "x" as the y-label. If I drill-down
into the list, I can eventually find the variable names associated with
each trellis -- indeed, within "joe" each trellis is named for the
variable, but this does me no good in labelling them as they are produced.
If I include the argument ylab=names(x), I will get the y-label to be the
name of the variable howtest[,5] on every trellis -- all 36 of them. I
know what is happening, but I don't know how to get around it.
Does anyone have any suggestions, or is this something that isn't doable in
SPlus 4.5R2 (Win98)?
==================================
function(x, group)
{
# function to generate qqnorm plots by group
apply(x, 2, function(x)
{
qqmath( ~ x | group, panel = function(x, y)
{
panel.qqmathline(y, distribution = qnorm)
panel.qqmath(x, y)
})
})
}
Dr. Marc R. Feldesman
email: feldesmanm@pdx.edu
email: feldesman@ibm.net
fax: 503-725-3905
"Math is hard. Let's go to the mall" Barbie
Powered by: Monstrochoerus - the 300 MHz Pentium II
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
|