Plot title via NSE

This function is demonstrating a combination of input types. It also uses non standard evaluation (NSE) to return working code in the plot’s title.

library(appifyr)

appify(
  f = "dist_hist", 
  inps = list(
    dist_f = inp_dropdown(
      c("rnorm", "runif", "rcauchy"),
      label = "Distribution Function"
    ), 
    ns = inp_number(label = "Sample Size"),
    theme = inp_dropdown(
      c("theme_bw", "theme_classic", "theme_minimal", "theme_light"),
      label = "ggplot Theme"
    ),
    bins = inp_number(from = 0, to = 42, label = "Bins"),
    seed = inp_number(label = "Seed")
  )
)