powered by
Convert Row Names to an Explicit Column
append_rownames(x, ...)# S4 method for data.frame append_rownames(x, after = 0, remove = TRUE, var = "rownames")
# S4 method for data.frame append_rownames(x, after = 0, remove = TRUE, var = "rownames")
A data.frame.
data.frame
Currently not used.
A length-one numeric vector specifying a subscript, after which the row names are to be appended.
numeric
A logical scalar: should the row names be removed?
logical
A character string giving the name of column to use for row names.
character
N. Frerebeau
Other transformation tools: assign()
assign()
X <- data.frame( x = 1:5, y = 6:10, z = LETTERS[1:5] ) ## Assign column to row names (Y <- assign_rownames(X, 3)) ## Append row names to data.frame (Z <- append_rownames(Y))
Run the code above in your browser using DataLab