Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tjmahr/htmlent
Package to make HTML entities available to RStudio's autocompletion
https://github.com/tjmahr/htmlent
Last synced: about 1 month ago
JSON representation
Package to make HTML entities available to RStudio's autocompletion
- Host: GitHub
- URL: https://github.com/tjmahr/htmlent
- Owner: tjmahr
- License: gpl-3.0
- Created: 2018-02-20T21:07:05.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-20T21:50:14.000Z (almost 7 years ago)
- Last Synced: 2024-07-31T19:25:07.191Z (5 months ago)
- Language: R
- Homepage:
- Size: 48.8 KB
- Stars: 10
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# htmlent: HTML entitiesA simple data package with HTML entities, downloaded from
[this page](https://dev.w3.org/html5/html-author/charref).## Installation
You can install htmlent from GitHub with:
```{r gh-installation, eval = FALSE}
# install.packages("devtools")
devtools::install_github("tjmahr/htmlent")
```## Example
I am writing some RMarkdown, and I want to express a statistic as the mean
plus-minus the standard deviation. I can never remember the entity for the
plus-minus character, so I have to look it up online.Not anymore. I can just get the entity by using RStudio's autocompletion on the
`htmlent` object. I type `htmlent::ents$` then hit `tab` to bring up the
autocompletion and type `plus-m` and find it.```{r example}
htmlent::ents$`plus-minus sign`
```### Might as well make a dataframe of them all
```{r}
df <- tibble::data_frame(
symbol = unlist(htmlent::ents),
entity = paste0("`", symbol, "`"),
name = names(htmlent::ents)
)
knitr::kable(df)
```