Nothing
This document compares results of applying functions from test.R
after set_default_options()
and set_fast_options()
. It is used as a test report to make sure that modified (faster) functions return equal results.
suppressMessages(library(strucchange)) suppressMessages(library(bfast)) test.env = new.env() source("test.R", local = test.env ) # find all functions in environment fs = names(which(sapply(ls(test.env), function(x) {return(class(get(x, envir = test.env)))}) == "function")) results.default = list() results.fast = list() for (i in 1:length(fs)) { f = get(fs[i],envir = test.env) set_default_options() results.default[[fs[i]]] = f() set_fast_options() results.fast[[fs[i]]] = f() } fnames = names(results.fast) results = sapply(fnames, function(x) { all.equal(results.default[[x]],results.fast[[x]]) }, simplify = F) n_success = sum(sapply(results, isTRUE)) n_failed = sum(!sapply(results, isTRUE))
r n_success
successfulr n_failed
failedsuppressMessages(library(knitr)) df = data.frame(f = fnames,result=ifelse(sapply(results, isTRUE),"success","failed"),row.names = NULL,stringsAsFactors = FALSE) failed = which(!sapply(results, isTRUE)) df$result[failed] = paste(df$result[failed], " [", 1:length(failed) ,"]", sep="") kable(df,format="markdown")
if (n_failed > 0) { cat("## Details of failed tests\n") options(max.print = 10) for (i in 1:length(failed)) { cat(paste("### [", i ,"] ", fnames[failed[i]], "\n", sep="")) print(results[[failed[i]]]) cat("\n") } }
This report has been generated on r Sys.time()
.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.