[R] Calculate percentages in a table of data

Luca Penasa luca.penasa at email.it
Thu Nov 8 19:54:50 CET 2007


Hi everybody,
Im a newbie, but i hope someone can help me in this work...
Ill try to explain what i need to do in the best way, but my english is 
not good...
Iv imported a big table of data, this table is something like this:

255 0 255 0 255 255 255 0 255 0
255 255 255 255 0 255 255 0 255 0
255 255 255 255 255 255 255 0 255 0
255 255 255 255 0 255 255 0 255 0
255 255 0 255 255 255 255 0 255 0
255 255 255 0 255 0 0 255 0 255

I need to calculate for every row the number of cells with "255" and the 
number of cells with "0"... from this values i would like to obtain the 
percentage of 0 presents in the row.... after i want to plot the data in 
a graph showing the variations of this percentage along the rows...

What i want to obtain is an array of this type:
40
30
20
30
30
40

Someone can give me a hint on how to obtain this?? maybe anybody can 
suggest me the functions i could use...

what software do you suggest me for plot the data?? i was thinking in 
gnuplot.... so i can plot the graph in svg format...

Please help me

thank you

Luca Penasa,
geology student,
University of Padua, Italy


 

 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Fai conoscere la tua azienda con l'invio di newsletter e campagne email marketing. Con soli 250 Euro incrementi la tua visibilità!
* 
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=7150&d=8-11



More information about the R-help mailing list