Output custom code specified in an analysis component

output_custom_code(study, analysis_id = 1, prefix = "")

Arguments

study

A study list object with class scivrs_study

analysis_id

The id or index for the analysis code to output (defaults to index 1)

prefix

Text to prepend to each line (for indenting)

Value

string of the function definition

Examples


custom <- function() { 1:10 }
s <- study() %>%
  add_analysis("custom", t.test(rnorm(100))) %>%
  output_custom_code()