File: area.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 (45 lines) | stat: -rw-r--r-- 1,409 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
33
34
35
36
37
38
39
40
41
42
43
44
45
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/formatter.R
\name{area}
\alias{area}
\title{Create an area to apply formatter}
\usage{
area(row, col)
}
\arguments{
\item{row}{an expression of row range. If missing,
\code{TRUE} is used instead.}

\item{col}{an expression of column range. If missing,
\code{TRUE} is used instead.}
}
\description{
Create an representation of two-dimenstional area
to apply formatter function. The area can be one or
more columns, one or more rows, or an area of rows
and columns.
}
\details{
The function creates an \code{area} object to store
the representation of row and column selector expressions.
When the function is called, the expressions and environment
of \code{row} and \code{column} are captured for
\code{format_table} to evaluate within the context of the
input \code{data.frame}, that is, \code{rownames} and
\code{colnames} are defined in the context to be the indices
of rows and columns, respectively. Therefore, the row names
and column names are avaiable symbols when \code{row}
and \code{col} are evaluated, respectively, which makes it
easier to specify range with names, for example,
\code{area(row = row1:row10, col = col1:col5)}.
}
\examples{
area(col = c("mpg", "cyl"))
area(col = mpg:cyl)
area(row = 1)
area(row = 1:10, col = 5:10)
area(1:10, col1:col5)
}
\seealso{
\link{format_table}, \link{formattable.data.frame}
}