I'm trying to get subset of my data in R. I tried this, but I got unexpected result!
>str(data)
num [1:500, 1:2000] 5.65
>y<-c("rowname1" , "rowname2", ... )
> spotA<-data[y]
NULL
> spotA
[1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
also I tried as following way :
>spotA<-data[c("rowname1" , "rowname2", ... )]
and I got the above result. what I would expect is to get sotA with dimension 16 2000 with numeric entries, not NA ! can somebody help me where is my mistake ?