SyntaxFix
Write A Post
Hire A Developer
Questions
Tags
I have a .txt file that contains row names. However, R set the row names as the first column.
.txt
This question is related to r csv dataframe rowname
r
csv
dataframe
rowname
See ?read.table. Basically, when you use read.table, you specify a number indicating the column:
?read.table
read.table
##Row names in the first column read.table(filname.txt, row.names=1)
Source: Stackoverflow.com