File: style_subtle.Rd

package info (click to toggle)
r-cran-pillar 1.8.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,840 kB
  • sloc: sh: 13; makefile: 2
file content (64 lines) | stat: -rw-r--r-- 1,549 bytes parent folder | download | duplicates (2)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sigfig.R, R/styles.R
\name{style_num}
\alias{style_num}
\alias{style_subtle}
\alias{style_subtle_num}
\alias{style_bold}
\alias{style_na}
\alias{style_neg}
\title{Styling helpers}
\usage{
style_num(x, negative, significant = rep_along(x, TRUE))

style_subtle(x)

style_subtle_num(x, negative)

style_bold(x)

style_na(x)

style_neg(x)
}
\arguments{
\item{x}{The character vector to style.}

\item{negative, significant}{Logical vector the same length as \code{x} that
indicate if the values are negative and significant, respectively}
}
\description{
Functions that allow implementers of formatters for custom data types to
maintain a consistent style with the default data types.
}
\details{
\code{style_subtle()} is affected by the \code{subtle} \link[=pillar_options]{option}.

\code{style_subtle_num()} is affected by the
\code{subtle_num} \link[=pillar_options]{option},
which is \code{FALSE} by default.

\code{style_bold()} is affected by the \code{bold} \link[=pillar_options]{option},
which is \code{FALSE} by default.

\code{style_neg()} is affected by the \code{pillar.neg} \link[=pillar_options]{option}.
}
\examples{
style_num(
  c("123", "456"),
  negative = c(TRUE, FALSE)
)
style_num(
  c("123", "456"),
  negative = c(TRUE, FALSE),
  significant = c(FALSE, FALSE)
)
style_subtle("text")
style_subtle_num(0.01 * 1:3, c(TRUE, FALSE, TRUE))
style_bold("Petal.Width")
style_na("NA")
style_neg("123")
}
\seealso{
\link{pillar_options} for a list of options
}