binaryPrefix: Binary prefix (KiB,MiB,..)

Description Usage Arguments Details Value See Also Examples

Description

Num of byte needed to fit in n * KiB, MiB ..etc.

Usage

1
binaryPrefix(n, prefix="KiB")

Arguments

n

numeric value

prefix

binary prefix * byte. Expeting a »string«

Details

KiB <- KibiByte MiB <- MebiByte GiB <- GibiByte TiB <- TebiByte PiB <- PebiByte EiB <- ExiByte ZiB <- ZebiByte YiB <- YobiByte

Value

The number of byte fitting in n * binary prefix * byte

See Also

bytesNeeded or fillUpToByte or byte

Examples

1
2
3
4
#Get the number of byte needed to hold 0.5 and 1:10 KiB
binaryPrefix(c(0.5,1:10),"KiB")
#Get the number of bit needed to hold 1 KiB
binaryPrefix(1,"KiB")*byte()

binaryLogic documentation built on May 2, 2019, 10:25 a.m.