I have scraped a table from the web using the rvest package. Some of the numbers in my table have values of ".5" and ".4". My goal is to convert the numbers to instead have values like ".500" and ".400".
I have used the round function wrapped in a transmute function,
ex: transmute(x =round(x,3))
and the signif function, ex: transmute(x= signif(x,3))
.
These functions haven't seemed to do the trick. My ultimate goal is to use the DT package to put my tables into a shiny app. When I run the shiny app, the numbers aren't rounded to the correct decimal place in my tables.
Any ideas?
Thanks