File: percent.Rd

package info (click to toggle)
r-cran-formattable 0.2.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 420 kB
  • sloc: javascript: 15; sh: 12; makefile: 2
file content (32 lines) | stat: -rw-r--r-- 849 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/formats.R
\name{percent}
\alias{percent}
\alias{percent.default}
\alias{percent.character}
\title{Numeric vector with percentage representation}
\usage{
percent(x, digits, format = "f", ...)

\method{percent}{default}(x, digits = 2L, format = "f", ...)

\method{percent}{character}(x, digits = NA, format = "f", ...)
}
\arguments{
\item{x}{a numeric vector.}

\item{digits}{an integer to indicate the number of digits of the percentage string.}

\item{format}{format type passed to \code{\link{formatC}}.}

\item{...}{additional parameters passed to \code{formattable}.}
}
\description{
Numeric vector with percentage representation
}
\examples{
percent(rnorm(10, 0, 0.1))
percent(rnorm(10, 0, 0.1), digits = 0)
percent("0.5\%")
percent(c("15.5\%", "25.12\%", "73.5"))
}