Scientific format for columns in {flextable}
a flextable object
rows selection
columns selection
font sizes for titles
font colors for titles
a list with color and underlined = TRUE
or FALSE
for strikethrough text
bullet character used for lists
font used for code strings
background color (shading) for code strings
color used for URL links
are URL links underlined?
are links automatically constructed when there is an URL in the text?
the flextable object with the selected region formatted as markdown strings.
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**