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 name of the new column.
character
N. Frerebeau
Other data preparation tools: append_column(), assign(), compact(), count(), detect(), discard(), get(), keep(), seek()
append_column()
assign()
compact()
count()
detect()
discard()
get()
keep()
seek()
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