| Title: | R Markdown template to create assigment reports for UofG Data Analytics programmes. |
|---|---|
| Description: | Provides an R Markdown template to use in UofG Data Analytics reports. |
| Authors: | Carlos Yanez Santibanez [aut, cre] |
| Maintainer: | Carlos Yanez Santibanez <[email protected]> |
| License: | CC0 |
| Version: | 0.3.1.0003 |
| Built: | 2026-05-24 05:57:00 UTC |
| Source: | https://github.com/carlosyanez/uofgdataanalyticsreport |
Format date in local language format
cd_format_date(date, lang = default(rmarkdown::metadata$lang, "en-US"))cd_format_date(date, lang = default(rmarkdown::metadata$lang, "en-US"))
date |
Current date |
lang |
Language, either |
Character string, date in local format
cd_format_date("2012-01-01", "de-DE") cd_format_date("2012-01-01", "en-US")cd_format_date("2012-01-01", "de-DE") cd_format_date("2012-01-01", "en-US")
Set knitr chunk options in accordance with corporate design.
cd_knit_chunk_opts( twocolumn = default(rmarkdown::metadata$twocolumn, FALSE), fig.width = NULL, fig.height = NULL, fig.pos = "h", message = FALSE, echo = FALSE )cd_knit_chunk_opts( twocolumn = default(rmarkdown::metadata$twocolumn, FALSE), fig.width = NULL, fig.height = NULL, fig.pos = "h", message = FALSE, echo = FALSE )
twocolumn |
Use two-column mode? This will affect |
fig.width |
Figure width. If |
fig.height |
Figure height If |
fig.pos |
Floating modifier for figures |
message |
Should messages be shown? |
echo |
Should echo be shown? |
This function is called for its side effects and returns NULL, invisibly.
cd_knit_chunk_opts()cd_knit_chunk_opts()
Example function to generate a title page
cd_page_title( title = default(rmarkdown::metadata$title, "Title"), subtitle = default(rmarkdown::metadata$subtitle, "Subtitle"), date = default(rmarkdown::metadata$date, cd_format_date(Sys.Date())) )cd_page_title( title = default(rmarkdown::metadata$title, "Title"), subtitle = default(rmarkdown::metadata$subtitle, "Subtitle"), date = default(rmarkdown::metadata$date, cd_format_date(Sys.Date())) )
title |
Document title |
subtitle |
Document subtitle |
date |
Document creation date |
Object of class "knit_asis" (so that knitr will treat it as is). LaTeX code for title page.
cd_page_title( title = "My Title", subtitle = "My Subtitle" )cd_page_title( title = "My Title", subtitle = "My Subtitle" )
Set default value of an argument. If x is NULL, default is used.
default(x, default = "")default(x, default = "")
x |
Character string, or |
default |
If |
Character string
default(NULL) default(NULL, "my default") default("a string", "my default")default(NULL) default(NULL, "my default") default("a string", "my default")
Use the function to wrap literal LaTeX code in R. Use a raw string input
(r"()") to automatically escape quotes and backslashes, as they are common
in LaTeX. Expressions enclosed by << and >> will be evaluated as R code.
indiedown_glue(x, .open = "<<", .close = ">>")indiedown_glue(x, .open = "<<", .close = ">>")
x |
Character, often as a raw string ( |
.open, .close
|
The opening and closing delimiter. |
indiedown_glue() uses a different default than the underlying
glue::glue() (<< and >>), because braces are so common in LaTeX.
Doubling the full delimiter (<<<< and >>>>) escapes it.
Object of class "knit_asis" (so that knitr will treat it as is). Usually LaTeX code.
x <- "something" indiedown_glue(r"(\LaTeX\ code with <<x>> substituted )")x <- "something" indiedown_glue(r"(\LaTeX\ code with <<x>> substituted )")
indiedown_path() creates a path to this package's indiedown assets,
located at inst/indiedown.
indiedown_path_tex() creates a path that is usable in LaTeX,
with all special characters escaped.
indiedown_path(...) indiedown_path_tex(...)indiedown_path(...) indiedown_path_tex(...)
... |
Path components, passed on to |
Character string, path to this package's indiedown assets
indiedown_path()indiedown_path()
uofgdataanalyticsreport() is the main function of the uofgdataanalyticsreport package. Use as
output: uofgdataanalyticsreport::uofgdataanalyticsreport in the R Markdown YAML header.
uofgdataanalyticsreport(...)uofgdataanalyticsreport(...)
... |
Passed on to |
R Markdown output format to pass to rmarkdown::render().