Re: [R] Writing to a file

2012-02-07 Thread Felicity
Thanks a lot for the interest :) My loop is the following counter = 0 for (i in 1:nrow(y)) { for (j in 1:ncol(y)) { if (y[i,j]=="Func_0005634") { counter = counter + 1 } if(y[i,j]=="Func_0005737"){ counter = counter + 1 } if(y[i,j]=="Func_0005515"){ counter = c

Re: [R] Writing to a file

2012-02-07 Thread Felicity
Thank you a lot for answering so fast! but..what do you mean by example? I 've mentioned above the loop I used and I also show how the file looks like 'cause its huge. the way i read the file is x=read.table("filename.txt",header=FALSE,sep="\t",fill=TRUE) y=x[1:45,] (i use only some rows in order

Re: [R] Writing to a file

2012-02-06 Thread Felicity
Honestly thank you for the prompt responding and you are right I will tellyou what I want to do and not the way ..since I dont know much from R I have a txt with Proteins "Prot_10035""Func_0005874" "Func_0016787" "Func_0003774" "Func_0006898" "Func_0005856" "Func_0005525" "Func_0005737

Re: [R] Writing to a file

2012-02-06 Thread Felicity
maybe I could keep each line (having the strings) in a file or somewhere and then call a print function that prints them all together from where I saved them? Please let me know as soon as Possible!! thank you! -- View this message in context: http://r.789695.n4.nabble.com/Writing-to-a-file-tp3

Re: [R] Writing to a file

2012-02-06 Thread Felicity
Dear All!! I am also new in R and trying to write my results into a file I post here..hopefully is the proper place To be more secific I have this loop counter = 0 for (i in 1:nrow(y)) { for (j in 1:ncol(y)) { if (y[i,j]=="Func_0005634") { counter = counter + 1 } if(y[i,j]=="Fu