Gives row/column names, from either a character vector or a numeric vector with
names.
USAGE:
named.index.rowcol(index, default.index)
REQUIRED ARGUMENTS:
index
character vector or numeric vector with names, whose elements will replace the
corresponding elements of
default.index.
default.index
character vector or numeric vector with names, whose elements will be replaced
by the corresponding elements of
index.
VALUE:
If neither
index nor
default.index are character vectors or have names,
NULL
; otherwise, character vector the length of the longest of
index (or
names(index)
if not of mode
"character") and
default.index (or
names(default.index)
if not of mode
"character") with values of a vector
of
default.index (or
names(default.index) if not of mode
"character") with
elements replaced by the corresponding elements of
index (or
names(index) if
not of mode
"character").
SEE ALSO:
,
,
.
EXAMPLES:
# this gives structure(.Data = 6, .Names = "Tires") ...
append.index <- index.rowcol(fuel.frame, "Tires", is.target.index=T)
# ... and this gives c("Tires", "Disp.", "Mileage", "Fuel", "Type")
named.index.rowcol(append.index, name.cols(fuel.frame))