dot-renameDF: Rename data.frame columns by key-value pairs in rnames

.renameDFR Documentation

Rename data.frame columns by key-value pairs in rnames

Description

Rename data.frame columns by key-value pairs in rnames

Usage

.renameDF(df, rnames)

Arguments

df

data.frame

rnames

named character vector; names(rnames)=colnames(df)

Value

df with new colnames; or NULL on error

Note

Internal function only for convenience

Examples

nodes = data.frame(id=c(0,1,2),
                   name=c("CDK1",NA,"CDK3"),
                   represents=c(NA,"bla",NA))
rnames = c(id="@id", name="n", represents="r")
RCX:::.renameDF(nodes, rnames)

frankkramer-lab/RCX documentation built on Feb. 4, 2023, 5:12 p.m.