https://github.com/eduardszoecs/esmisc
misc functions
https://github.com/eduardszoecs/esmisc
misc rstats
Last synced: 6 months ago
JSON representation
misc functions
- Host: GitHub
- URL: https://github.com/eduardszoecs/esmisc
- Owner: eduardszoecs
- License: other
- Created: 2014-07-07T13:17:50.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-03-30T08:47:07.000Z (about 8 years ago)
- Last Synced: 2024-09-23T04:39:03.939Z (8 months ago)
- Topics: misc, rstats
- Language: R
- Size: 966 KB
- Stars: 4
- Watchers: 2
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
---
output:
md_document
---
esmisc
============
[](https://travis-ci.org/EDiLD/esmisc)
[](https://ci.appveyor.com/project/EDiLD/esmisc-98v1t)
[](https://codecov.io/gh/EDiLD/esmisc)
[](https://github.com/edild/esmisc/issues)
[](http://cranlogs.r-pkg.org/badges/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))
```