search for: time0tot

Displaying 1 result from an estimated 1 matches for "time0tot".

Did you mean: time0total
2012 Jul 23
3
How to do the same thing for all levels of a column?
...If I name this table as myfile.txt, I have the following scripts to calculate the ratio of each amino acid residue at position 1: # showing levels of the 3rd column, which means the types of residues >myfile[,3] # calculating the ratio of L >list=c(which(myfile[,3]=="L")) >time0total=sum(myfile[,2]) >AA_L=0 >for (i in 1:length(list)){AA_L=sum(myfile[list[[i]],2]+AA_L)} >ratio_L=AA_L/time0total So how can I write a script to do the same thing for the other two levels (T and R) in column 3, and also do this for every column that contains amino acid residues? M...