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

Leave a Reply

Your email address will not be published.

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed

Menu
Top