am.key2var {UCS} | R Documentation |
These functions implement the UCS naming conventions for variables
storing association scores and the corresponding ranking.
is.valid.key
checks whether a given string is valid as a name
for an association measure. am.key2var
translates a valid AM
name into the corresponding variables (for scores or ranking), and
am.var2key
extracts the AM name from such a variable.
is.valid.key(key, warn=FALSE) am.key2var(key, rank=FALSE) am.var2key(var)
key |
a character vector, giving the names of one or more association measures |
var |
a character vector of variable names, which must be either association scores or rankings (but both types can be mixed in the vector) |
warn |
if TRUE , issues a warning if the vector key
contains invalid AM names. All invalid entries are listed in the
warning message. |
rank |
if TRUE , return names of the ranking variables
corresponding to the specified association measures. otherwise,
return names of variables for association scores. |
is.valid.key
returns a logical vector, am.var2key
returns a list of AM names (“keys”), and am.key2var
returns a list of variable names (either for association scores or
rankings, depending on the rank
parameter).
builtin.ams
for information about built-in association
measures, and the ucsfile
manpage in UCS/Perl for a description
of the UCS naming conventions (enter the shell command ucsdoc
ucsfile
).
am.key2var(c("t.score", "MI"), rank=TRUE) am.var2key(c("am.t.score", "r.MI"))