I am trying to add a new column by dividing column A and Column B using mutate() verb in R.
dataframe %>%
mutate(colC = colA / colB)
But the new value in Column C is automatically getting rounded off to two decimal places. How do I avoid that from happening?
Manually dividing the value in the console is giving proper output up to ten decimal places.
ColA | ColB | ColC |
---|---|---|
6283 | 4835 | 1.30 |
5784 | 4567 | 1.27 |
In normal console: 6283 / 4835 --> 1.2994829369183040768
5784 / 4567 --> 1.2664768994963870874