diff --git a/DESCRIPTION b/DESCRIPTION index 9bdf34d..d90b9f7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,7 @@ Package: vizdraws Title: Visualize Draws from the Prior and Posterior Distributions Version: 0.9 +Date: 2019-07-9 Authors@R: c( person("Ignacio", "Martinez", email = "ignacio@protonmail.com", role = c("aut", "cre")), person("Linus", "Marco", email = "lmarco163@gmail.com", role = "aut"), diff --git a/docs/articles/index.html b/docs/articles/index.html new file mode 100644 index 0000000..c964081 --- /dev/null +++ b/docs/articles/index.html @@ -0,0 +1,135 @@ + + + +
+ + + + +introduction.Rmd
library(vizdraws)
+set.seed(1982)
+vizdraws(prior = rnorm(n = 10000, mean = 0, sd = 1), xlim = c(-3,3))
vizdraws allows you to create interactive visualizations of draws from a prior and posterior distribution.
+This is a basic example which shows you how to solve a common problem:
+library(vizdraws)
+set.seed(9782)
+vizdraws(prior = rnorm(10000, 0, 1), posterior = rnorm(10000, 1.1, 0.5), MME = 0.5, threshold = 0.8)
Posterior distribution
+The bell-curve icon was created by Davo Sime.
+pipe.Rd
See magrittr::%>%
for details.
lhs %>% rhs+ + +
vizdraws-shiny.Rd
Output and render functions for using vizdraws within Shiny +applications and interactive Rmd documents.
+ +vizdrawsOutput(outputId, width = "100%", height = "100%") + +rendervizdraws(expr, env = parent.frame(), quoted = FALSE)+ +
outputId | +output variable to read from |
+
---|---|
width, height | +Must be a valid CSS unit (like |
+
expr | +An expression that generates a vizdraws |
+
env | +The environment in which to evaluate |
+
quoted | +Is |
+
vizdraws.Rd
vizdraws
+ +vizdraws(prior = NULL, posterior = NULL, MME = 0, threshold = NULL, + units = NULL, quantity = FALSE, xlab = NULL, breaks = NULL, + break_names = NULL, colors = NULL, width = NULL, height = NULL, + xlim = NULL, font_scale = 1, display_mode_name = FALSE, + title = "", elementId = NULL)+ +
prior | +draws from the prior distribution. This is an optional parameter but either this or posterior should be provided |
+
---|---|
posterior | +draws from the posterior distribution. This is an optional parameter but either this or prior should be provided |
+
MME | +minimum meaninful effect. If not provided MME is set to zero |
+
threshold | +if the probability is greater than this threshold, you would feel confortable making a decision |
+
units | +optional arguement to specify the units of x. For example, dollars or applications |
+
quantity | +defaults to |
+
xlab | +defaults to |
+
breaks | +defaults to |
+
break_names | +defaults to |
+
colors | +colors for the left, middle, and right areas. The defaults are c("#e41a1c", "#377eb8", "#4daf4a") |
+
width | +width for shiny |
+
height | +height for shiny |
+
xlim | +defaults to |
+
font_scale | +defaults to |
+
display_mode_name | +defaults to |
+
title | +defaults to |
+
elementId | +Use an explicit element ID for the widget +(rather than an automatically generated one).elementID for shiny |
+
A HTML widget object
+ + ++