From 6f08e6c6a7fd47918f6019acc6ad7e51f1d98ae0 Mon Sep 17 00:00:00 2001 From: Thomas Wutzler Date: Thu, 10 Nov 2016 13:55:47 +0100 Subject: [PATCH] testing README.Rmd --- .Rbuildignore | 4 +++- README-example-1.png | Bin 0 -> 3210 bytes README.Rmd | 54 +++++++++++++++++++++++++++++++++++++++++++ README.md | 50 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 107 insertions(+), 1 deletion(-) create mode 100644 README-example-1.png create mode 100644 README.Rmd create mode 100644 README.md diff --git a/.Rbuildignore b/.Rbuildignore index b27f6b8..fd16b83 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -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 @@ -10,3 +11,4 @@ vignettes/cache ^.git$ ^.gitignore$ ^.project$ # added by eclipse +^NEWS\.md$ diff --git a/README-example-1.png b/README-example-1.png new file mode 100644 index 0000000000000000000000000000000000000000..130bc8466b3e658a7243d3b53b8a53ec08b07a51 GIT binary patch literal 3210 zcmd5pm_5{(K%kdRDjy)|6Y zRt*T6YL{vYf*J`bAsMB@DrmM)5R4>)6p?ENF=T*{>|memKD*EM&;HtZ=A7?6-}jw4 zbIy5Z-kCESVj?M%JtyOEI7-yVt2W_q06I~e37F^WVcI&(9N7>ZyBf1N91Dlz;aDsj zOOE5Iu?B`%I3A0IopP4kzl4UkNLDgRrO>^5>DB<9>wutJ=7jDSI z3Y{BV#5!TUGY4L4hCc%1duD2?{Q$1;loily=xXnO<|JzM+D=ATKw0bHfoP^Z+5s|I zaL`!F45&DTXgszNQp`jyWNKyIP0D@`ghW$_dP@S?bvCjjn_cb%~D2PcDNm15*f2uYL< zFg=kA+qD2(T*?$ZKL>EPz3UY3k3%m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rxIz91w6> zpF;*kPM+awFn1b4T^q@dMc3w1MZ>n3sSI(z-r%+>aedz>&o?{*B!3@kT=|B7VpHt-z}`IrL{mr3>4<)bsZ1u%>Y_5a*2d~ z2$;)LN(yNN(OEE!!;0GtDceZMjG+h@WCh+R=-vRBD^mXYA{Q^p`bx^KaEDc$k|{8@ zS6vNKyfL|Z>F%Y@h}*(R_Ie(ukIhNOF=oM;ikwa76LDPeiTla{GPjT#Pk6Dbysy)TNTAFOol2+q9d2v0|nmbCSSUJPX-ir zKEn)ocp_1<=Sh+NW6e^g>Sa4E%~``4Nu!F+P;MNCUHGRn3)*R^lQf?~CVMwu3YstPH6@oSa;QBo!;du7G4o!W<$bBXq&ItAnLwthgRr)StS~5KqZ8IXe z7kz=O3k-@r~$y(R9!RFk-aT@O=rX0%EPuliB=-Uuvs4>#_NcTTNcUor}^7n93wQ3P}eLlD3ULh zU3r-#dh{7`)VAxESh;XCQI!4}4tu7Ce;28DO7-tm&&jK@b+ueyhDci^^6*VfO!Oyd zUhjfr|6ytb4^Cr({JT6(Nb|oC6_G`$#;5m;bEvX%iF@t$ja$de!>OD5#(x}n(^uZo zb2dp!yPGs*E>oVby6B~?YG@rF#B%+_5zH=0`8MR2R9;QmmE#W+y!GR|fxWWwtA$&X ziv$Mi#RRM1l)&**)|1K?cE3{(jRT6_u;I=7ErqDTlwIZ>d3A}J%eQw_q~BLC9mc|2 z&&Cby&oUe%qPOR(cO6haq&6RObg*j_qt&0<>qa-}xb>Ygbd3W?9jWN>Zo$x@v5J|~ zIcny1TFm|@-X)9 + + +```{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") +``` diff --git a/README.md b/README.md new file mode 100644 index 0000000..42fcde4 --- /dev/null +++ b/README.md @@ -0,0 +1,50 @@ +--- +output: github_document +--- + + + + + +[![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)