An open API service indexing awesome lists of open source software.

https://github.com/eduardszoecs/esmisc

misc functions
https://github.com/eduardszoecs/esmisc

misc rstats

Last synced: 6 months ago
JSON representation

misc functions

Awesome Lists containing this project

README

        

---
output:
md_document
---
esmisc
============
[![Build Status](https://travis-ci.org/EDiLD/esmisc.png)](https://travis-ci.org/EDiLD/esmisc)
[![Build status](https://ci.appveyor.com/api/projects/status/ju4fwso1luyanrn6?svg=true)](https://ci.appveyor.com/project/EDiLD/esmisc-98v1t)
[![codecov](https://codecov.io/gh/EDiLD/esmisc/branch/master/graph/badge.svg)](https://codecov.io/gh/EDiLD/esmisc)
[![Open Issues](https://img.shields.io/github/issues/edild/esmisc.svg)](https://github.com/edild/esmisc/issues)
[![Downloads](http://cranlogs.r-pkg.org/badges/esmisc)](http://cranlogs.r-pkg.org/badges/esmisc)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/esmisc)](http://cran.r-project.org/web/packages/esmisc)

`esmisc` is a R package containing misc functions of Eduard Szöcs.

## Functions
Currently the following functions are available:

+ `read_regnie()` reads DWD REGNIE data into R.
+ `theme_edi()` is a custom ggplot2 theme that I use.


## Installation
`esmisc` is currently only available on github. To install `esmisc` use:
```{r install, eval=FALSE}
install.packages('devtools')
library(devtools)
install_github('esmisc', 'EDiLD')
library(esmisc)
```

## Examples
```{r load}
library(esmisc)
```

### Read DWD REGNIE data into R

```{r read_regnie, message=FALSE}
r <- read_regnie(system.file("extdata", "ra050120.gz", package = "esmisc"))
# plot the raster
require(raster)
plot(r, main = 'Precipitation on 20.01.2005')
```

### ggplot2 theme

```{r ggplot_themes}
library(ggplot2)
p <- ggplot(mtcars) +
geom_point(aes(x = wt, y = mpg, colour = factor(gear))) +
facet_wrap(~am) +
theme_edi()
p
```

### other functions

#### Geometric mean
```{r}
mean(c(1, 10, 100))
geomean(c(1, 10, 100))
```