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

Description Usage Arguments Value Examples

View source: R/f_data.R

Description

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

Usage

1

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

1
2
3
4
x <- c("Exabyte", "terabyte", "ZB", "PetaByte", "KB", "byte", "Gigabyte",
"Bit", "GB", "b")

f_data_abbreviation(x)

numform documentation built on Oct. 10, 2021, 1:10 a.m.