Skip to content

Commit

Permalink
tinytable: example not conditional on pkgdown
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentarelbundock committed Feb 16, 2024
1 parent 2165648 commit 61a2798
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions man/toTinytable.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,14 @@ Markdown, Word, Typst, PDF, and PNG.
\code{\link[tinytable]{tinytable-package}}
}
\examples{
if (requireNamespace("tinytable") &&
(!requireNamespace("pkgdown") || !pkgdown::in_pkgdown())) {
if (requireNamespace("tinytable")) {

tab <- tabular( (Species + 1) ~ (n=1) + Format(digits=2)*
(Sepal.Length + Sepal.Width)*(mean + sd), data=iris )
print(toTinytable(tab, theme = "striped"))
cat("\n")

tab <- toTinytable(tab)
tab <- tinytable::style_tt(tab, i = 1:2, background = "teal",
color = "white")
print(tab)
tab <- toTinytable(tab, theme = "striped")
tab <- tinytable::style_tt(tab, i = 1:2, background = "teal", color = "white")
tab

}

}

0 comments on commit 61a2798

Please sign in to comment.