Skip to content

Commit

Permalink
spelling, Rmarkdown --> R Markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
dcomtois committed Jul 20, 2021
1 parent 8ac15f8 commit 1af8ba7
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 2,912 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
vignettes/*.R
vignettes/*.html
inst/includes/fig-align.tex
^doc$
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ TODO.txt
tests/*
img/ds*.png
vignettes/*.R
vignettes/vignette.css
notes/
vignettes/*.R
inst/doc
/doc/
/Meta/
4 changes: 2 additions & 2 deletions R/st_css.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' Include \strong{summarytools}' \emph{css} Into Active Document
#'
#' Generates the \emph{css} needed by \strong{summarytools} in
#' \emph{R Markdown} documents.
#' \emph{R markdown} documents.
#'
#' @param main Logical. Include \emph{summarytools.css} file. \code{TRUE} by
#' default. Affects only \strong{summarytools} objects.
Expand All @@ -17,7 +17,7 @@
#' @param \dots Character. Path to additional \emph{css} file(s) to include.
#'
#' @details Typically the function is called right after the initial setup chunk
#' of an \emph{R Markdown} document, in a chunk having options
#' of an \emph{R markdown} document, in a chunk having options
#' \code{echo=FALSE} and \code{results="asis"}.
#'
#' @keywords utilities
Expand Down
2 changes: 1 addition & 1 deletion R/view.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#'
#' @details
#' Creates \emph{html} outputs and displays them in \emph{RStudio}'s viewer, in
#' a browser, or renders the \emph{html} code in \emph{R Markdown} documents.
#' a browser, or renders the \emph{html} code in \emph{R markdown} documents.
#'
#' For objects of class \dQuote{\emph{summarytools}}, this function is simply
#' a wrapper around \code{\link{print.summarytools}} with
Expand Down
4 changes: 2 additions & 2 deletions man/st_css.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/view.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions vignettes/.gitignore

This file was deleted.

9 changes: 5 additions & 4 deletions vignettes/Introduction.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ output:
fig_caption: false
toc: true
toc_depth: 1
css:
- !expr system.file("rmarkdown/templates/html_vignette/resources/vignette.css",
package = "rmarkdown")
css: vignette.css
vignette: >
%\VignetteIndexEntry{Introduction to summarytools}
%\VignetteEngine{knitr::rmarkdown}
Expand All @@ -21,7 +19,10 @@ vignette: >

```{r setup, include=FALSE}
library(knitr)
opts_chunk$set(comment = NA, prompt = FALSE, cache = FALSE, results = 'asis')
opts_chunk$set(comment = NA,
prompt = FALSE,
cache = FALSE,
results = 'asis')
library(kableExtra)
library(summarytools)
library(magrittr)
Expand Down
2,887 changes: 0 additions & 2,887 deletions vignettes/Introduction.html

This file was deleted.

32 changes: 20 additions & 12 deletions vignettes/Recommendations-rmarkdown.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ output:
fig_caption: false
toc: true
toc_depth: 1
css:
- !expr system.file("rmarkdown/templates/html_vignette/resources/vignette.css",
package = "rmarkdown")
css: vignette.css
vignette: >
%\VignetteIndexEntry{Recommendations for R Markdown}
%\VignetteEngine{knitr::rmarkdown}
Expand All @@ -18,24 +16,25 @@ vignette: >
%\VignetteDepends{kableExtra}
---

```{r, include=FALSE}

```{r setup, include=FALSE}
library(knitr)
opts_chunk$set(comment = NA,
prompt = FALSE,
cache = FALSE,
echo = TRUE,
results = 'asis')
library(summarytools)
```

```{r, echo=FALSE}
st_options(bootstrap.css = FALSE, # Already part of the theme so no need for it
plain.ascii = FALSE, # One of the essential settings
style = "rmarkdown", # Idem.
dfSummary.silent = TRUE, # Suppresses messages about temporary files
footnote = NA, # Keeping the results minimalistic
subtitle.emphasis = FALSE) # For the vignette theme, this gives better results.
# For other themes, using TRUE might be preferable.
```

```{r, echo=FALSE}
st_css(main = TRUE, global = TRUE)
```

Expand Down Expand Up @@ -321,18 +320,27 @@ looks like this:
# author: "Dominic Comtois"
# date: "`r Sys.Date()`"
# output:
# rmarkdown::html_vignette:
# css:
# - !expr system.file("rmarkdown/templates/html_vignette/resources/vignette.css", package = "rmarkdown")
# html_document:
# fig_caption: false
# toc: true
# toc_depth: 1
# css: vignette.css
# vignette: >
# %\VignetteIndexEntry{Recommendations for R Markdown}
# %\VignetteEngine{knitr::rmarkdown}
# %\VignetteEncoding{UTF-8}
# %\VignetteDepends{magrittr}
# %\VignetteDepends{kableExtra}
# ---
```

The following **summarytools global options** have been set. More of them can
be useful, but this is a good starting point.
The *vignette.css* file is copied from the installed **rmarkdown** package's
*templates/html_vignette/resources* directory.

The following **global options** for **summarytools** have been set. Other
options might also be useful to optimize content, but this is a good place
to start from.

```{r, eval=FALSE}
st_options(bootstrap.css = FALSE, # Already part of the theme
plain.ascii = FALSE, # One of the essential settings
Expand Down

0 comments on commit 1af8ba7

Please sign in to comment.