-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.qmd
93 lines (65 loc) · 3.46 KB
/
README.qmd
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
---
format: gfm
---
<!-- README.md is rendered from README.qmd. Edit README.qmd and render to update README.md -->
```{R options, echo=FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
message = FALSE,
warning = FALSE
)
```
# {`lovecraftr`} <img src="man/figures/logo.png" align="right" height="139" alt="H. P. Lovecraft's signature in an R package hexagon"/>
<!-- badges: start -->
[![R-CMD-check](https://github.com/jrdnbradford/lovecraftr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/jrdnbradford/lovecraftr/actions/workflows/R-CMD-check.yaml)
[![dataset-check](https://github.com/jrdnbradford/lovecraftr/actions/workflows/dataset-check.yaml/badge.svg)](https://github.com/jrdnbradford/lovecraftr/actions/workflows/dataset-check.yaml)
![GitHub R package version](https://img.shields.io/github/r-package/v/jrdnbradford/lovecraftr)
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
<!-- badges: end -->
> The most merciful thing in the world, I think, is the inability of the human mind to correlate all its contents. We live on a placid island of ignorance in the midst of black seas of infinity, and it was not meant that we should voyage far. The sciences, each straining in its own direction, have hitherto harmed us little; but some day the piecing together of dissociated knowledge will open up such terrifying vistas of reality, and of our frightful position therein, that we shall either go mad from the revelation or flee from the light into the peace and safety of a new dark age.
-[H. P. Lovecraft](https://en.wikipedia.org/wiki/H._P._Lovecraft), *The Call of Cthulhu*
{`lovecraftr`} contains H. P. Lovecraft's corpus as R datasets for textual analysis. This repository contains both the raw text files and RDA files. See the [package index reference](https://jrdnbradford.github.io/lovecraftr/reference/index.html) for the list of available works.
## Installation
```{R load-package, echo=FALSE}
devtools::load_all()
```
Install from [GitHub](https://github.com/jrdnbradford/lovecraftr/) using any of the methods below.
### {[`devtools`](https://devtools.r-lib.org/)}
```{R devtools-install, echo=TRUE, eval=FALSE, output=FALSE}
# install.packages("devtools")
devtools::install_github("jrdnbradford/lovecraftr")
```
### {[`remotes`](https://remotes.r-lib.org/)}
```{R remotes-install, echo=TRUE, eval=FALSE, output=FALSE}
# install.packages("remotes")
remotes::install_github("jrdnbradford/lovecraftr")
```
### {[`pak`](https://pak.r-lib.org/)}
```{R pak-install, echo=TRUE, eval=FALSE, output=FALSE}
# install.packages("pak")
pak::pkg_install("jrdnbradford/lovecraftr")
```
## Usage
See the [package index reference](https://jrdnbradford.github.io/lovecraftr/reference/index.html) for documentation on works and usage.
Once the package is loaded, character vectors of individual works can be accessed in several ways.
You can load a dataset into the environment directly using:
```{R data-cthulhu, echo=TRUE, eval=FALSE}
data(the_call_of_cthulhu)
```
You can also assign a dataset to a variable:
```{R lovecraft-tibble, output=TRUE, eval=TRUE}
corpus <- lovecraft
corpus |>
dplyr::filter(title == "The Call of Cthulhu") |>
head()
```
## Contributing
See [CONTRIBUTING.md](/.github/CONTRIBUTING.md).
## License
MIT. See [LICENSE.md](/LICENSE.md).
## Citation
Please cite this package if you use it.
```{R citation, echo=TRUE, eval=TRUE}
citation("lovecraftr")
```