binaryPrefix {binaryLogic}R Documentation

Binary prefix (KiB,MiB,..)

Description

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

Usage

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

#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()

[Package binaryLogic version 0.3.9 Index]