class: center, middle, inverse, title-slide #
datalegreyar
R package ## Inserting datalegreya font to Rmarkdown documents: the typeface that interweave data curves with text ### Emi Tanaka ### 2018/07/21 --- class: center, middle, inverse
{data }§0d|0a|0[--]t|1a|1l|1e|2g|2r|2e|3[++]y|3a|3{text }
-- ## "the typeface that interweave data curves with text" -- ## Now in
##
`datalegreyar`
--- # Getting Started ```r library(datalegreyar) values <- 4 + 3 * 1:20 ``` There can only be 4 values for the curve (0, 1, 2, 3) so you need to `datafy` to convert it to the closest level. ```r fig(datafy(values, "datalegreya"), size=80) ```
§0d|0a|0t|1a|1l|1e|2g|2r|2e|3y|3a|3
--- ## Different types of dots under the curve ### Dot (default)
§0d|0a|0t|1a|1l|1e|2g|2r|2e|3y|3a|3
### Gradient
§0d|0a|0t|1a|1l|1e|2g|2r|2e|3y|3a|3
### Thin
§0d|0a|0t|1a|1l|1e|2g|2r|2e|3y|3a|3
--- ## Add four type of symbols ```r fig(datafy(values, "datalegreya"), size=80, symbol=setNames(c(1,2,8,9), c("min", "down", "up", "max"))) ```
§0d|0[--]a|0[-]t|1a|1l|1e|2g|2r|2[+]e|3[++]y|3a|3
## Add start or end labels ```r fig(datafy(values, "datalegreya"), size=80, type="gradient", xlabs=c("data", "text")) ```
{data }§0d|0a|0t|1a|1l|1e|2g|2r|2e|3y|3a|3{text }
--- ## Modify the start value The default start value is 0 but you can modify this. ```r fig(datafy(values, "fig is great"), size=80, start_value=2) ```
§2f|0i|0g|1 \i|1s|1 \g|2r|2e|2a|3t|3
--- ## Spaces Spaces are not assigned data values by default. You can change this when `datafy`-ing. ```r fig(datafy(values, "fig is great", ignore_space=F), size=80) ```
§0f|0i|0g|1 |1i|1s|2 |2g|2r|2e|3a|3t|3
--- ## Curve only ```r fig(datafy(values), size=40) ```
§0 |0 |0 |0 |0 |1 |1 |1 |1 |1 |1 |2 |2 |2 |2 |2 |2 |3 |3 |3 |3