Drop version due to CRAN resubmission; Add examples as requested
diff --git a/man/add_footnote.Rd b/man/add_footnote.Rd
index e7104cc..d3839a3 100644
--- a/man/add_footnote.Rd
+++ b/man/add_footnote.Rd
@@ -18,7 +18,8 @@
`number`, `alphabet` and `symbol`.}
\item{threeparttable}{Boolean value indicating if a
-\href{https://www.ctan.org/pkg/threeparttable}{threeparttable} scheme should be used.}
+\href{https://www.ctan.org/pkg/threeparttable}{threeparttable} scheme should
+be used.}
}
\description{
Add footnote to your favorite kable output. So far this function
@@ -27,3 +28,8 @@
\code{threeparttable} package so you need to import this package in your
\code{YAML} header.
}
+\examples{
+x <- knitr::kable(head(mtcars), "html")
+add_footnote(x, c("footnote 1", "footnote 2"), notation = "symbol")
+
+}
diff --git a/man/add_header_above.Rd b/man/add_header_above.Rd
index b65516f..09b976d 100644
--- a/man/add_header_above.Rd
+++ b/man/add_header_above.Rd
@@ -21,3 +21,10 @@
function and adds an header row on top of it. This function can work with
both `HTML` and `LaTeX` outputs
}
+\examples{
+x <- knitr::kable(head(mtcars), "html")
+# Add a row of header with 3 columns on the top of the table. The column
+# span for the 2nd and 3rd one are 5 & 6.
+add_header_above(x, c(" ", "Group 1" = 5, "Group 2" = 6))
+
+}
diff --git a/man/add_indent.Rd b/man/add_indent.Rd
index 2ee3d54..e141e70 100644
--- a/man/add_indent.Rd
+++ b/man/add_indent.Rd
@@ -15,3 +15,9 @@
\description{
Add indentations to row headers
}
+\examples{
+x <- knitr::kable(head(mtcars), "html")
+# Add indentations to the 2nd & 4th row
+add_indent(x, c(2, 4))
+
+}
diff --git a/man/column_spec.Rd b/man/column_spec.Rd
index d7a08ec..a107eb8 100644
--- a/man/column_spec.Rd
+++ b/man/column_spec.Rd
@@ -4,7 +4,8 @@
\alias{column_spec}
\title{Specify the look of the selected column}
\usage{
-column_spec(kable_input, column, width = NULL, bold = F, italic = F)
+column_spec(kable_input, column, width = NULL, bold = FALSE,
+ italic = FALSE)
}
\arguments{
\item{kable_input}{Output of `knitr::kable()` with `format` specified}
@@ -25,3 +26,8 @@
its look. Right now it supports the following three properties: column width,
bold text and italic text.
}
+\examples{
+x <- knitr::kable(head(mtcars), "html")
+column_spec(x, 1, width = "20em", bold = TRUE, italic = TRUE)
+
+}
diff --git a/man/group_rows.Rd b/man/group_rows.Rd
index 1a313e6..6cf58ee 100644
--- a/man/group_rows.Rd
+++ b/man/group_rows.Rd
@@ -30,3 +30,9 @@
\description{
Group a few rows in a table together under a label.
}
+\examples{
+x <- knitr::kable(head(mtcars), "html")
+# Put Row 2 to Row 5 into a Group and label it as "Group A"
+group_rows(x, "Group A", 2, 5)
+
+}
diff --git a/man/kable_styling.Rd b/man/kable_styling.Rd
index 2ba0b1c..09893d6 100644
--- a/man/kable_styling.Rd
+++ b/man/kable_styling.Rd
@@ -47,3 +47,11 @@
of HTML tables other than using the `table.attr` option in `knitr::kable()`.
Currenly, it assumes the HTML document has boot
}
+\examples{
+x_html <- knitr::kable(head(mtcars), "html")
+kable_styling(x_html, "striped", position = "left", font_size = 7)
+
+x_latex <- knitr::kable(head(mtcars), "latex")
+kable_styling(x_latex, latex_options = "striped", position = "float_left")
+
+}
diff --git a/man/landscape.Rd b/man/landscape.Rd
index 48bc501..793569b 100644
--- a/man/landscape.Rd
+++ b/man/landscape.Rd
@@ -16,3 +16,7 @@
This function will put the table on an single landscape page.
It's useful for wide tables that cann't be printed on a portrait page.
}
+\examples{
+landscape(knitr::kable(head(mtcars), "latex"))
+
+}
diff --git a/man/magic_mirror.Rd b/man/magic_mirror.Rd
index 56b3f79..5e1497c 100644
--- a/man/magic_mirror.Rd
+++ b/man/magic_mirror.Rd
@@ -12,3 +12,6 @@
\description{
Mirror mirror tell me, how does this kable look like?
}
+\examples{
+magic_mirror(knitr::kable(head(mtcars), "html"))
+}
diff --git a/man/usepackage_latex.Rd b/man/usepackage_latex.Rd
index 6b6b16c..62cabb8 100644
--- a/man/usepackage_latex.Rd
+++ b/man/usepackage_latex.Rd
@@ -15,3 +15,6 @@
Load a LaTeX package using R code. Just like `\\usepackage{}`
in LaTeX
}
+\examples{
+usepackage_latex("xcolor")
+}