search for: nvb_death

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

Did you mean: nvb_deaths
2009 Oct 29
2
Rounding and printing
...unded to the same number of digits (one after the decimal), but R seems to want to not print ".0" for integers. I can go in and fix it one number at a time, but I'd like to understand the principle. Here's an example of the code. The problem is the 13th element, 21 or 21.0: >nvb_deaths <- round(ss[,10]/100,digits=1) > nvb_deaths [1] 56.5 1.6 0.2 3.9 0.1 2.2 0.2 2.6 1.5 4.1 1.1 6.1 21.0 >nvb_dths <- paste(nvb_deaths," (",round(100*nvb_deaths/nvb_deaths[1],digits=1),"%)",sep="") > nvb_dths [1] "56.5 (100%)" &qu...