Code
label_bytes("unit")(0)
Condition
Error:
! `units` must be one of "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB", "kiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", or "YiB", not "unit".
Code
number_bytes(c(50, 400, 502, NA), symbol = "k")
Condition
Warning:
`symbol` must be one of auto, B, KiB, MiB, GiB, TiB, PiB, EiB, ZiB, or YiB
i The provided value ("k") will be changed to the default ("auto")
Output
[1] "50 B" "400 B" "502 B" NA
Code
number_bytes(1024^(1:2), "kB", units = "binary")
Condition
Warning:
`symbol` must be one of auto, B, KiB, MiB, GiB, TiB, PiB, EiB, ZiB, or YiB
i The provided value ("kB") will be changed to the default ("auto")
Output
[1] "1 KiB" "1 MiB"
Code
number_bytes(1024^(1:2), "KiB", units = "si")
Condition
Warning:
`symbol` must be one of auto, B, kB, MB, GB, TB, PB, EB, ZB, or YB
i The provided value ("KiB") will be changed to the default ("auto")
Output
[1] "1 kB" "1 MB"
Code
number_bytes(symbol = character())
Condition
Error in `validate_byte_symbol()`:
! `symbol` must have length 1, not length 0
Code
number_bytes(symbol = c("kB", "MB"))
Condition
Error in `validate_byte_symbol()`:
! `symbol` must have length 1, not length 2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.