I have a R data.frame that looks like this:
Gene Score
1 AAT2 15.40100
2 ACB1 5.11880
3 ACF2 15.04500
4 ADE16 3.04080
5 ADE17 0.28143
6 ADE4 19.79200
However I need to get rid of the trailing zeros in order to get:
Gene Score
1 AAT2 15.401
2 ACB1 5.1188
3 ACF2 15.045
4 ADE16 3.0408
5 ADE17 0.28143
6 ADE4 19.792
Basically I am trying to set the number of digits in the score column to 5 digits; I specifically want the data to be viewed in that way. How can I do this in R?
Scorecolumn? If numeric, then what you are currently seeing is just how R is presenting the data. The trailing zeroes are not significant, and are also not really being stored. On the other hand, if you want to view your numeric data this, it is another story.