data.frame method.row.names(x)
row.names(x) <- value"data.frame", or any other class for
which a method has been defined.x with no duplicated nor missing values.
NULL is also allowed: see ‘Details’.row.names returns a character vector. row.names<- returns a data frame with the row names changed.row.names will
always return a character vector. (Use attr(x, "row.names") if
you need to retrieve an integer-valued set of row names.) Using NULL for the value resets the row names to
seq_len(nrow(x)), regarded as ‘automatic’.data.frame, rownames, names. .row_names_info for the internal representations.