Displaying 1 result from an estimated 1 matches for "hm_all".
Did you mean:
hm_allk
2008 Oct 06
2
Problem with Grep Under Loop
...V7
35995 XM_528056 panTro2 chr8 + 1775569 1896107 Chimpanzee
BUT, when I run them under the loop it gives this error:
> hm_acc <- c("XM_528056","AB002296")
> for (i in 1:length(hm_acc)){
+
+ hm_acc_id <- as.character(hm_acc[i])
+ print(hm_acc_id)
+
+ hm_allk <- grep(hm_acc_id,source$V1)
+ hm_all <- source[hm_allk,]
+
+ print(hm_all)
+ }
[1] "XM_528056"
[1] V1 V2 V3 V4 V5 V6 V7
<0 rows> (or 0-length row.names)
[1] "AB002296"
[1] V1 V2 V3 V4 V5 V6 V7
<0 rows> (or 0-length row.names)
.....
What's wrong wi...