Horje
r change row names of a dataframe Code Example
r change row names of a dataframe
# 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)
set row names in r
row.names(x) <- value
Source: stat.ethz.ch




17

Related
r ggplot regression line Code Example r ggplot regression line Code Example
read excel in r Code Example read excel in r Code Example
vertical line in ggplot2 Code Example vertical line in ggplot2 Code Example
select all columns except one by name in r Code Example select all columns except one by name in r Code Example
drop columns by index r Code Example drop columns by index r Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
15