extract column from a data.frame and reassing names
the column name
structure( x[,colName], names=rownames(x) )
data <- data.frame( a=1:4, b=2*(1:4) )
rownames(data) <- LETTERS[1:4]
Questions? Problems? Suggestions? Tweet to @rdrrHQian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.