-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
56 lines (39 loc) · 1.43 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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# demspaces
<!-- badges: start -->
[](https://travis-ci.com/andybega/demspaces)
[](https://codecov.io/gh/andybega/demspaces?branch=master)
<!-- badges: end -->
demspaces contains helper functions for the Democratic Spaces Barometer project; see [andybega/democratic-spaces](https://github.com/andybega/democratic-spaces).
*(Note to self: the private dev repo is at andybega/closing-spaces)*
## Installation
Since this package is specific to the democratic spaces project, it will not end up on CRAN. Install from [GitHub](https://github.com/) instead, with:
``` r
# install.packages("remotes")
remotes::install_github("andybega/demspaces")
```
## Example
```{r}
library("demspaces")
data("states")
mdl <- ds_logistic_reg("v2x_veracc_osp", states)
preds <- predict(mdl, new_data = states)
head(preds)
```
## Meta
There is a Makefile to help with stuff. E.g. to open that static docs:
```bash
make opendocs
```
To add new models, see the `add_new_model.R` script. It will use a template to setup the R and test files.