diff --git a/DESCRIPTION b/DESCRIPTION index e83e8b4..4b27e36 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -4,19 +4,20 @@ Title: splot - Stefan's plotting package Version: 0.1.0 Author: Stefan McKinnon Edwards Maintainer: Stefan McKinnon Edwards -Description: Yet another ggplot2 extension package. +Description: Yet another ggplot2 and knitr extension package. Imports: - ggplot2, - grid, - gridExtra, - gtable, + ggplot2, + grid, + gridExtra, + gtable, + RCurl Depends: - ggplot2, - grid, - gridExtra, - gtable, -Enhances: - ggplot2 + ggplot2, + grid, + gridExtra, + gtable, +Enhances: ggplot2, + knitr License: GPL-3 Encoding: UTF-8 LazyData: true @@ -27,7 +28,9 @@ Collate: 'coord-capped.r' 'coord-flex.r' 'facet-rep-lab.r' + 'knit_print.r' 'splot.r' -Suggests: knitr, +Suggests: + knitr, rmarkdown VignetteBuilder: knitr diff --git a/NAMESPACE b/NAMESPACE index 12d7f93..b196504 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,5 +1,8 @@ # Generated by roxygen2: do not edit by hand +S3method(knit_print,data.frame) +S3method(knit_print,grouped_df) +S3method(knit_print,tbl_df) export(CoordFlexCartesian) export(CoordFlexFixed) export(CoordFlexFlipped) @@ -17,11 +20,11 @@ export(coord_flex_fixed) export(coord_flex_flip) export(facet_rep_grid) export(facet_rep_wrap) -export(find_panel) import(ggplot2) import(grid) import(gridExtra) import(gtable) +import(knitr) importFrom(ggplot2,CoordCartesian) importFrom(ggplot2,CoordFixed) importFrom(ggplot2,CoordFlip) diff --git a/R/knit_print.r b/R/knit_print.r new file mode 100644 index 0000000..0ad7139 --- /dev/null +++ b/R/knit_print.r @@ -0,0 +1,56 @@ + +#' knitr extension: Always use `kable` for data frames. +#' +#' Convenience function for working with R Notebooks that ensures data frames +#' (and dplyr tables) are printed with \code{\link[knitr]{knit_print}} while +#' allowing RStudio to render the data frame dynamically for inline display. +#' \strong{NB:} Automatically enables when package \code{splot} is loaded! +#' +#' To disable these functions use \code{options(knit_print=FALSE)}. +#' Set to \code{TRUE} to re-enable. +#' +#' To supply \code{\link[knitr]{kable}} functions such as \code{caption} or +#' \code{col.names}, set chunk options \code{kable.opts}: +#' +#' \preformatted{ +#' ```{r kable.opts=list(caption='This is kable table caption.')}` +#' data.frame +#' ``` +#' } +#' +#' +#' +#' +#' @param x an data frame or dplyr table object to be printed +#' @param options Current chunk options are passed through this argument. +#' @param ... Ignored for now. +#' @seealso \code{\link[knitr]{knit_print}}, \code{\link[knitr]{kable}} +#' @rdname knit_print +#' @keywords print +#' @export +#' @import knitr +knit_print.data.frame = function(x, options, ...) { + if (getOption('knit_print', default=TRUE) == FALSE) + return(normal_print(x, options, ...)) + opts <- options$`kable.opts` + if (is.null(opts)) opts <- NULL + opts <- RCurl::merge.list(list(x=x, digits=2), opts) + res = paste(c("","", do.call(kable, opts)), collapse="\n") + asis_output(res) +} + +#' @inheritParams knit_print.tbl_df +#' @rdname knit_print +#' @export +#' @keywords print +knit_print.tbl_df = function(x, ...) { + knit_print.data.frame(x, ...) +} + +#' @inheritParams knit_print.tbl_df +#' @rdname knit_print +#' @export +#' @keywords print +knit_print.grouped_df = function(x, ...) { + knit_print.data.frame(x, ...) +} diff --git a/R/splot.r b/R/splot.r index 138e781..61e5634 100644 --- a/R/splot.r +++ b/R/splot.r @@ -11,7 +11,13 @@ #' \code{\link{brackets_horisontal}} and \code{\link{brackets_vertical}}. #' #' +#' @section Extending knitr: #' +#' We automatically load knitr's \code{\link[knitr]{knit_print}} for +#' data frames and dplyr tables to provide automatic pretty printing of +#' data frame using \code{\link[knitr]{kable}}. +#' +#' See \code{\link{knit_print.data.frame}}. #' #' @docType package #' @name splot diff --git a/README-brackets_demo-1.png b/README-brackets_demo-1.png index bbb7ed8..6b63d63 100644 Binary files a/README-brackets_demo-1.png and b/README-brackets_demo-1.png differ diff --git a/README.Rmd b/README.Rmd index 4698300..6d9ff86 100644 --- a/README.Rmd +++ b/README.Rmd @@ -14,7 +14,8 @@ knitr::opts_chunk$set( # splot - Stefan's plotting package -Just another [ggplot2](http://ggplot2.tidyverse.org) extension. +Just another [ggplot2](http://ggplot2.tidyverse.org) and +[knitr](https://yihui.name/knitr/) extension package. ## Installation @@ -49,4 +50,29 @@ ggplot(mtcars, aes(x=as.factor(cyl), y=mpg)) + ``` +## Extensions to knitr + +We automatically load knitr's `lnit_print` for +data frames and dplyr tables to provide automatic pretty printing of +these using `kable`: + +Before loading `splot` package: +```{r knit_print_disable,include=FALSE} +options(knit_print=FALSE) +``` +```{r} +data(USArrests) +head(USArrests) +``` + +After loading `splot`: +```{r knit_print_enable,include=FALSE} +options(knit_print=TRUE) +``` +```{r} +head(USArrests) +``` + +See `knit_print.data.frame`. + diff --git a/README.md b/README.md index b650ccb..b0712fc 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,6 @@ Just another [ggplot2](http://ggplot2.tidyverse.org) extension. Installation ------------ -Installation ------------- - ``` r # Or the the development version from GitHub: # install.packages("devtools") @@ -48,3 +45,39 @@ ggplot(mtcars, aes(x=as.factor(cyl), y=mpg)) + ``` ![](README-brackets_demo-1.png) + +Extensions to knitr +------------------- + +We automatically load knitr's k`nit_print` for data frames and dplyr tables to provide automatic pretty printing of these using `kable`: + +Before loading `splot` package: + +``` r +data(USArrests) +head(USArrests) +#> Murder Assault UrbanPop Rape +#> Alabama 13.2 236 58 21.2 +#> Alaska 10.0 263 48 44.5 +#> Arizona 8.1 294 80 31.0 +#> Arkansas 8.8 190 50 19.5 +#> California 9.0 276 91 40.6 +#> Colorado 7.9 204 78 38.7 +``` + +After loading `splot`: + +``` r +head(USArrests) +``` + +| | Murder| Assault| UrbanPop| Rape| +|------------|-------:|--------:|---------:|-----:| +| Alabama | 13.2| 236| 58| 21.2| +| Alaska | 10.0| 263| 48| 44.5| +| Arizona | 8.1| 294| 80| 31.0| +| Arkansas | 8.8| 190| 50| 19.5| +| California | 9.0| 276| 91| 40.6| +| Colorado | 7.9| 204| 78| 38.7| + +See `knit_print.data.frame`. diff --git a/man/brackets.Rd b/man/brackets.Rd index 31c2d14..3ce94a3 100644 --- a/man/brackets.Rd +++ b/man/brackets.Rd @@ -22,13 +22,20 @@ up, down, left, or right?} \item{length}{Length of the unit, parallel with axis line.} \item{tick.length}{Height (width) of x-axis (y-axis) bracket. -If \code{waiver()}, use \code{axis.ticks.length} from \code{\link{theme}}.} +If \code{waiver()} (default), use \code{axis.ticks.length} from \code{\link{theme}}.} } \description{ To be used with \code{\link{coord_flex_cart}}, \code{\link{coord_capped_cart}}, etc. for displaying brackets instead of the axis ticks and lines. } +\details{ +The looks of the brackets are taken from \code{theme(axis.ticks)}, or +\code{theme(axis.ticks.x)} and \code{theme(axis.ticks.y)}, respectively. + +It does not re-calculate tick marks, but lets \code{scale_x_*} and \code{scale_y_*} +calculate and draw ticks and labels, and then modifies the ticks with brackets. +} \examples{ p <- ggplot(mpg, aes(as.factor(cyl), hwy, colour=class)) + geom_point(position=position_jitter(width=0.3)) + diff --git a/man/knit_print.Rd b/man/knit_print.Rd new file mode 100644 index 0000000..2bb08ca --- /dev/null +++ b/man/knit_print.Rd @@ -0,0 +1,45 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/knit_print.r +\name{knit_print.data.frame} +\alias{knit_print.data.frame} +\alias{knit_print.grouped_df} +\alias{knit_print.tbl_df} +\title{knitr extension: Always use `kable` for data frames.} +\usage{ +\method{knit_print}{data.frame}(x, options, ...) + +\method{knit_print}{tbl_df}(x, ...) + +\method{knit_print}{grouped_df}(x, ...) +} +\arguments{ +\item{x}{an data frame or dplyr table object to be printed} + +\item{options}{Current chunk options are passed through this argument.} + +\item{...}{Ignored for now.} +} +\description{ +Convenience function for working with R Notebooks that ensures data frames +(and dplyr tables) are printed with \code{\link[knitr]{knit_print}} while +allowing RStudio to render the data frame dynamically for inline display. +\strong{NB:} Automatically enables when package \code{splot} is loaded! +} +\details{ +To disable these functions use \code{options(knit_print=FALSE)}. +Set to \code{TRUE} to re-enable. + +To supply \code{\link[knitr]{kable}} functions such as \code{caption} or +\code{col.names}, set chunk options \code{kable.opts}: + +\preformatted{ +```{r kable.opts=list(caption='This is kable table caption.')}` +data.frame +``` +} +} +\seealso{ +\code{\link[knitr]{knit_print}}, \code{\link[knitr]{kable}} +} +\keyword{print} + diff --git a/man/splot.Rd b/man/splot.Rd index ba3a9b2..72d7ac9 100644 --- a/man/splot.Rd +++ b/man/splot.Rd @@ -20,6 +20,16 @@ It automatically uses \code{\link{capped_horisontal}} and \code{\link{capped_vertical}}, but both accepts these as well as \code{\link{brackets_horisontal}} and \code{\link{brackets_vertical}}. } + +\section{Extending knitr}{ + + +We automatically load knitr's \code{\link[knitr]{knit_print}} for +data frames and dplyr tables to provide automatic pretty printing of +data frame using \code{\link[knitr]{kable}}. + +See \code{\link{knit_print.data.frame}}. +} \author{ Stefan McKinnon Edwards } diff --git a/vignettes/capped-axes.R b/vignettes/capped-axes.R new file mode 100644 index 0000000..ddeedbe --- /dev/null +++ b/vignettes/capped-axes.R @@ -0,0 +1,53 @@ +## ----setup,include=FALSE------------------------------------------------- +library(knitr) + +knitr::opts_chunk$set(fig.height=4, fig.width=6) + +## ----load_pkg_and_data,fig.cap='Default ggplot2 plotting.'--------------- +#library(ggplot2) +library(splot) + +dat1 <- data.frame( + gp = factor(rep(letters[1:3], each = 10)), + y = rnorm(30), + cl = sample.int(3, 30, replace=TRUE), + cl2 = sample(c('a','b','c'), 30, replace=TRUE) +) + +my.theme <- theme_light() + +( + p <- ggplot(dat1, aes(gp, y)) + geom_point() + my.theme +) + +## ----theme--------------------------------------------------------------- +my.theme <- my.theme + theme(panel.border=element_blank(), axis.line = element_line()) +p <- p + my.theme + +## ----fig.cap='Using `coord_capped_cart` to cap the bottom axis from the right. The left axis is unaffected.'---- +p + coord_capped_cart(bottom='right') + +## ----fig.cap='As before, but left axis is now also capped to give a consistent look.'---- +p + coord_capped_cart(bottom='right', left='none') + +## ----fig.cap='Placing brackets brackets instead of ticks emphasises that the x-scale is categorical and not nominal.'---- +ggplot(dat1, aes(gp, y)) + geom_point(position=position_jitter(width=0.2, height=0)) + + coord_capped_cart(left='none', bottom=brackets_horisontal()) + + my.theme + theme(panel.grid.major.x = element_blank()) + +## ----eval=FALSE---------------------------------------------------------- +# +# # Facet grid ----------------- +# ggplot(dat1, aes(gp, y)) + geom_point() + +# coord_capped_flip(bottom = 'left', left='none') + +# theme(axis.title=element_blank(), plot.title=element_text(size=rel(1))) + +# facet_rep_grid(~cl) +# +# dat2 <- rbind(dat1, data.frame(gp=letters[1:3], y=rnorm(3, 2), cl=3, cl2='b')) +# ggplot(dat2, aes(gp, y)) + geom_point() + +# coord_capped_flip(bottom = 'left', left='none') + +# theme(axis.title=element_blank(), plot.title=element_text(size=rel(1))) + +# facet_rep_grid(.~cl, scales='free_y') +# +# + diff --git a/vignettes/capped-axes.html b/vignettes/capped-axes.html new file mode 100644 index 0000000..173ed90 --- /dev/null +++ b/vignettes/capped-axes.html @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + +Capping axis lines + + + + + + + + + + + + + + + + + +

Capping axis lines

+

Stefan McKinnon Edwards sme@iysik.com

+

2017-04-27

+ + + +
+

Demonstration

+

A quick demonstration of capping the lines.

+

First, load the package, generate a dataset and display it.

+
#library(ggplot2)
+library(splot)
+
+dat1 <- data.frame(
+  gp = factor(rep(letters[1:3], each = 10)),
+  y = rnorm(30),
+  cl = sample.int(3, 30, replace=TRUE),
+  cl2 = sample(c('a','b','c'), 30, replace=TRUE)
+)
+
+my.theme <- theme_light()
+
+(
+  p <- ggplot(dat1, aes(gp, y)) + geom_point() + my.theme
+)
+
+Default ggplot2 plotting. +

Default ggplot2 plotting.

+
+

NB: In order to manipulate the axis lines, they must be drawn. Modify the theme so the panel.border is not drawn (it will be on top of the axis lines), and have the axis lines drawn:

+
my.theme <- my.theme + theme(panel.border=element_blank(), axis.line = element_line())
+p <- p + my.theme
+

Now, let’s have some fun.

+

We cap the bottom axis line to the right-most tick. The left end is also capped by the amount specified with the gap argument (at time of writing, defaulted at 0.01).

+
p + coord_capped_cart(bottom='right')
+
+Using coord_capped_cart to cap the bottom axis from the right. The left axis is unaffected. +

Using coord_capped_cart to cap the bottom axis from the right. The left axis is unaffected.

+
+

To keep the axis lines consistent, we also specify the left argument, which still caps the left axis line by the amount specified with the gap argument.

+
p + coord_capped_cart(bottom='right', left='none')
+
+As before, but left axis is now also capped to give a consistent look. +

As before, but left axis is now also capped to give a consistent look.

+
+

To avoid overplotting, we can apply a jitter. To emphasise that the x-axis is categorical, we can place brackets. We finally polish the plot by removing the redundant vertical grid lines.

+
ggplot(dat1, aes(gp, y)) + geom_point(position=position_jitter(width=0.2, height=0)) +
+  coord_capped_cart(left='none', bottom=brackets_horisontal()) +
+  my.theme + theme(panel.grid.major.x = element_blank())
+
+Placing brackets brackets instead of ticks emphasises that the x-scale is categorical and not nominal. +

Placing brackets brackets instead of ticks emphasises that the x-scale is categorical and not nominal.

+
+
+
+

The coord objects

+
+
+

Facets

+
# Facet grid -----------------
+ggplot(dat1, aes(gp, y)) + geom_point() + 
+  coord_capped_flip(bottom = 'left', left='none') + 
+  theme(axis.title=element_blank(), plot.title=element_text(size=rel(1))) +
+  facet_rep_grid(~cl)
+
+dat2 <- rbind(dat1, data.frame(gp=letters[1:3], y=rnorm(3, 2), cl=3, cl2='b'))
+ggplot(dat2, aes(gp, y)) + geom_point() + 
+  coord_capped_flip(bottom = 'left', left='none') + 
+  theme(axis.title=element_blank(), plot.title=element_text(size=rel(1))) +
+  facet_rep_grid(.~cl, scales='free_y')
+

Also a quote using >:

+
+

“He who gives up [code] safety for [code] speed deserves neither.” (via)

+
+
+ + + + + + + + diff --git a/vignettes/knit_print.R b/vignettes/knit_print.R new file mode 100644 index 0000000..5c15d4e --- /dev/null +++ b/vignettes/knit_print.R @@ -0,0 +1,44 @@ +## ----setup,include=FALSE------------------------------------------------- +library(knitr) + +knitr::opts_chunk$set(fig.height=4, fig.width=6, verbatim=FALSE) + +# Show chunk verbatim +# Source: http://stackoverflow.com/questions/19908158/show-an-r-markdown-chunk-in-the-final-output +# Set verbatim option as last and it will not be printed. ;) +hook_source_def = knit_hooks$get('source') +knit_hooks$set(source = function(x, options){ + if (!is.null(options$verbatim) && options$verbatim){ + opts = gsub(",\\s*verbatim\\s*=\\s*TRUE\\s*", "", options$params.src) + bef = sprintf('\n\n ```{r %s}\n', opts, "\n") + stringr::str_c(bef, paste(knitr:::indent_block(x, " "), collapse = '\n'), "\n ```\n") + } else { + hook_source_def(x, options) + } +}) + + +## ------------------------------------------------------------------------ +data(USArrests) +head(USArrests) + +## ------------------------------------------------------------------------ +library(splot) + +## ----kable.opts=list(caption="Data frame is now printed using `kable`."),verbatim=TRUE---- +head(USArrests) + +## ----disable_knit_print-------------------------------------------------- +options(knit_print=FALSE) +head(USArrests) + +## ------------------------------------------------------------------------ +kable(head(USArrests)) + +## ----reenable_knit_print------------------------------------------------- +options(knit_print=TRUE) +head(USArrests) + +## ------------------------------------------------------------------------ +kable(head(USArrests)) + diff --git a/vignettes/knit_print.Rmd b/vignettes/knit_print.Rmd new file mode 100644 index 0000000..1a30d2a --- /dev/null +++ b/vignettes/knit_print.Rmd @@ -0,0 +1,91 @@ +--- +title: "Use `kable` for printing data frames" +author: "Stefan McKinnon Edwards " +date: "`r Sys.Date()`" +output: + rmarkdown::html_vignette: + fig_caption: yes +vignette: > + %\VignetteIndexEntry{Use kable for printing data frame in knitr documents} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +This vignette demonstrates how load the `splot` package automatically +enables pretty printing of data frames with knitr's `kable`. + +The beauty of defining the function `knit_print.data.frame` is that when +working with R Notebooks in R, the editor can output the data frame dynamically, +while ensuring that the knitted document also has the + + +```{r setup,include=FALSE} +library(knitr) + +knitr::opts_chunk$set(fig.height=4, fig.width=6, verbatim=FALSE) + +# Show chunk verbatim +# Source: http://stackoverflow.com/questions/19908158/show-an-r-markdown-chunk-in-the-final-output +# Set verbatim option as last and it will not be printed. ;) +hook_source_def = knit_hooks$get('source') +knit_hooks$set(source = function(x, options){ + if (!is.null(options$verbatim) && options$verbatim){ + opts = gsub(",\\s*verbatim\\s*=\\s*TRUE\\s*", "", options$params.src) + bef = sprintf('\n\n ```{r %s}\n', opts, "\n") + stringr::str_c(bef, paste(knitr:::indent_block(x, " "), collapse = '\n'), "\n ```\n") + } else { + hook_source_def(x, options) + } +}) + +``` + +First we load some data and show the top. +```{r} +data(USArrests) +head(USArrests) +``` + +Now load `splot`. + +```{r} +library(splot) +``` + +**The same view is now nicely printed!** +```{r kable.opts=list(caption="Data frame is now printed using `kable`."),verbatim=TRUE} +head(USArrests) +``` + +Notice how we specified `kable` options using the chunk option `kable.opts`. + +**Disabling the functions.** + +```{r disable_knit_print} +options(knit_print=FALSE) +head(USArrests) +``` + +You can still ask for `kable`. + +```{r} +kable(head(USArrests)) +``` + +**`knit_print` re-enabled.** + +```{r reenable_knit_print} +options(knit_print=TRUE) +head(USArrests) +``` + +The above code block, when edited in RStudio, would look like this: +![Viewing data frames in R Notebooks in RStudio](knit_print_capture.png) + +We can still use `kable`, +```{r} +kable(head(USArrests)) +``` + +But in RStudio, it would look like this: +![RStudio renders kable'd data frames rather eh](knit_print_capture2.png) \ No newline at end of file diff --git a/vignettes/knit_print.html b/vignettes/knit_print.html new file mode 100644 index 0000000..48d441c --- /dev/null +++ b/vignettes/knit_print.html @@ -0,0 +1,398 @@ + + + + + + + + + + + + + + + + +Use kable for printing data frames + + + + + + + + + + + + + + + + + +

Use kable for printing data frames

+

Stefan McKinnon Edwards sme@iysik.com

+

2017-04-27

+ + + +

This vignette demonstrates how load the splot package automatically enables pretty printing of data frames with knitr’s kable.

+

The beauty of defining the function knit_print.data.frame is that when working with R Notebooks in R, the editor can output the data frame dynamically, while ensuring that the knitted document also has the

+

First we load some data and show the top.

+
data(USArrests)
+head(USArrests)
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MurderAssaultUrbanPopRape
Alabama13.22365821.2
Alaska10.02634844.5
Arizona8.12948031.0
Arkansas8.81905019.5
California9.02769140.6
Colorado7.92047838.7
+

Now load splot.

+
library(splot)
+

The same view is now nicely printed!

+
```{r kable.opts=list(caption="Data frame is now printed using `kable`.")}
+head(USArrests)
+```
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Data frame is now printed using kable.
MurderAssaultUrbanPopRape
Alabama13.22365821.2
Alaska10.02634844.5
Arizona8.12948031.0
Arkansas8.81905019.5
California9.02769140.6
Colorado7.92047838.7
+

Notice how we specified kable options using the chunk option kable.opts.

+

Disabling the functions.

+
options(knit_print=FALSE)
+head(USArrests)
+
##            Murder Assault UrbanPop Rape
+## Alabama      13.2     236       58 21.2
+## Alaska       10.0     263       48 44.5
+## Arizona       8.1     294       80 31.0
+## Arkansas      8.8     190       50 19.5
+## California    9.0     276       91 40.6
+## Colorado      7.9     204       78 38.7
+

You can still ask for kable.

+
kable(head(USArrests))
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MurderAssaultUrbanPopRape
Alabama13.22365821.2
Alaska10.02634844.5
Arizona8.12948031.0
Arkansas8.81905019.5
California9.02769140.6
Colorado7.92047838.7
+

knit_print re-enabled.

+
options(knit_print=TRUE)
+head(USArrests)
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MurderAssaultUrbanPopRape
Alabama13.22365821.2
Alaska10.02634844.5
Arizona8.12948031.0
Arkansas8.81905019.5
California9.02769140.6
Colorado7.92047838.7
+

The above code block, when edited in RStudio, would look like this: Viewing data frames in R Notebooks in RStudio

+

We can still use kable,

+
kable(head(USArrests))
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MurderAssaultUrbanPopRape
Alabama13.22365821.2
Alaska10.02634844.5
Arizona8.12948031.0
Arkansas8.81905019.5
California9.02769140.6
Colorado7.92047838.7
+

But in RStudio, it would look like this: RStudio renders kable’d data frames rather eh

+ + + + + + + + diff --git a/vignettes/knit_print_capture.png b/vignettes/knit_print_capture.png new file mode 100644 index 0000000..50002c3 Binary files /dev/null and b/vignettes/knit_print_capture.png differ diff --git a/vignettes/knit_print_capture2.png b/vignettes/knit_print_capture2.png new file mode 100644 index 0000000..dddc697 Binary files /dev/null and b/vignettes/knit_print_capture2.png differ