# By default, the function assumes that `x`
# was either rounded up or down:
unround(x = "2.7")
# If `x` was rounded up, run this:
unround(x = "2.7", rounding = "up")
# Likewise with rounding down...
unround(x = "2.7", rounding = "down")
# ...and with `base::round()` which, broadly
# speaking, rounds to the nearest even number:
unround(x = "2.7", rounding = "even")
# Multiple input number-strings return
# multiple rows in the output data frame:
unround(x = c(3.6, "5.20", 5.174))
Run the code above in your browser using DataLab