Skip to content

Commit

Permalink
testing README.Rmd
Browse files Browse the repository at this point in the history
  • Loading branch information
bgctw committed Nov 10, 2016
1 parent 5a143da commit 6f08e6c
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
^.*\.Rproj$ # Automatically added by RStudio,
^\.Rproj\.user$ # used for temporary files.
^README\.Rmd$ # An Rmarkdown file used to generate README.md
^cran-comments\.md$ # Comments for CRAN submission
^README\.Rmd$
^README-.*\.png$
^NEWS\.md$ # A news file written in Markdown
vignettes/figure
vignettes/cache
Expand All @@ -10,3 +11,4 @@ vignettes/cache
^.git$
^.gitignore$
^.project$ # added by eclipse
^NEWS\.md$
Binary file added README-example-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 54 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
output: github_document
---

<!--
README.md is generated from README.Rmd. Please edit that file
knit("README.Rmd")
-->


```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```

[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/logitnorm)](http://cran.r-project.org/package=logitnorm)

## Overview

`logitnorm` package provides support for the univariate
[logit-normal
distribution](https://en.wikipedia.org/wiki/Logit-normal_distribution). In
addition to the usual randon, density, percential, and quantile function, it
helps with distribution parameters from observations.

## Installation

```{r, eval = FALSE}
# From CRAN
install.packages("logitnorm")
# Or the the development version from GitHub:
# install.packages("devtools")
devtools::install_github("bgctw/logitnorm")
```

## Usage

See the package vignette for an introduction.

A simple example estimates distribution parameters from observation
statistics of mode 0.7 and upper quantile 0.9. Next, the density is plotted
for across a range of quantiles.

```{r example}
(theta <- twCoefLogitnormMLE(0.7,0.9))
x <- seq(0,1, length.out=81)
d <- dlogitnorm(x, mu=theta[1,"mu"], sigma=theta[1,"sigma"])
plot(d~x,type="l")
abline(v=c(0.7,0.9), col="grey")
```
50 changes: 50 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
output: github_document
---

<!-- README.md is generated from README.Rmd. Please edit that file -->



[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/logitnorm)](http://cran.r-project.org/package=logitnorm)

## Overview

`logitnorm` package provides support for the univariate
[logit-normal
distribution](https://en.wikipedia.org/wiki/Logit-normal_distribution). In
addition to the usual randon, density, percential, and quantile function, it
helps with distribution parameters from observations.

## Installation


```r
# From CRAN
install.packages("logitnorm")

# Or the the development version from GitHub:
# install.packages("devtools")
devtools::install_github("bgctw/logitnorm")
```

## Usage

See the package vignette for an introduction.

A simple example estimates distribution parameters from observation
statistics of mode 0.7 and upper quantile 0.9. Next, the density is plotted
for across a range of quantiles.


```r
(theta <- twCoefLogitnormMLE(0.7,0.9))
#> mu sigma
#> [1,] 0.7608886 0.464783
x <- seq(0,1, length.out=81)
d <- dlogitnorm(x, mu=theta[1,"mu"], sigma=theta[1,"sigma"])
plot(d~x,type="l")
abline(v=c(0.7,0.9), col="grey")
```

![plot of chunk example](README-example-1.png)

0 comments on commit 6f08e6c

Please sign in to comment.