-
Notifications
You must be signed in to change notification settings - Fork 3
/
README.Rmd
70 lines (49 loc) · 1.67 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
```{r, setup, echo = FALSE, message = FALSE}
knitr::opts_chunk$set(
comment = "#>",
tidy = FALSE,
error = FALSE)
```
# clisymbols
<!-- badges: start -->
[![R-CMD-check](https://github.com/r-lib/clisymbols/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/r-lib/clisymbols/actions/workflows/R-CMD-check.yaml)
[![](https://www.r-pkg.org/badges/version/clisymbols)](https://www.r-pkg.org/pkg/clisymbols)
[![CRAN RStudio mirror downloads](https://cranlogs.r-pkg.org/badges/clisymbols)](https://www.r-pkg.org/pkg/clisymbols)
[![Codecov test coverage](https://codecov.io/gh/r-lib/clisymbols/graph/badge.svg)](https://app.codecov.io/gh/r-lib/clisymbols)
<!-- badges: end -->
> Unicode symbols with Windows fallbacks
![](/screenshot.png)
Inspired by (and mostly copied from) the
[figures](https://github.com/sindresorhus/figures) JavaScript project.
## Install
Stable version:
```{r eval = FALSE}
install.packages("clisymbols")
```
Development version:
```{r eval = FALSE}
pak::pak("r-lib/clisymbols")
```
## Usage
```{r}
library(clisymbols)
cat(symbol$tick, "All good\n")
cat(symbol$cross, "Problem\n")
```
Here is a list of all symbols, with their names:
```{r}
for (i in seq_along(symbol)) {
cat(symbol[[i]], "\t", names(symbol)[i], "\n", sep = "")
}
```
### Fallback symbols
Some terminals do not support (all) Unicode characters, and on these reasonable
ASCII substitutes are used:
```{r echo = FALSE}
for (i in seq_along(clisymbols:::symbol_win)) {
cat(format(clisymbols:::symbol_win[[i]], width = 4),
names(clisymbols:::symbol_win)[i], "\n", sep = "")
}
```
# License
MIT © [Gabor Csardi](https://gaborcsardi.org) and [Sindre Sorhus](https://sindresorhus.com)