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.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to