Convert Numeric to Unit Object in R – unit() Function (Example Code)
In this R tutorial you’ll learn how to create a unit object using the unit() function.
Example: Convert Numeric Vector to Unit Object in R [unit() Function]
unit(10:15, "mm") # Applying the unit function # 10mm 11mm 12mm 13mm 14mm 15mm |
unit(10:15, "mm") # Applying the unit function # 10mm 11mm 12mm 13mm 14mm 15mm