App to view distribution properties and access dynamic code in R, Python, Matlab, Mathematica and Stan. The app is available online here.
- Add distribution to relevant conditional panel at top of
ui.R
. - Add slider inputs for the parameter values in
ui.R
and, if necessary, range parameters that will determine plotting range. - Add the mean and variance in
fCalculateMeanFull
andfCalculateVarianceFull
withinfunctions.R
. - Add arguments in one of the
fExtra[]FunctionInputsFull
functions that will be passed to the function to call it (for plotting) toplotting.R
. For example, the normal distribution is parameterised by two named arguments in R's implementationmean
andsd
. So to plot this distribution as we vary the user-selected parametersinput$normal_mu
andinput$normal_sigma
, we need to make a named argument call of the formpaste("mean=",input$normal_mu,",sd=",input$normal_sigma)
, which is pasted than evaluated to plot. - Add a scale for discrete distributions in
fScaleFull1
or continuous distributions infScaleFull
inplotting.R
. - Add function to call to evaluate PDF/PMF in the
data <- reactive({
function inserver.R
. Note, if this function does not exist in base R or within a package, you can define a custom one within thefunctions.R
file. Note the named arguments to the function must the same as that specified in the above step which takes place inplotting.R
. - Add function to call to evaluate CDF in the
dataCDF <- reactive({
function inserver.R
. Note, see above for custom functions. - Add formulae in latex form in
formulae.R
. - Copy code from
formulae.R
and put into correct form using helper functions (fLatexHelper_
) where possible which aid with the construction of code that renders nicely in the app. - Add code for R, Python, Mathematica, Matlab and Stan by updating the relevant
code_
files. Note that the code is intended to be dynamic and the properties shown on the plots should be exactly replicated by the code examples. This means that the parameterisation in the function call may not reflect the default parameterisation. - Add example likelihood and prior uses for the distribution in
example_users.R
.