I am creating a table in R. The values in some rows should have 0 decimal places (such as number of people) while values in other rows should have 1 decimal place (e.g. percent of population).
I have the data frame, and then used the round function the round function in R to create two tables - round0 (0 decimal places) and round1 (1 decimal place).
round1<-round(prof.table[-c(2:3),], 1)
round0<-round(prof.table[2:3,], 0)
prof.table<-rbind(round0, round1)
After I combine them, I would expect that values from the round0 table would have zero decimal places, and those from round1 would have 1 decimal place. However, after rbind, values in all cells have 1 decimal place, so my integers are showing as nnn.0. How can I remove this extra decimal place from the whole numbers?