R/export.R

Defines functions export_answer

Documented in export_answer

#' Export answers.
#' 
#' @param x object of class `form_answers`.  
#' @param file file name.
#' @param format So far only YAML is available.
#'
#' @export

export_answer <- function(x, file, format = "yaml") {
    stopifnot(class(x) == "form_answers")
    format <- match.arg(format, c("yaml")) 
    yaml::write_yaml(x, file)
    invisible(0)
}
inSileco/formbuildr documentation built on Jan. 1, 2021, 4:20 a.m.