Displaying 1 result from an estimated 1 matches for "genecolor".
2011 Feb 05
2
Help!!! from R beginner
...t;TE_related" "black"
...
I have worked on the following code to do this job using function and
loop, but it is not working. If someone help me, I would really
appreciate!!!
The original data frame is Os.chr4.gene.new.
Gene <- Os.chr4.gene.new[, c("if_TE_related")]
Genecolor <- function(Gene) {
lg <-length(Gene)
for(i in 1:lg) {
if (Gene == "TE_related") {D1 <- (Gene == "black")}
if (Gene == " ") {D1 <- (Gene == "orange")}
}
Gene.color <- cbind(Gene, D1)
write.table(Gene.color, file="Gene_color1.txt&quo...