[R] Array Dimension Names

Benjamin.STABLER@odot.state.or.us Benjamin.STABLER at odot.state.or.us
Fri Oct 31 21:50:52 CET 2003


I would like to reference array dimensions by name in an apply and a summary
function.  For example:

apply(x, "workers", sum)

Is there a better way to do this than creating a new attribute for the array
and then creating new methods for apply and summary?  I don't want to name
the individual elements of each dimension (such as with dimnames) but rather
name the dimensions.  Thanks for your help.

Benjamin Stabler
Transportation Planning Analysis Unit
Oregon Department of Transportation
555 13th Street NE, Suite 2
Salem, OR 97301  Ph: 503-986-4104




More information about the R-help mailing list