https://github.com/jeffreypullin/prettygreta
A pretty frontend for greta
https://github.com/jeffreypullin/prettygreta
Last synced: about 1 year ago
JSON representation
A pretty frontend for greta
- Host: GitHub
- URL: https://github.com/jeffreypullin/prettygreta
- Owner: jeffreypullin
- Created: 2019-01-31T10:12:15.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-04T09:43:19.000Z (over 7 years ago)
- Last Synced: 2025-01-29T18:11:18.286Z (over 1 year ago)
- Language: R
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
Awesome Lists containing this project
README
---
output: github_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# prettygreta
A *very* experimental pretty front end for **greta**. **prettygreta** uses **rlang**
to construct formulas and do other NSE magic.
## Usage
```{r, usage}
suppressMessages(library(greta))
suppressMessages(library(prettygreta))
rating <- attitude$rating
complaints <- attitude$complaints
# The first example model from the greta website - but pretty...
int ~ N(0, 10)
coef ~ N(0, 10)
sd ~ HalfCauchy(0, 3)
mu = int + coef * complaints
rating ~ N(mu, sd)
m <- model(int, coef, sd)
# But we can still use normal formulas!
x <- 1:20
y <- 2 * x + rnorm(20)
fit <- lm(y ~ x)
fit
```
## Install
To install the package use:
```{r installation, eval = FALSE}
devtools::install_github("Voltemand/prettygreta")
```