Skip to content

Commit

Permalink
updated documentation and gh pages
Browse files Browse the repository at this point in the history
  • Loading branch information
abhsarma committed Aug 1, 2024
1 parent 5e8e5db commit 011fed2
Show file tree
Hide file tree
Showing 104 changed files with 1,973 additions and 1,167 deletions.
3 changes: 3 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Authors@R: c(
person("Matthew", "Kay", role = "aut", email = "mjskay@northwestern.edu"),
person("Michael", "Moon", role = "ctb", email = "moon@utstat.toronto.edu"),
person("Mark", "Miller", role = "ctb", email = "725mrm@gmail.com"),
person("Kyle", "Hwang", role = "ctb", email = "kyle.sg.hwang@gmail.com"),
person("Hadley", "Wickham", role = "ctb", email = "hadley@posit.co"),
person("Alex", "Kale", role = "ctb", email = "kalea@uw.edu"),
person("Nathan", "Taback", role = "ctb", email = "nathan.taback@utoronto.ca"),
person("Fanny", "Chevalier", role = "ctb", email = "fanny@dgp.toronto.edu"),
Expand All @@ -29,6 +31,7 @@ Description: Implement 'multiverse' style analyses (Steegen S., Tuerlinckx F, Ge
analysis options by interacting with the paper itself.
License: GPL (>= 3)
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
Depends:
R (>= 3.5.0),
Expand Down
9 changes: 7 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ export(conditions)
export(execute_multiverse)
export(execute_universe)
export(expand)
export(export_2_json)
export(export_code_json)
export(export_dist_2_json)
export(export_data_json)
export(export_results_dist_json)
export(export_results_json)
export(extract_variable_from_universe)
export(extract_variables)
export(inside)
Expand All @@ -47,11 +48,13 @@ importFrom(dplyr,rename)
importFrom(dplyr,select)
importFrom(formatR,tidy_source)
importFrom(furrr,future_map)
importFrom(htmltools,includeCSS)
importFrom(htmltools,tagList)
importFrom(htmltools,tags)
importFrom(jsonlite,write_json)
importFrom(knitr,knit_engines)
importFrom(knitr,knit_global)
importFrom(knitr,opts_chunk)
importFrom(magrittr,"%>%")
importFrom(magrittr,extract2)
importFrom(magrittr,inset)
Expand All @@ -61,6 +64,7 @@ importFrom(purrr,map)
importFrom(purrr,map2)
importFrom(purrr,map_chr)
importFrom(purrr,reduce)
importFrom(readr,guess_parser)
importFrom(rlang,as_name)
importFrom(rlang,caller_env)
importFrom(rlang,enexpr)
Expand All @@ -77,6 +81,7 @@ importFrom(rlang,is_empty)
importFrom(rlang,is_missing)
importFrom(rlang,is_null)
importFrom(rlang,is_symbol)
importFrom(rlang,is_true)
importFrom(rlang,parse_expr)
importFrom(rlang,quo)
importFrom(rlang,quo_text)
Expand Down
2 changes: 1 addition & 1 deletion R/engine_multiverse.R
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ multiverse_default_block_exec <- function(.code, options, knit = FALSE) {

temp_options$label = paste0(temp_options$label, "-universe-", x)

.assignment = expand(M)[[".parameter_assignment"]][[x]]
.assignment = expand(.multiverse)[[".parameter_assignment"]][[x]]
class_name = paste(names(.assignment), .assignment, sep="---", collapse=" ")

# assuming default is the first universe,
Expand Down
12 changes: 7 additions & 5 deletions R/export_json.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ globalVariables(c(".max", ".min", "cdf.x", "cdf.y", "limits", "universe"))
#' @param filename filename on disk (as a character string)
#'
#' @return a JSON file or (if a filepath is not specified) a dataframe for the results file and a list for the code file
#' @format ## `results` JSON file schema
#'
#' @details
#' ## results JSON file schema
#' It consists of a list of objects (where each object corresponds to one analysis in the multiverse).
#' Within this object, the results attribute contains a(nother) list of objects corresponding to each outcome variable.
#' For e.g., here we have four coefficients (see the results of the regression model), and thus the results attribute will contain four objects.
#' Each object has the following attributes:
#' - `term`: name of the outcome variable
#' - `estimate`: mean / median point estimate i.e., $\mathbb{E}(\mu)$ for any parameter $\mu$.
#' - `std.error`: standard error for the point estimate i.e., $\sqrt{\text{var}(\mu)}$
#' - `estimate`: mean / median point estimate i.e., \eqn{\mathbb{E}(\mu)} for any parameter \eqn{\mu}.
#' - `std.error`: standard error for the point estimate i.e., \eqn{\sqrt{\text{var}(\mu)}}
#' - `cdf.x`: a list of quantiles
#' - `cdf.y`: a list of cumulative probability density estimates corresponding to the quantiles
#'
Expand All @@ -34,13 +36,13 @@ globalVariables(c(".max", ".min", "cdf.x", "cdf.y", "limits", "universe"))
#' - `conf.high`
#'
#'
#' @format ## `code` JSON file schema
#' ## code JSON file schema
#' It consists of two attributes: `code` and `parameters`.
#' `code` is a list of strings consisting of the R and multiverse syntax used to implement the analysis. For readability, we
#' use [styler] to break up the declared code.
#' `parameters` is an object listing the parameter names and the corresponding options for each of the parameters declared in the analysis.
#'
#' @format ## `data` JSON file schema
#' ## data JSON file schema
#' It consists of a list of objects, each with two attributes: `field` and `values`.
#' `field` is the name of a column corresponding to a variable in the dataset.
#' `values` are a list of values for that variable in the dataset.
Expand Down
10 changes: 5 additions & 5 deletions docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 011fed2

Please sign in to comment.