Description Usage Arguments Details See Also Examples
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.
1 |
row |
an expression of row range. If missing,
|
col |
an expression of column range. If missing,
|
The function creates an area
object to store
the representation of row and column selector expressions.
When the function is called, the expressions and environment
of row
and column
are captured for
format_table
to evaluate within the context of the
input data.frame
, that is, rownames
and
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 row
and col
are evaluated, respectively, which makes it
easier to specify range with names, for example,
area(row = row1:row10, col = col1:col5)
.
format_table, formattable.data.frame
1 2 3 4 5 |
$row
[1] TRUE
$col
c("mpg", "cyl")
$envir
<environment: R_GlobalEnv>
attr(,"class")
[1] "area"
$row
[1] TRUE
$col
mpg:cyl
$envir
<environment: R_GlobalEnv>
attr(,"class")
[1] "area"
$row
[1] 1
$col
[1] TRUE
$envir
<environment: R_GlobalEnv>
attr(,"class")
[1] "area"
$row
1:10
$col
5:10
$envir
<environment: R_GlobalEnv>
attr(,"class")
[1] "area"
$row
1:10
$col
col1:col5
$envir
<environment: R_GlobalEnv>
attr(,"class")
[1] "area"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.