dfcol

Share:

Description

extract column from a data.frame and reassing names

Usage

1
dfcol(x, colName)

Arguments

x

the dataFrame

colName

the column name

Value

structure( x[,colName], names=rownames(x) )

Author(s)

Thomas Wutzler

See Also

seqRange, twMisc

Examples

1
2
3
data <- data.frame( a=1:4, b=2*(1:4) )
rownames(data) <- LETTERS[1:4]
dfcol(data,"b")

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.