Skip to content

using "by" and indicies

2 messages · Jason Turner, Greg Snow

#
I sent this to the list last week, and haven't seen it pop up.  Either 
I deleted it when it did appear, or possibly it was destroyed as 
spam...?  If it did appear and I somehow missed it, appologies.

In a nutshell, can the function FUN supplied to by() deduce
what level of factor by() was on when FUN was called?  I've
been digging through the functions, and can't see where the
distinction is made so that get() with a suitable "where=x"
argument could help.

Cheers

Jason
----- Forwarded message from Jason Turner <jasont at indigoindustrial.co.nz> -----

...

I'm using by() to call pairs(), and would like to put the factor
level into the title.  A toy example would be something like:
Is there an elegant way to get "low"..."high" in the main title for
each plot, without binding "levs" to the data sent to a custom plot 
function? 

...
1 day later
#
On Mon, 18 Mar 2002, Jason Turner wrote:

            
[snip]
One way is to pass the level info with the data to be plotted:
+ pairs( x[,1:3], main=paste("Level:",tmp) ) } )

hope this helps,