[R] programming question

Clayton Springer csprin at brandybuck.ca.sandia.gov
Thu Nov 8 22:24:24 CET 2001


Dear r-help,

I am trying to build a new function (to process rpart objects) that will
output matrix that has a row for each node and a column for
each feature. With each entry in the table is a numerical property
at that node for that feature (e.g. surrogate split agreement, improvement).

My current trouble is that the only clue to the identity of the feature is 
stored as the *name* of the feature.  Whereas a table is indexed by *number*.

I have a list of sorted names, but I am having trouble translating a name
into a number. If this where perl the answer would be a hash.

Or can I directly index a table with an alphanumeric string. (ie. a hash).

Any help would be greatly appreciated,

--Clayton





-- 
Clayton Springer, Ph. D.
Sandia National Laboratories                      csprin at ca.sandia.gov
Biosystems Research Department                    (925) 294-2143
P.O. Box 969, MS 9951                fax:         (925) 294-3020
Livermore, CA, 94551-0969

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list