forked from rpruim/statisticalModeling
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathREADME.Rmd
60 lines (43 loc) · 1.73 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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
# ggformula
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/ggformula)](https://cran.r-project.org/package=ggformula)
[![Codecov test coverage](https://codecov.io/gh/ProjectMOSAIC/ggformula/branch/master/graph/badge.svg)](https://codecov.io/gh/ProjectMOSAIC/ggformula?branch=master)
## Formula interface to ggplot2
`ggformula` introduces a family of graphics functions, `gf_point()`,
`gf_density()`, and so on, bring the formula interface to `ggplot()`. This
captures and extends the excellent simplicity of the `lattice`-graphics formula
interface, while providing the intuitive "add this component" capabilities of
`ggplot2`.
## Installation
You can install ggformula from github with:
```{r gh-installation, eval = FALSE}
# install.packages("devtools")
devtools::install_github("ProjectMOSAIC/ggformula")
```
## Using ggformula
The following example illustrates a typical plot constructed with ggformula.
```{r example}
suppressPackageStartupMessages(library(ggformula))
gf_jitter(Sepal.Length ~ Sepal.Width, data = iris, color = ~ Species,
width = 0.05, height = 0.05, alpha = 0.6) %>%
gf_density2d(alpha = 0.3) %>%
gf_labs(title = "A famous data set",
caption = "Data available in datasets package",
ylab = "sepal length",
xlab = "sepal width"
) %>%
gf_theme(theme_bw()) %>%
gf_theme(text = element_text(colour = "navy", face = "italic"))
```
### More Information
Find out more about `ggformula` at [projectmosiac.github.io/ggformula](https://projectmosaic.github.io/ggformula).