Check out example codes for "r change row names of a dataframe". It will help you in understanding the concepts better.

Code Example 1

# Basic syntax:
rownames(your_dataframe) <- new_names
# Note, the new_names has to be the same length as the dataframe

# Example usage:
# Say you want to set the rownames to be numbered 1-end:
rownames(your_dataframe) <- 1:nrow(your_dataframe)

Code Example 2

row.names(x) <- value

Learn ReactJs, React Native from