byte-conversion: Convert Byte notation to Numeric

Description Usage Arguments Value Note Examples

Description

These function turnsbyte notation to numeric using a byte conversion. Useful for turning the memUsage column to numeric.

Usage

1
2
3
4
5
6
7

Arguments

units

A character vector to convert to bytes

Value

A character vector of size converted from the input. The attr("unit") contains the unit of the result.

Note

The following table are used, based on Google Unit converter:

bytes

kib

mib

gib

Examples

1
2
3
4
5
un <- c("55.12kiB","12.09MiB","21.75GiB","467.2MiB","42.91MiB")
to_b(un)
to_kib(un)
to_mib(un)
to_gib(un)

ColinFay/dockerstats documentation built on May 18, 2020, 11:54 a.m.