Browse Source

updated examples

tags/v0.1.1
hrbrmstr 9 years ago
parent
commit
5ac016a61e
  1. 4
      R/ggalt-package.r
  2. 11
      README.Rmd
  3. 21
      README.md
  4. BIN
      README_figs/README-unnamed-chunk-4-19.png

4
R/ggalt-package.r

@ -1,7 +1,7 @@
#' Extra Geoms, Stats and Coords for 'ggplot2'
#'
#' A package containing additional geoms, coords and stats for the revamped (late 2015) version
#' of ggplot2.
#' A package containing additional geoms, coords and stats for the revamped
#' (late 2015) version of ggplot2.
#'
#' @name ggalt
#' @docType package

11
README.Rmd

@ -168,6 +168,17 @@ grid.arrange(ggplot(dat, aes(x)) + stat_ash(),
ggplot(dat, aes(x)) + stat_density(),
nrow=3)
cols <- RColorBrewer::brewer.pal(3, "Dark2")
ggplot(dat, aes(x)) +
stat_ash(alpha=1/2, fill=cols[3]) +
stat_bkde(alpha=1/2, fill=cols[2]) +
stat_density(alpha=1/2, fill=cols[1]) +
geom_rug() +
labs(x=NULL, y="density/estimate") +
scale_x_continuous(expand=c(0,0)) +
theme_bw() +
theme(panel.grid=element_blank()) +
theme(panel.border=element_blank())
```
### Test Results

21
README.md

@ -245,6 +245,25 @@ grid.arrange(ggplot(dat, aes(x)) + stat_ash(),
<img src="README_figs/README-unnamed-chunk-4-18.png" title="" alt="" width="672" />
``` r
cols <- RColorBrewer::brewer.pal(3, "Dark2")
ggplot(dat, aes(x)) +
stat_ash(alpha=1/2, fill=cols[3]) +
stat_bkde(alpha=1/2, fill=cols[2]) +
stat_density(alpha=1/2, fill=cols[1]) +
geom_rug() +
labs(x=NULL, y="density/estimate") +
scale_x_continuous(expand=c(0,0)) +
theme_bw() +
theme(panel.grid=element_blank()) +
theme(panel.border=element_blank())
#> Estimate nonzero outside interval ab.
#> Bandwidth not specified. Using '0.43', via KernSmooth::dpik.
```
<img src="README_figs/README-unnamed-chunk-4-19.png" title="" alt="" width="672" />
### Test Results
``` r
@ -252,7 +271,7 @@ library(ggalt)
library(testthat)
date()
#> [1] "Sat Sep 12 12:55:07 2015"
#> [1] "Sat Sep 12 13:12:29 2015"
test_dir("tests/")
#> testthat results ========================================================================================================

BIN
README_figs/README-unnamed-chunk-4-19.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Loading…
Cancel
Save