how to round of the output values to 4 fraction points

hi, I have a r function whose output is giving result upto 8 fraction points how can I only get upto 4 fraction values.

pi
#> [1] 3.141593
round(pi,2)
#> [1] 3.14

Created on 2020-07-15 by the reprex package (v0.3.0)

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.