| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/utils.R |
| 3 |
\name{format_bytes} |
| 4 |
\alias{format_bytes} |
| 5 |
\title{Format numbers of bytes using a specified unit} |
| 6 |
\usage{ |
| 7 |
format_bytes(x, units = "auto", ...) |
| 8 |
} |
| 9 |
\arguments{ |
| 10 |
\item{x}{A numeric vector (each element represents a number of bytes).} |
| 11 |
|
| 12 |
\item{units, ...}{Passed to \code{\link[=format.object_size]{format()}}.} |
| 13 |
} |
| 14 |
\value{ |
| 15 |
A character vector. |
| 16 |
} |
| 17 |
\description{ |
| 18 |
Call the S3 method \code{format.object_size()} to format numbers of bytes. |
| 19 |
} |
| 20 |
\examples{ |
| 21 |
xfun::format_bytes(c(1, 1024, 2000, 1e+06, 2e+08)) |
| 22 |
xfun::format_bytes(c(1, 1024, 2000, 1e+06, 2e+08), units = "KB") |
| 23 |
} |