Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

Convert Values in Column into Row Names of DataFrame in R

[1] "Original dataframe"
 col1 col2 col3
1    a    6    5
2    b    6    6
3    c    6    7
4    d    6    8
[1] "Modified dataframe"
 col1 col2 col3
a    a    6    5
b    b    6    6
c    c    6    7
d    d    6    8
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #Convert #Values #Column #Row #Names #DataFrame #R
ADD COMMENT
Topic
Name
2+5 =