Hi,
Try:
comb[,as.numeric(temp[1])]
#[1] "V1" "V2"
 comb[,as.numeric(temp[3])]
#[1] "V1" "V3"



A.K.


i have two data frame 

>comb 
         [,1]   [,2]    [,3]   [,4]   [,5]    [,6] 
[1,]    "V1"   "V1"   "V1"   "V1"   "V1"   "V1" 
[2,]    "V2"   "V2"   "V2"   "V3"   "V3"   "V4" 


>table 

    V1           V2 
1 V1V2          3 
2 V1V3          3 
5 V2V3          3 


i select row name by function 
rownames(table) and stored it in a data frame 

temp<-data.frame() 
temp<-rowname(table) 

i want to selcect column of other data frame using this reference. 

comb[,temp[1]]..but its not working.. 

because temp[1] is "1" 
comb[,"1"] 
is not vaild. 

who to over come this??

______________________________________________
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