Hi,Here i have written an example to explain my problem ## Data Generationdat<-data.frame(matrix(1:50,ncol=5)) rownames(dat)<-letters[1:10] colnames(dat)<- c("SA1","SA2","SA3","SA4","SA5")
dat1<-data.frame(matrix(letters[1:20],ncol=4)) colnames(dat1)<-c("AA","BB","CC","DD") ## Row names v1<-dat1[,"BB"] # Factor v2<-as.vector(dat1[,"BB"]) # Vector is(v1) # Factor is(v2) # Vector # Result res1<-dat[v1,] res2<-dat[v2,] ##########################################################i assumed res1 and res2 are same . but it is not . Can any body please explain why ? Tanvir Ahamed Göteborg, Sweden | mashra...@yahoo.com [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.