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

Description Usage Arguments Value Note Examples

Description

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

Usage

1
.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

1
2
3
4
5
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 Oct. 26, 2021, 1:33 a.m.