numform (version 0.5.0)

f_data_abbreviation: Convert Data (byte) Labels to an Abbreviated Form

Description

Convert a data label such as Gigabyte to an abbreviated form like 'GB'.

Usage

f_data_abbreviation(x, ...)

Arguments

x

A vector of data labels. One of: "Petabyte", "Exabyte", "Zettabyte", "Yottabyte") ignoring case or retaining c("b", "B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB") with proper case.

ignored.

Value

Returns avector of abbreviated data units.

Examples

Run this code
# NOT RUN {
x <- c("Exabyte", "terabyte", "ZB", "PetaByte", "KB", "byte", "Gigabyte",
"Bit", "GB", "b")

f_data_abbreviation(x)
# }

Run the code above in your browser using DataLab