Scientific format for columns in {flextable}
Arguments
- x
a flextable object
- i
rows selection
- j
columns selection
- h.sizes
font sizes for titles
- h.colors
font colors for titles
- strike
a list with color and underlined =
TRUE
orFALSE
for strikethrough text- bullet
bullet character used for lists
- code.font
font used for code strings
- code.shading
background color (shading) for code strings
- link.color
color used for URL links
- link.underline
are URL links underlined?
- autolink
are links automatically constructed when there is an URL in the text?
Examples
dat <- data.frame(
x = 1:3,
y = noquote(c("#### text1", "text~2~", "text^3^")),
names = noquote(c("*Iris setosa*", "Iris ~~virginica~~",
"Iris **versicolor**")),
id = c("*setosa*", "`virginica`", "**versicolor**"),
factor = factor(c("*setosa*", "`virginica`", "**versicolor**"))
)
tabularise(dat)
x
y
names
id
factor
1
#### text1
*Iris setosa*
*setosa*
*setosa*
2
text~2~
Iris ~~virginica~~
`virginica`
`virginica`
3
text^3^
Iris **versicolor**
**versicolor**
**versicolor**
tabularise(dat) |> colformat_md() |> Stb$autofit()
x
y
names
id
factor
1
text1darkgray
Iris setosadarkgray
*setosa*
*setosa*
2
text2FALSE
Iris virginicaFALSE
`virginica`
`virginica`
3
text3darkgray
Iris versicolordarkgray
**versicolor**
**versicolor**
tabularise(dat) |> colformat_md(i = 2:3, j = 'names') |> Stb$autofit()
x
y
names
id
factor
1
#### text1
*Iris setosa*
*setosa*
*setosa*
2
text~2~
Iris virginicadarkgray
`virginica`
`virginica`
3
text^3^
Iris versicolorFALSE
**versicolor**
**versicolor**