Thanks for your help. Your code works fine and can out put the all species and corresponding numbers to the screen. However, I just want to extract one specific specie and corresponding number at a time. Meanwhile, the corresponding number should be 0 if there is no such specific specie.And it would be better if the outcome can write into a new text file instead of the screen. Take O4 as an example, there should be just one output and should be like this
O4
0 # There is no “O4” specie in (1), so the corresponding number is 0.
3
0 # There is no “O4” species in (5), so the number is 0 too.
It will be grateful if you can help me.
Fan Li
In reply to Re^2: Extract the number of the species for txt file
by fan li
in thread Extract the number of the species for txt file
by fan li
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |