[R] accessing a data frame with row names

e-letter inpost at gmail.com
Mon May 31 13:23:17 CEST 2010


Readers,

I have entered a file into r:

,column1,column2
row1,0.1,0.2
row2,0.3,0.4

using the command:

dataframe<-read.table("/path/to/file.csv",header=T,row.names=1)

When I try the command:

dataframe[,2]

I receive the response:

NULL

I was expecting:

row1 0.2
row2 0.4

What is my error with the syntax please?

Yours,

r251
mandriva2009



More information about the R-help mailing list