Prepare for CRAN release
diff --git a/DESCRIPTION b/DESCRIPTION
index df45d70..3e42071 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,7 +1,7 @@
Package: kableExtra
Type: Package
-Title: Construct Complex Table with 'Kable' and Pipe Syntax
-Version: 0.1.0.9000
+Title: Construct Complex Table with 'kable' and Pipe Syntax
+Version: 0.2.0
Authors@R: c(
person('Hao', 'Zhu', email = 'haozhu233@gmail.com', role = c('aut', 'cre')),
person('Will', 'Beasley', email = 'wibeasley@hotmail.com', role = 'ctb'),
diff --git a/R/add_indent.R b/R/add_indent.R
index 62c0a4e..6e71a44 100644
--- a/R/add_indent.R
+++ b/R/add_indent.R
@@ -1,4 +1,9 @@
#' Add indentations to row headers
+#'
+#' @param kable_input Output of `knitr::kable()` with `format` specified
+#' @param positions A vector of numeric row numbers for the rows that need to
+#' be indented.
+#'
#' @export
add_indent <- function(kable_input, positions) {
if (!is.numeric(positions)) {
diff --git a/R/group_rows.R b/R/group_rows.R
index 48c1cf2..cb0190f 100644
--- a/R/group_rows.R
+++ b/R/group_rows.R
@@ -1,5 +1,21 @@
#' Put a few rows of a table into one category
#'
+#' @description Group a few rows in a table together under a label.
+#'
+#' @param kable_input Output of `knitr::kable()` with `format` specified
+#' @param group_label A character string for the name of the group
+#' @param start_row A numeric value that tells the function in which row the
+#' group starts. Note that the counting excludes header rows and other group
+#' labeling rows
+#' @param end_row A numeric value that tells the function in which row the group
+#' ends.
+#' @param label_row_css A character string for any customized css used for the
+#' labeling row. By default, the labeling row will have a solid black line
+#' underneath. Only useful for HTML documents.
+#' @param latex_gap_space A character value telling LaTeX how large the gap
+#' between the previous row and the group labeling row. Only useful for LaTeX
+#' documents.
+#'
#' @export
group_rows <- function(kable_input, group_label, start_row, end_row,
label_row_css = "border-bottom: 1px solid;",
diff --git a/docs/awesome_table_in_pdf.pdf b/docs/awesome_table_in_pdf.pdf
index 4696e93..7d2884c 100644
--- a/docs/awesome_table_in_pdf.pdf
+++ b/docs/awesome_table_in_pdf.pdf
Binary files differ
diff --git a/docs/index.html b/docs/index.html
index 118e071..5c1b1b3 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -81,6 +81,9 @@
<li>
<a href="awesome_table_in_pdf.pdf" class="normal-link">for LaTeX</a>
</li>
+ <li>
+ <a href="use_kable_in_shiny.html" class="normal-link">Use it in Shiny</a>
+ </li>
</ul>
</div>
</div>
diff --git a/docs/use_kable_in_shiny.Rmd b/docs/use_kable_in_shiny.Rmd
index c66e9e6..d56859b 100644
--- a/docs/use_kable_in_shiny.Rmd
+++ b/docs/use_kable_in_shiny.Rmd
@@ -7,6 +7,7 @@
knitr::opts_chunk$set(echo = TRUE)
```
+To use `knitr::kable()` and `kableExtra` in shiny couldn't be simpler.
```{r, eval = FALSE}
library(shiny)
diff --git a/docs/use_kable_in_shiny.html b/docs/use_kable_in_shiny.html
index add2265..a34a13f 100644
--- a/docs/use_kable_in_shiny.html
+++ b/docs/use_kable_in_shiny.html
@@ -120,6 +120,7 @@
</div>
+<p>To use <code>knitr::kable()</code> and <code>kableExtra</code> in shiny couldn’t be simpler.</p>
<pre class="r"><code>library(shiny)
ui <- fluidPage(
diff --git a/inst/NEWS b/inst/NEWS
index 045cc70..6a418aa 100644
--- a/inst/NEWS
+++ b/inst/NEWS
@@ -11,6 +11,9 @@
* Changed `stop` to `message` on format checking.
+* Added an example for how to use it in Shiny.
+
+* Fixed a few errors in the LaTeX vignette file.
kableExtra 0.1.0
diff --git a/man/add_indent.Rd b/man/add_indent.Rd
index 43fad6d..2ee3d54 100644
--- a/man/add_indent.Rd
+++ b/man/add_indent.Rd
@@ -6,6 +6,12 @@
\usage{
add_indent(kable_input, positions)
}
+\arguments{
+\item{kable_input}{Output of `knitr::kable()` with `format` specified}
+
+\item{positions}{A vector of numeric row numbers for the rows that need to
+be indented.}
+}
\description{
Add indentations to row headers
}
diff --git a/man/group_rows.Rd b/man/group_rows.Rd
index 9785839..1a313e6 100644
--- a/man/group_rows.Rd
+++ b/man/group_rows.Rd
@@ -4,8 +4,29 @@
\alias{group_rows}
\title{Put a few rows of a table into one category}
\usage{
-group_rows(kable_input, group_name, start_row, end_row)
+group_rows(kable_input, group_label, start_row, end_row,
+ label_row_css = "border-bottom: 1px solid;", latex_gap_space = "0.5em")
+}
+\arguments{
+\item{kable_input}{Output of `knitr::kable()` with `format` specified}
+
+\item{group_label}{A character string for the name of the group}
+
+\item{start_row}{A numeric value that tells the function in which row the
+group starts. Note that the counting excludes header rows and other group
+labeling rows}
+
+\item{end_row}{A numeric value that tells the function in which row the group
+ends.}
+
+\item{label_row_css}{A character string for any customized css used for the
+labeling row. By default, the labeling row will have a solid black line
+underneath. Only useful for HTML documents.}
+
+\item{latex_gap_space}{A character value telling LaTeX how large the gap
+between the previous row and the group labeling row. Only useful for LaTeX
+documents.}
}
\description{
-Put a few rows of a table into one category
+Group a few rows in a table together under a label.
}
diff --git a/vignettes/use_kable_in_shiny.Rmd b/vignettes/use_kable_in_shiny.Rmd
index c66e9e6..d56859b 100644
--- a/vignettes/use_kable_in_shiny.Rmd
+++ b/vignettes/use_kable_in_shiny.Rmd
@@ -7,6 +7,7 @@
knitr::opts_chunk$set(echo = TRUE)
```
+To use `knitr::kable()` and `kableExtra` in shiny couldn't be simpler.
```{r, eval = FALSE}
library(shiny)