I would like to insert two decimal places in output. Value refers to the value in meters and output is the value in kilometers, however after I do output I have zero result for the first example, however I would like it to be 0.23 Km . I left it round, because in some cases it makes sense, as for the second example, which was rounded to 1 km. How can I adjust this?
Example 1
value1 = 233
output1<-round(value1/1000)
output1
> output1
[1] 0
Example2
value2 = 970
output2<-round(value2/1000)
output2
> output2
[1] 1