| Title: | A tool to easily insert datalegreya for html output. |
|---|---|
| Description: | Datalegreya is a typeface which can interweave data curves with text. This package allows easy insertion of datalegreya font for html output such as Rmarkdown, xaringan, ioslides and shiny app. |
| Authors: | Emi Tanaka [aut, cre] |
| Maintainer: | Emi Tanaka <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-07-05 08:34:11 UTC |
| Source: | https://github.com/emitanaka/datalegreyar |
This function 'datafies' a string and data suitable in a format as input for the fig function.
datafy(values, text = NULL, ignore_space = TRUE, ...)datafy(values, text = NULL, ignore_space = TRUE, ...)
values |
A vector of y-values which scales to the length of the text and maps the value to the closest value from 0 to 3. |
text |
A character string which can't be left empty. |
ignore_space |
Don't have any data value for empty spaces in text. |
Insert a datalegreya font easily into html outputs using R.
fig(object, symbol = NULL, ylabs = rep(NA, 2), xlabs = rep(NA, 2), start_value = 0, size = NULL, type = "dot", color = NULL, colour = color, bgcolor = NULL, bgcolour = bgcolor, sother = NULL)fig(object, symbol = NULL, ylabs = rep(NA, 2), xlabs = rep(NA, 2), start_value = 0, size = NULL, type = "dot", color = NULL, colour = color, bgcolor = NULL, bgcolour = bgcolor, sother = NULL)
object |
A named integer vector with elements of 0, 1, 2, 3 and names corresponding to the characters of the text. |
symbol |
A named integer vector where the name should signify which symbol (min, max, down or up) and the integer specifying above which character it should be placed. |
ylabs |
A string vector of length 2 comprising of string of max length 5 for the bottom and top label of the y-axis. This is NOT working for some reason. |
xlabs |
A string vector of length 2 comprising of string (of max length 5) to be placed on top of the main text. The first string is placed on the start of the main text and the second at the end. Leave as NA to have one or both to display no labels. |
start_value |
An integer between 0 and 3 (inclusive) to specify the starting value of the graph. |
size |
The size of the font. |
type |
The type of datalegreya font, either thin, gradient or dot. |
color, colour
|
Colour to be given to the icon |
bgcolor, bgcolour
|
Colour to be given to the background |
sother |
Character vector of other parameters directly added to the style classes. |