[rkward-cvs] [rkward] Slowly progressing on adding i18n() to existing plugins

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Mon Nov 17 19:19:11 UTC 2014


NOTE: This is a manual resend of a commit notification that was missing due to 
commit hooks not yet activated.

---

commit 49d0df75a2506408fdfdab8c01d29c19f81ffa59
Commit:     Thomas Friedrichsmeier <thomas.friedrichsmeier at ruhr-uni-bochum.de>
CommitDate: Sun Nov 16 12:18:37 2014 +0100

    Slowly progressing on adding i18n() to existing plugins

diff --git a/rkward/plugins/analysis/corr_matrix.js 
b/rkward/plugins/analysis/corr_matrix.js
index d0013fe..5168561 100644
--- a/rkward/plugins/analysis/corr_matrix.js
+++ b/rkward/plugins/analysis/corr_matrix.js
@@ -40,11 +40,11 @@ function calculate () {
 		}
 	}
 
-	echo ('# cor requires all objects to be inside the same data.frame.\n');
-	echo ('# Here we construct such a temporary frame from the input 
variables\n');
+	comment ('cor requires all objects to be inside the same data.frame.');
+	comment ('Here we construct such a temporary frame from the input 
variables');
 	echo ('data.list <- rk.list (' + vars.split ("\n").join (", ") + ')\n');
 	if (!polyCorr && toNumeric) {
-		echo ('# Non-numeric variables will be treated as ordered data and 
transformed into numeric ranks\n');
+		comment ('Non-numeric variables will be treated as ordered data and 
transformed into numeric ranks');
 		echo ('transformed.vars <- list()\n');
 		echo ('for (i in names(data.list)) {\n');
 		echo ('	if(!is.numeric(data.list[[i]])){\n');
@@ -52,26 +52,25 @@ function calculate () {
 		echo ('		data.list[[i]] <- xtfrm(data.list[[i]])\n');
 		echo ('		after.vars <- unique(data.list[[i]])\n');
 		echo ('		names(after.vars) <- before.vars\n');
-		echo ('		# Keep track of all transformations\n');
+		comment ('Keep track of all transformations', '		');
 		echo ('		transformed.vars[[i]] <- 
data.frame(rank=sort(after.vars))\n');
 		echo ('	} else {}\n');
 		echo ('}\n');
-		echo ('# Finally combine the actual data\n');
+		comment ('Finally combine the actual data');
 	} else {}
 	echo ('data <- as.data.frame (data.list, check.names=FALSE)\n');
 	echo ('\n');
-	echo ('# calculate correlation matrix\n');
+	comment ('calculate correlation matrix');
 	if (polyCorr) {
 		echo ('result <- matrix (nrow = length (data), ncol = length (data), 
dimnames=list (names (data), names (data)))\n');
 	} else {
 		echo ('result <- cor (data, use=' + use + ', method=' + method + 
')\n');
 	}
 	if (do_p || polyCorr) {
-		echo ('# calculate matrix of probabilities\n');
+		comment ('calculate matrix of probabilities');
 		echo ('result.p <- matrix (nrow = length (data), ncol = length (data), 
dimnames=list (names (data), names (data)))\n');
 		if (exclude_whole) {
-			echo ('# as we need to do pairwise comparisons for technical 
reasons,\n');
-			echo ('# we need to exclude incomplete cases first to match the 
use="complete.obs" parameter in cor()\n');
+			comment ('as we need to do pairwise comparisons for technical 
reasons,\nwe need to exclude incomplete cases first to match the 
use="complete.obs" parameter in cor()');
 			echo ('data <- data[complete.cases (data),]\n');
 		} else {}
 		echo ('for (i in 1:length (data)) {\n');
@@ -79,7 +78,7 @@ function calculate () {
 		echo ('		if (i != j) {\n');
 		if (polyCorr) {
 			if(method == "\"polyserial\""){
-				echo('			# polyserial expects x to be numeric\n');
+				comment('polyserial expects x to be numeric', '			');
 				echo('			if(is.numeric(data[[i]]) & 
!is.numeric(data[[j]])){\n');
 				echo('				t <- polyserial(data[[i]], data[[j]]');
 				if (do_p) {
@@ -120,23 +119,24 @@ function calculate () {
 }
 
 function printout () {
-	echo ('rk.header ("Correlation Matrix", parameters=list ("Method", ' + 
method + ', "Exclusion", ' + use + '))\n\n');
-	echo ('rk.results (data.frame (result, check.names=FALSE), titles=c 
("Coefficient", names (data)))\n');
+	// TODO: Printing of method and use is a poor solution, esp. when 
translated. We should support getting the <radio>'s option labels, and print 
those, instead.
+	new Header (i18n ("Correlation Matrix")).add (i18n ("Method"), noquote 
(method)).add (i18n ("Exclusion"), noquote (use)).print ();
+	echo ('rk.results (data.frame (result, check.names=FALSE), titles=c (' + 
i18n ("Coefficient") + ', names (data)))\n');
 	if (do_p) {
 		if (polyCorr) {
-			echo ('rk.header ("Standard errors, test of bivariate normality 
and sample size", level=4)\n');
+			new Header (i18n ("Standard errors, test of bivariate normality 
and sample size"), 4).print ();
 			echo ('rk.results (data.frame (result.p, check.names=FALSE, 
stringsAsFactors=FALSE), titles=c ("Chisq, df, p \\\\ se, n", names 
(data)))\n');
 		} else {
-			echo ('rk.header ("p-values and sample size", level=4)\n');
+			new Header (i18n ("p-values and sample size"), 4).print ();
 			echo ('rk.results (data.frame (result.p, check.names=FALSE), 
titles=c ("n \\\\ p", names (data)))\n');
 		}
 	}
 	if (!polyCorr && toNumeric) {
 		echo ('if(length(transformed.vars) > 0){\n');
-		echo ('	rk.header("Variables treated as numeric ranks", level=4)\n');
+		new Header (i18n ("Variables treated as numeric ranks"), 4).print 
('\t');
 		echo ('	for (i in names(transformed.vars)) {\n');
-		echo ('		rk.print(paste("Variable:<b>", i, "</b>"))\n');
-		echo ('		rk.results(transformed.vars[[i]], titles=c("original 
value", "assigned rank"))\n');
+		echo ('		rk.print(paste(' + i18nc ("noun", "Variable:") + ', 
"<b>", i, "</b>"))\n');
+		echo ('		rk.results(transformed.vars[[i]], titles=c(' + i18n 
("original value") + ', ' + i18n ("assigned rank") + '))\n');
 		echo ('	}\n');
 		echo ('} else {}\n');
 	} else {}
diff --git a/rkward/plugins/analysis/crosstab.js 
b/rkward/plugins/analysis/crosstab.js
index d6e737a..bd92e60 100644
--- a/rkward/plugins/analysis/crosstab.js
+++ b/rkward/plugins/analysis/crosstab.js
@@ -9,12 +9,12 @@ function preprocess () {
 	any_table_additions = (prop_row || prop_column || prop_total || 
chisq_expected);
 	if (!any_table_additions) return;
 
-	echo ('# convenience function to bind together several two dimensional 
tables into a single three dimensional table\n');
+	comment ('convenience function to bind together several two dimensional 
tables into a single three dimensional table\n');
 	echo ('bind.tables <- function (...) {\n');
 	echo ('	tables <- list (...)\n');
 	echo ('	output <- unlist (tables)\n');
 	echo ('	dim (output) <- c (dim (tables[[1]]), length (tables))\n');
-	echo ('	dimnames (output) <- c (dimnames (tables[[1]]), list 
(statistic=names(tables)))\n');
+	echo ('	dimnames (output) <- c (dimnames (tables[[1]]), list (' + i18nc 
("a statistic indicator" ,"statistic") + '=names(tables)))\n');
 	echo ('	output\n');
 	echo ('}\n');
 }
@@ -29,7 +29,7 @@ function calculate () {
 	echo ('results <- list()\n');
 	if (chisq) echo ('chisquares <- list ()\n');
 	echo ('\n');
-	echo ('# calculate crosstabs\n');
+	comment ('calculate crosstabs\n');
 	echo ('for (i in 1:length (yvars)) {\n');
 	echo ('	count <- table(x[[1]], yvars[[i]])\n');
 	if (chisq) {
@@ -47,18 +47,18 @@ function calculate () {
 	} else {
 		// unfortunately, mixing margins and proportions is a pain, in that 
they don't make a whole lot of sense for "% of row", and "% of column"
 		if (margins) {
-			echo ('	results[[i]] <- bind.tables ("count"=addmargins 
(count)');
-			if (prop_row) echo (',\n		"% of row"=addmargins 
(prop.table(count, 1) * 100, quiet=TRUE, FUN=function(x) NA)');
-			if (prop_column) echo (',\n		"% of column"=addmargins 
(prop.table(count, 2) * 100, quiet=TRUE, FUN=function(x) NA)');
-			if (prop_total) echo (',\n		"% of total"=addmargins 
(prop.table(count) * 100)');
-			if (chisq_expected) echo (',\n		"expected"=addmargins 
(chisquares[[i]]$expected, quiet=TRUE, FUN=function(x) NA)');
+			echo ('	results[[i]] <- bind.tables (' + i18nc ("noun", "count") 
+ '=addmargins (count)');
+			if (prop_row) echo (',\n		' + i18n ("% of row") + 
'=addmargins (prop.table(count, 1) * 100, quiet=TRUE, FUN=function(x) NA)');
+			if (prop_column) echo (',\n		' + i18n ("% of column") + 
'=addmargins (prop.table(count, 2) * 100, quiet=TRUE, FUN=function(x) NA)');
+			if (prop_total) echo (',\n		' + i18n ("% of total") + 
'=addmargins (prop.table(count) * 100)');
+			if (chisq_expected) echo (',\n		' + i18nc ("expected count", 
"expected") + '=addmargins (chisquares[[i]]$expected, quiet=TRUE, 
FUN=function(x) NA)');
 			echo (')\n');
 		} else {
-			echo ('	results[[i]] <- bind.tables ("count"=count');
-			if (prop_row) echo (',\n		"% of row"=prop.table(count, 1) * 
100');
-			if (prop_column) echo (',\n		"% of column"=prop.table(count, 
2) * 100');
-			if (prop_total) echo (',\n		"% of total"=prop.table(count) * 
100');
-			if (chisq_expected) echo (',\n		
"expected"=chisquares[[i]]$expected');
+			echo ('	results[[i]] <- bind.tables (' + i18nc ("noun", "count") 
+ '=count');
+			if (prop_row) echo (',\n		' + i18n ("% of row") + 
'=prop.table(count, 1) * 100');
+			if (prop_column) echo (',\n		' + i18n ("% of column") + 
'=prop.table(count, 2) * 100');
+			if (prop_total) echo (',\n		' + i18n ("% of total") + 
'=prop.table(count) * 100');
+			if (chisq_expected) echo (',\n		' + i18nc ("expected count", 
"expected") + '=chisquares[[i]]$expected');
 			echo (')\n');
 		}
 	}
@@ -70,15 +70,21 @@ function printout () {
 }
 
 function preview () {
+	preprocess ();
 	calculate ();
 	doPrintout (false);
 }
 
+function sectionHeader (title, additions) {
+	echo ('\trk.header (' + quote (title) + ', parameters=list (' + i18nc 
("dependent variable", "Dependent") + '=names (x)[1], '
+	                      + i18nc ("independent variable", "Independent") + 
'=names (yvars)[i]' + additions + '), level=2)\n');
+}
+
 function doPrintout (full) {
 	if (full) {
-		echo ('rk.header ("Crosstabs (n to 1)", level=1)\n');
+		new Header (i18n ("Crosstabs (n to 1)"), 1).print ();
 		echo ('for (i in 1:length (results)) {\n');
-		echo ('	rk.header ("Crosstabs (n to 1)", parameters=list 
("Dependent", names (x)[1], "Independent", names (yvars)[i]), level=2)\n');
+		sectionHeader (i18n ("Crosstabs (n to 1)"), "");
 		if (any_table_additions) {
 			echo ('	rk.print (ftable (results[[i]], col.vars=2))\n');
 		} else {
@@ -86,13 +92,13 @@ function doPrintout (full) {
 		}
 		if (getValue ("chisq") == "TRUE") {
 			echo ('\n');
-			echo ('	rk.header ("Pearson\'s Chi Square Test for Crosstabs", 
list ("Dependent", names (x)[1], "Independent", names (yvars)[i], "Method", 
chisquares[[i]][["method"]]), level=2)\n');
-			echo ('	rk.results (list (\'Statistic\'=chisquares[[i]]
[[\'statistic\']], \'df\'=chisquares[[i]][[\'parameter\']], 
\'p\'=chisquares[[i]][[\'p.value\']]))\n');
+			sectionHeader (i18n ("Pearson\'s Chi Square Test for Crosstabs"), 
', ' + i18n ("Method") + '=chisquares[[i]][["method"]]');
+			echo ('	rk.results (list (' + i18nc ("a statistic indicator", 
"Statistic") + '=chisquares[[i]][[\'statistic\']], \'df\'=chisquares[[i]]
[[\'parameter\']], \'p\'=chisquares[[i]][[\'p.value\']]))\n');
 		}
 
 		if (getValue ("barplot") == "TRUE") {
 			echo ('\n');
-			echo ('	rk.header ("Barplot for Crosstabs", list 
("Dependent"=names (x)[1], "Independent"=names (yvars)[i]' + getValue 
('barplot_embed.code.preprocess') + '), level=2)\n');
+			sectionHeader (i18n ("Barplot for Crosstabs"), getValue 
('barplot_embed.code.preprocess'));
 			echo ('	rk.graph.on ()\n');
 			echo ('	try ({\n');
 			if (any_table_additions) {
diff --git a/rkward/plugins/analysis/crosstab_multi.js 
b/rkward/plugins/analysis/crosstab_multi.js
index f5bdec5..b7fdf07 100644
--- a/rkward/plugins/analysis/crosstab_multi.js
+++ b/rkward/plugins/analysis/crosstab_multi.js
@@ -12,7 +12,7 @@ function calculate () {
 }
 
 function printout () {
-	echo ('rk.header ("Crosstabs (n to n)", parameters=list 
("Variables"=datadescription))\n');
+	new Header (i18n ("Crosstabs (n to n)")).add (i18n ("Variables"), noquote 
(datadescription)).print ();
 	echo ('\n');
 	echo ('rk.print (result)\n');
 }
diff --git a/tests/analysis_plugins/correlation_matrix.rkcommands.R 
b/tests/analysis_plugins/correlation_matrix.rkcommands.R
index 8044b25..aac0e0f 100644
--- a/tests/analysis_plugins/correlation_matrix.rkcommands.R
+++ b/tests/analysis_plugins/correlation_matrix.rkcommands.R
@@ -19,8 +19,8 @@ for (i in 1:length (data)) {
 	}
 }
 ## Print result
-rk.header ("Correlation Matrix", parameters=list ("Method", "pearson", 
"Exclusion", "pairwise.complete.obs"))
-
+rk.header ("Correlation Matrix", parameters=list("Method"="pearson",
+	"Exclusion"="pairwise.complete.obs"))
 rk.results (data.frame (result, check.names=FALSE), titles=c ("Coefficient", 
names (data)))
 rk.header ("p-values and sample size", level=4)
 rk.results (data.frame (result.p, check.names=FALSE), titles=c ("n \\ p", 
names (data)))
@@ -47,8 +47,8 @@ for (i in 1:length (data)) {
 	}
 }
 ## Print result
-rk.header ("Correlation Matrix", parameters=list ("Method", "polychoric", 
"Exclusion", "pairwise"))
-
+rk.header ("Correlation Matrix", parameters=list("Method"="polychoric",
+	"Exclusion"="pairwise"))
 rk.results (data.frame (result, check.names=FALSE), titles=c ("Coefficient", 
names (data)))
 })
 local({
@@ -61,7 +61,7 @@ data <- as.data.frame (data.list, check.names=FALSE)
 # calculate correlation matrix
 result <- cor (data, use="pairwise.complete.obs", method="pearson")
 ## Print result
-rk.header ("Correlation Matrix", parameters=list ("Method", "pearson", 
"Exclusion", "pairwise.complete.obs"))
-
+rk.header ("Correlation Matrix", parameters=list("Method"="pearson",
+	"Exclusion"="pairwise.complete.obs"))
 rk.results (data.frame (result, check.names=FALSE), titles=c ("Coefficient", 
names (data)))
 })
diff --git a/tests/analysis_plugins/crosstab_n_to_1.rkcommands.R 
b/tests/analysis_plugins/crosstab_n_to_1.rkcommands.R
index ed9ba8d..baa8e8b 100644
--- a/tests/analysis_plugins/crosstab_n_to_1.rkcommands.R
+++ b/tests/analysis_plugins/crosstab_n_to_1.rkcommands.R
@@ -6,6 +6,7 @@ results <- list()
 chisquares <- list ()
 
 # calculate crosstabs
+
 for (i in 1:length (yvars)) {
 	count <- table(x[[1]], yvars[[i]])
 	chisquares[[i]] <- chisq.test (count, simulate.p.value = FALSE)
@@ -14,13 +15,13 @@ for (i in 1:length (yvars)) {
 ## Print result
 rk.header ("Crosstabs (n to 1)", level=1)
 for (i in 1:length (results)) {
-	rk.header ("Crosstabs (n to 1)", parameters=list ("Dependent", names (x)
[1], "Independent", names (yvars)[i]), level=2)
+	rk.header ("Crosstabs (n to 1)", parameters=list ("Dependent"=names (x)
[1], "Independent"=names (yvars)[i]), level=2)
 	rk.results (results[[i]], titles=c(names (x)[1], names (yvars)[i]))
 
-	rk.header ("Pearson's Chi Square Test for Crosstabs", list ("Dependent", 
names (x)[1], "Independent", names (yvars)[i], "Method", chisquares[[i]]
[["method"]]), level=2)
-	rk.results (list ('Statistic'=chisquares[[i]][['statistic']], 
'df'=chisquares[[i]][['parameter']], 'p'=chisquares[[i]][['p.value']]))
+	rk.header ("Pearson's Chi Square Test for Crosstabs", parameters=list 
("Dependent"=names (x)[1], "Independent"=names (yvars)[i], 
"Method"=chisquares[[i]][["method"]]), level=2)
+	rk.results (list ("Statistic"=chisquares[[i]][['statistic']], 
'df'=chisquares[[i]][['parameter']], 'p'=chisquares[[i]][['p.value']]))
 
-	rk.header ("Barplot for Crosstabs", list ("Dependent"=names (x)[1], 
"Independent"=names (yvars)[i], "colors"="default", "Type"="juxtaposed", 
"Legend"="FALSE"), level=2)
+	rk.header ("Barplot for Crosstabs", parameters=list ("Dependent"=names (x)
[1], "Independent"=names (yvars)[i], "colors"="default", "Type"="juxtaposed", 
"Legend"="FALSE"), level=2)
 	rk.graph.on ()
 	try ({
 		counts <- results[[i]]
@@ -32,11 +33,12 @@ for (i in 1:length (results)) {
 local({
 ## Prepare
 # convenience function to bind together several two dimensional tables into a 
single three dimensional table
+
 bind.tables <- function (...) {
 	tables <- list (...)
 	output <- unlist (tables)
 	dim (output) <- c (dim (tables[[1]]), length (tables))
-	dimnames (output) <- c (dimnames (tables[[1]]), list 
(statistic=names(tables)))
+	dimnames (output) <- c (dimnames (tables[[1]]), list 
("statistic"=names(tables)))
 	output
 }
 ## Compute
@@ -46,6 +48,7 @@ results <- list()
 chisquares <- list ()
 
 # calculate crosstabs
+
 for (i in 1:length (yvars)) {
 	count <- table(x[[1]], yvars[[i]])
 	chisquares[[i]] <- chisq.test (count, simulate.p.value = FALSE)
@@ -58,13 +61,13 @@ for (i in 1:length (yvars)) {
 ## Print result
 rk.header ("Crosstabs (n to 1)", level=1)
 for (i in 1:length (results)) {
-	rk.header ("Crosstabs (n to 1)", parameters=list ("Dependent", names (x)
[1], "Independent", names (yvars)[i]), level=2)
+	rk.header ("Crosstabs (n to 1)", parameters=list ("Dependent"=names (x)
[1], "Independent"=names (yvars)[i]), level=2)
 	rk.print (ftable (results[[i]], col.vars=2))
 
-	rk.header ("Pearson's Chi Square Test for Crosstabs", list ("Dependent", 
names (x)[1], "Independent", names (yvars)[i], "Method", chisquares[[i]]
[["method"]]), level=2)
-	rk.results (list ('Statistic'=chisquares[[i]][['statistic']], 
'df'=chisquares[[i]][['parameter']], 'p'=chisquares[[i]][['p.value']]))
+	rk.header ("Pearson's Chi Square Test for Crosstabs", parameters=list 
("Dependent"=names (x)[1], "Independent"=names (yvars)[i], 
"Method"=chisquares[[i]][["method"]]), level=2)
+	rk.results (list ("Statistic"=chisquares[[i]][['statistic']], 
'df'=chisquares[[i]][['parameter']], 'p'=chisquares[[i]][['p.value']]))
 
-	rk.header ("Barplot for Crosstabs", list ("Dependent"=names (x)[1], 
"Independent"=names (yvars)[i], "colors"="rainbow", "Type"="juxtaposed", 
"Legend"="FALSE"), level=2)
+	rk.header ("Barplot for Crosstabs", parameters=list ("Dependent"=names (x)
[1], "Independent"=names (yvars)[i], "colors"="rainbow", "Type"="juxtaposed", 
"Legend"="FALSE"), level=2)
 	rk.graph.on ()
 	try ({
 		counts <- results[[i]][, , "count"]
diff --git a/tests/analysis_plugins/t_test.rkcommands.R 
b/tests/analysis_plugins/t_test.rkcommands.R
index b364100..f156507 100644
--- a/tests/analysis_plugins/t_test.rkcommands.R
+++ b/tests/analysis_plugins/t_test.rkcommands.R
@@ -4,19 +4,19 @@ names <- rk.get.description (test50x, test50y)
 ## Compute
 result <- t.test (x=test50x, y=test50y, alternative="two.sided")
 ## Print result
-rk.header (result$method, 
-	parameters=list ("Comparing"=paste (names[1], "against", names[2]),
+rk.header (result$method, parameters=list("Comparing"=names[1],
+	"against"=names[2],
 	"H1"=rk.describe.alternative (result),
 	"Equal variances"="not assumed"))
 
 rk.results (list (
-	'Variable Name'=names,
-	'estimated mean'=result$estimate,
-	'degrees of freedom'=result$parameter,
+	"Variable Name"=names,
+	"estimated mean"=result$estimate,
+	"degrees of freedom"=result$parameter,
 	t=result$statistic,
 	p=result$p.value,
-	'confidence interval percent'=(100 * attr(result$conf.int, "conf.level")),
-	'confidence interval of difference'=result$conf.int ))
+	"confidence interval percent"=(100 * attr(result$conf.int, "conf.level")),
+	"confidence interval of difference"=result$conf.int ))
 })
 local({
 ## Prepare
@@ -24,18 +24,18 @@ names <- rk.get.description (test10y, test10z)
 ## Compute
 result <- t.test (x=test10y, y=test10z, alternative="less", paired=TRUE, 
conf.level=0.99)
 ## Print result
-rk.header (result$method, 
-	parameters=list ("Comparing"=paste (names[1], "against", names[2]),
+rk.header (result$method, parameters=list("Comparing"=names[1],
+	"against"=names[2],
 	"H1"=rk.describe.alternative (result)))
 
 rk.results (list (
-	'Variable Name'=names,
-	'estimated mean'=result$estimate,
-	'degrees of freedom'=result$parameter,
+	"Variable Name"=names,
+	"estimated mean"=result$estimate,
+	"degrees of freedom"=result$parameter,
 	t=result$statistic,
 	p=result$p.value,
-	'confidence interval percent'=(100 * attr(result$conf.int, "conf.level")),
-	'confidence interval of difference'=result$conf.int ))
+	"confidence interval percent"=(100 * attr(result$conf.int, "conf.level")),
+	"confidence interval of difference"=result$conf.int ))
 })
 local({
 ## Prepare
@@ -43,16 +43,16 @@ names <- rk.get.description (test10z)
 ## Compute
 result <- t.test (x=test10z, mu=20.00, alternative="two.sided")
 ## Print result
-rk.header (result$method, 
-	parameters=list ("Comparing"=paste (names[1], "against constant"),
+rk.header (result$method, parameters=list("Comparing"=names[1],
+	"against"="constant value: 20.00",
 	"H1"=rk.describe.alternative (result)))
 
 rk.results (list (
-	'Variable Name'=names,
-	'estimated mean'=result$estimate,
-	'degrees of freedom'=result$parameter,
+	"Variable Name"=names,
+	"estimated mean"=result$estimate,
+	"degrees of freedom"=result$parameter,
 	t=result$statistic,
 	p=result$p.value,
-	'confidence interval percent'=(100 * attr(result$conf.int, "conf.level")),
-	'confidence interval of difference'=result$conf.int ))
+	"confidence interval percent"=(100 * attr(result$conf.int, "conf.level")),
+	"confidence interval of difference"=result$conf.int ))
 })
diff --git a/tests/analysis_plugins/t_test.rkout 
b/tests/analysis_plugins/t_test.rkout
index 475f286..e8d0718 100644
--- a/tests/analysis_plugins/t_test.rkout
+++ b/tests/analysis_plugins/t_test.rkout
@@ -1,6 +1,7 @@
 <h1>Welch Two Sample t-test</h1>
 <h2>Parameters</h2>
-<ul><li>Comparing: test50x against test50y</li>
+<ul><li>Comparing: test50x</li>
+<li>against: test50y</li>
 <li>H1: true difference in means is not equal to 0</li>
 <li>Equal variances: not assumed</li>
 </ul>
@@ -14,7 +15,8 @@ DATE<br />
 </table>
 <h1>Paired t-test</h1>
 <h2>Parameters</h2>
-<ul><li>Comparing: test10y against test10z</li>
+<ul><li>Comparing: test10y</li>
+<li>against: test10z</li>
 <li>H1: true difference in means is less than 0</li>
 </ul>
 DATE<br />
@@ -26,7 +28,8 @@ DATE<br />
 </table>
 <h1>One Sample t-test</h1>
 <h2>Parameters</h2>
-<ul><li>Comparing: test10z against constant</li>
+<ul><li>Comparing: test10z</li>
+<li>against: constant value: 20.00</li>
 <li>H1: true mean is not equal to 20</li>
 </ul>
 DATE<br />




More information about the rkward-tracker mailing list