web/js/tests.js
// Transforms the output of a wilcoxon test into HTML tables
Transforms the output of a wilcoxon test into HTML tables
Transforms the output of a wilcoxon test into HTML tables
function wilcoxon_table(data, test, alpha) {
	var salida = 
    "<div class=\"table-responsive\"><h2>Results</h2>\
        <a href=\"#modal_export\" data-toggle=\"modal\"><button class=\"btn btn-default\"><span class=\"glyphicon glyphicon-export\"></span>Export</button></a>\
        <table class=\"table table-hover table-striped\">\
			<caption>"+ $("input[value="+test+"]").parent().text() + " test (significance level of " + alpha + ")</caption>\
			<thead><tr><th>Statistic</th><th>p-value</th><th>Result</th></tr></thead>\
			<tbody><tr><td>" +data.statistic+ "</td><td>" +data.p_value+ "</td>";
    if (data.result)
        salida = salida + "<td>H0 is rejected</td></tr></tbody></table>";
    else
        salida = salida + "<td>H0 is accepted</td></tr></tbody></table>";
	salida = salida + "</tbody></table></div>";
    return salida;
}
function wilcoxon_table ( data , test , alpha ) { var salida = "<div class=\"table-responsive\"><h2>Results</h2>\
        <a href=\"#modal_export\" data-toggle=\"modal\"><button class=\"btn btn-default\"><span class=\"glyphicon glyphicon-export\"></span>Export</button></a>\
        <table class=\"table table-hover table-striped\">\
			<caption>" + $ ( "input[value=" + test + "]" ) . parent ( ) . text ( ) + " test (significance level of " + alpha + ")</caption>\
			<thead><tr><th>Statistic</th><th>p-value</th><th>Result</th></tr></thead>\
			<tbody><tr><td>" + data . statistic + "</td><td>" + data . p_value + "</td>" ; if ( data . result ) salida = salida + "<td>H0 is rejected</td></tr></tbody></table>" ; else salida = salida + "<td>H0 is accepted</td></tr></tbody></table>" ; salida = salida + "</tbody></table></div>" ; return salida ; }
Transforms the output of a wilcoxon test into HTML tables
Transforms the output of a wilcoxon test into HTML tables