[R] keep row names into data
arun
smartpink111 at yahoo.com
Fri Jun 21 16:06:02 CEST 2013
Hi,
Try:
dat1<- read.csv("mydata.csv",sep="\t",row.names=1) #sep could be different in your case.
dat1
# A B C D E
#Jhon 1 3 6 9 8
#Kelly 2 3 4 6 9
#Audrey 3 5 6 9 7
A.K.
Hi,
I am calling my csv data with 37 columns and 16 rows into R. However I really need to keep coloumns names as well as row names.
Columns names is easy to keep using the command below. But how to keep row names?
data<-read.csv("mydata", header=TRUE)
My spreadsheet is like:
A B C D E ...
Jhon 1 3 6 9 8
Kelly 2 3 4 6 9
Audrey 3 5 6 9 7
...
In this case I need students names.
Thanks anyone.
More information about the R-help
mailing list