This list is closed, nobody may subscribe to it.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(13) |
Nov
(40) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
|
Feb
(17) |
Mar
(25) |
Apr
(144) |
May
(18) |
Jun
|
Jul
(1) |
Aug
|
Sep
(130) |
Oct
(134) |
Nov
(72) |
Dec
(14) |
2006 |
Jan
|
Feb
(17) |
Mar
(90) |
Apr
(169) |
May
(21) |
Jun
(16) |
Jul
(1) |
Aug
(16) |
Sep
(125) |
Oct
(131) |
Nov
(64) |
Dec
(47) |
2007 |
Jan
(249) |
Feb
(247) |
Mar
(254) |
Apr
(86) |
May
(64) |
Jun
(10) |
Jul
(4) |
Aug
(17) |
Sep
(58) |
Oct
(144) |
Nov
(124) |
Dec
(13) |
2008 |
Jan
(58) |
Feb
|
Mar
(5) |
Apr
(19) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(24) |
Dec
|
2009 |
Jan
(1) |
Feb
(10) |
Mar
(29) |
Apr
(14) |
May
(62) |
Jun
(48) |
Jul
(27) |
Aug
(43) |
Sep
(44) |
Oct
(34) |
Nov
(10) |
Dec
(10) |
2010 |
Jan
(1) |
Feb
(26) |
Mar
(53) |
Apr
(41) |
May
(19) |
Jun
(52) |
Jul
(36) |
Aug
(24) |
Sep
(114) |
Oct
(73) |
Nov
(48) |
Dec
(139) |
2011 |
Jan
(54) |
Feb
(48) |
Mar
(45) |
Apr
(32) |
May
(121) |
Jun
(46) |
Jul
(3) |
Aug
(19) |
Sep
(146) |
Oct
(142) |
Nov
(48) |
Dec
(77) |
2012 |
Jan
(17) |
Feb
(5) |
Mar
(39) |
Apr
(31) |
May
(37) |
Jun
(7) |
Jul
|
Aug
(23) |
Sep
(40) |
Oct
(68) |
Nov
(68) |
Dec
(13) |
2013 |
Jan
(32) |
Feb
(47) |
Mar
(86) |
Apr
(82) |
May
(23) |
Jun
(1) |
Jul
(3) |
Aug
(1) |
Sep
|
Oct
(4) |
Nov
(3) |
Dec
(3) |
2014 |
Jan
|
Feb
|
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(1) |
Jul
|
Aug
(2) |
Sep
(65) |
Oct
(119) |
Nov
(82) |
Dec
(84) |
2015 |
Jan
(94) |
Feb
(46) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
2016 |
Jan
(4) |
Feb
(4) |
Mar
(2) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(3) |
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
From: Thomas F. <tho...@ru...> - 2015-01-31 16:33:02
|
Git commit 6ac9221f55cecc3872cf921907b23b7a514e3990 by Thomas Friedrichsmeier. Committed on 31/01/2015 at 13:25. Pushed by tfry into branch 'master'. These are no longer needed. M +0 -1 rkward/plugins/distributions/clt/plot_binomial_clt.rkh M +0 -1 rkward/plugins/distributions/clt/plot_chi_squared_clt.rkh M +0 -1 rkward/plugins/distributions/clt/plot_exponential_clt.rkh M +0 -1 rkward/plugins/distributions/clt/plot_f_clt.rkh M +0 -1 rkward/plugins/distributions/clt/plot_gamma_clt.rkh M +0 -1 rkward/plugins/distributions/clt/plot_geometric_clt.rkh M +0 -1 rkward/plugins/distributions/clt/plot_hypergeometric_clt.rkh M +0 -1 rkward/plugins/distributions/clt/plot_logistic_clt.rkh M +0 -1 rkward/plugins/distributions/clt/plot_lognormal_clt.rkh M +0 -1 rkward/plugins/distributions/clt/plot_negbinomial_clt.rkh M +0 -1 rkward/plugins/distributions/clt/plot_normal_clt.rkh M +0 -1 rkward/plugins/distributions/clt/plot_poisson_clt.rkh M +0 -1 rkward/plugins/distributions/clt/plot_t_clt.rkh M +0 -1 rkward/plugins/distributions/clt/plot_uniform_clt.rkh M +0 -1 rkward/plugins/distributions/clt/plot_weibull_clt.rkh M +0 -1 rkward/plugins/distributions/clt/plot_wilcoxon_clt.rkh http://commits.kde.org/rkward/6ac9221f55cecc3872cf921907b23b7a514e3990 diff --git a/rkward/plugins/distributions/clt/plot_binomial_clt.rkh b/rkward/plugins/distributions/clt/plot_binomial_clt.rkh index faba98a..d98105a 100644 --- a/rkward/plugins/distributions/clt/plot_binomial_clt.rkh +++ b/rkward/plugins/distributions/clt/plot_binomial_clt.rkh @@ -1,7 +1,6 @@ <!DOCTYPE rkhelp> <document> <snippets> - <snippet id="dist_name"><span>Binomial</span></snippet> <snippet id="dist_related"> <li><link href="rkward://component/plot_binomial_distribution"/></li> <li><link href="rkward://rhelp/Binomial"/></li> diff --git a/rkward/plugins/distributions/clt/plot_chi_squared_clt.rkh b/rkward/plugins/distributions/clt/plot_chi_squared_clt.rkh index 18763a6..66217bd 100644 --- a/rkward/plugins/distributions/clt/plot_chi_squared_clt.rkh +++ b/rkward/plugins/distributions/clt/plot_chi_squared_clt.rkh @@ -1,7 +1,6 @@ <!DOCTYPE rkhelp> <document> <snippets> - <snippet id="dist_name"><span>Chi-Squared</span></snippet> <snippet id="dist_related"> <li><link href="rkward://component/plot_chi_squared_distribution"/></li> <li><link href="rkward://rhelp/Chisquare"/></li> diff --git a/rkward/plugins/distributions/clt/plot_exponential_clt.rkh b/rkward/plugins/distributions/clt/plot_exponential_clt.rkh index 1d27580..d583adf 100644 --- a/rkward/plugins/distributions/clt/plot_exponential_clt.rkh +++ b/rkward/plugins/distributions/clt/plot_exponential_clt.rkh @@ -1,7 +1,6 @@ <!DOCTYPE rkhelp> <document> <snippets> - <snippet id="dist_name"><span>Exponential</span></snippet> <snippet id="dist_related"> <li><link href="rkward://component/plot_exponential_distribution"/></li> <li><link href="rkward://rhelp/Exponential"/></li> diff --git a/rkward/plugins/distributions/clt/plot_f_clt.rkh b/rkward/plugins/distributions/clt/plot_f_clt.rkh index 042955c..d4cd2e5 100644 --- a/rkward/plugins/distributions/clt/plot_f_clt.rkh +++ b/rkward/plugins/distributions/clt/plot_f_clt.rkh @@ -1,7 +1,6 @@ <!DOCTYPE rkhelp> <document> <snippets> - <snippet id="dist_name"><span>F</span></snippet> <snippet id="dist_related"> <li><link href="rkward://component/plot_f_distribution"/></li> <li><link href="rkward://rhelp/FDist"/></li> diff --git a/rkward/plugins/distributions/clt/plot_gamma_clt.rkh b/rkward/plugins/distributions/clt/plot_gamma_clt.rkh index f6047c4..810aca9 100644 --- a/rkward/plugins/distributions/clt/plot_gamma_clt.rkh +++ b/rkward/plugins/distributions/clt/plot_gamma_clt.rkh @@ -1,7 +1,6 @@ <!DOCTYPE rkhelp> <document> <snippets> - <snippet id="dist_name"><span>Gamma</span></snippet> <snippet id="dist_related"> <li><link href="rkward://component/plot_gamma_distribution"/></li> <li><link href="rkward://rhelp/GammaDist"/></li> diff --git a/rkward/plugins/distributions/clt/plot_geometric_clt.rkh b/rkward/plugins/distributions/clt/plot_geometric_clt.rkh index 490f1c9..335970d 100644 --- a/rkward/plugins/distributions/clt/plot_geometric_clt.rkh +++ b/rkward/plugins/distributions/clt/plot_geometric_clt.rkh @@ -1,7 +1,6 @@ <!DOCTYPE rkhelp> <document> <snippets> - <snippet id="dist_name"><span>Geometric</span></snippet> <snippet id="dist_related"> <li><link href="rkward://component/plot_geometric_distribution"/></li> <li><link href="rkward://rhelp/Geometric"/></li> diff --git a/rkward/plugins/distributions/clt/plot_hypergeometric_clt.rkh b/rkward/plugins/distributions/clt/plot_hypergeometric_clt.rkh index eb700cc..24dcc6d 100644 --- a/rkward/plugins/distributions/clt/plot_hypergeometric_clt.rkh +++ b/rkward/plugins/distributions/clt/plot_hypergeometric_clt.rkh @@ -1,7 +1,6 @@ <!DOCTYPE rkhelp> <document> <snippets> - <snippet id="dist_name"><span>Hypergeometric</span></snippet> <snippet id="dist_related"> <li><link href="rkward://component/plot_hypergeometric_distribution"/></li> <li><link href="rkward://rhelp/Hypergeometric"/></li> diff --git a/rkward/plugins/distributions/clt/plot_logistic_clt.rkh b/rkward/plugins/distributions/clt/plot_logistic_clt.rkh index 8fcbb88..8ffff99 100644 --- a/rkward/plugins/distributions/clt/plot_logistic_clt.rkh +++ b/rkward/plugins/distributions/clt/plot_logistic_clt.rkh @@ -1,7 +1,6 @@ <!DOCTYPE rkhelp> <document> <snippets> - <snippet id="dist_name"><span>Logistic</span></snippet> <snippet id="dist_related"> <li><link href="rkward://component/plot_logistic_distribution"/></li> <li><link href="rkward://rhelp/Logistic"/></li> diff --git a/rkward/plugins/distributions/clt/plot_lognormal_clt.rkh b/rkward/plugins/distributions/clt/plot_lognormal_clt.rkh index 6aa4650..d8bcd0c 100644 --- a/rkward/plugins/distributions/clt/plot_lognormal_clt.rkh +++ b/rkward/plugins/distributions/clt/plot_lognormal_clt.rkh @@ -1,7 +1,6 @@ <!DOCTYPE rkhelp> <document> <snippets> - <snippet id="dist_name"><span>Lognormal</span></snippet> <snippet id="dist_related"> <li><link href="rkward://component/plot_lognormal_distribution"/></li> <li><link href="rkward://rhelp/Lognormal"/></li> diff --git a/rkward/plugins/distributions/clt/plot_negbinomial_clt.rkh b/rkward/plugins/distributions/clt/plot_negbinomial_clt.rkh index 36b32cd..3b9597d 100644 --- a/rkward/plugins/distributions/clt/plot_negbinomial_clt.rkh +++ b/rkward/plugins/distributions/clt/plot_negbinomial_clt.rkh @@ -1,7 +1,6 @@ <!DOCTYPE rkhelp> <document> <snippets> - <snippet id="dist_name"><span>Negative Binomial</span></snippet> <snippet id="dist_related"> <li><link href="rkward://component/plot_negbinomial_distribution"/></li> <li><link href="rkward://rhelp/NegBinomial"/></li> diff --git a/rkward/plugins/distributions/clt/plot_normal_clt.rkh b/rkward/plugins/distributions/clt/plot_normal_clt.rkh index 076cf15..efe761d 100644 --- a/rkward/plugins/distributions/clt/plot_normal_clt.rkh +++ b/rkward/plugins/distributions/clt/plot_normal_clt.rkh @@ -1,7 +1,6 @@ <!DOCTYPE rkhelp> <document> <snippets> - <snippet id="dist_name"><span>Normal</span></snippet> <snippet id="dist_related"> <li><link href="rkward://component/plot_normal_distribution"/></li> </snippet> diff --git a/rkward/plugins/distributions/clt/plot_poisson_clt.rkh b/rkward/plugins/distributions/clt/plot_poisson_clt.rkh index 0d23f12..ca62722 100644 --- a/rkward/plugins/distributions/clt/plot_poisson_clt.rkh +++ b/rkward/plugins/distributions/clt/plot_poisson_clt.rkh @@ -1,7 +1,6 @@ <!DOCTYPE rkhelp> <document> <snippets> - <snippet id="dist_name"><span>Poisson</span></snippet> <snippet id="dist_related"> <li><link href="rkward://component/plot_poisson_distribution"/></li> <li><link href="rkward://rhelp/Poisson"/></li> diff --git a/rkward/plugins/distributions/clt/plot_t_clt.rkh b/rkward/plugins/distributions/clt/plot_t_clt.rkh index 2cde708..ab376dc 100644 --- a/rkward/plugins/distributions/clt/plot_t_clt.rkh +++ b/rkward/plugins/distributions/clt/plot_t_clt.rkh @@ -1,7 +1,6 @@ <!DOCTYPE rkhelp> <document> <snippets> - <snippet id="dist_name"><span>t</span></snippet> <snippet id="dist_related"> <li><link href="rkward://component/plot_t_distribution"/></li> <li><link href="rkward://rhelp/TDist"/></li> diff --git a/rkward/plugins/distributions/clt/plot_uniform_clt.rkh b/rkward/plugins/distributions/clt/plot_uniform_clt.rkh index f4c1b39..5c2ad8a 100644 --- a/rkward/plugins/distributions/clt/plot_uniform_clt.rkh +++ b/rkward/plugins/distributions/clt/plot_uniform_clt.rkh @@ -1,7 +1,6 @@ <!DOCTYPE rkhelp> <document> <snippets> - <snippet id="dist_name"><span>Uniform</span></snippet> <snippet id="dist_related"> <li><link href="rkward://component/plot_uniform_distribution"/></li> <li><link href="rkward://rhelp/Uniform"/></li> diff --git a/rkward/plugins/distributions/clt/plot_weibull_clt.rkh b/rkward/plugins/distributions/clt/plot_weibull_clt.rkh index 879da66..d710d67 100644 --- a/rkward/plugins/distributions/clt/plot_weibull_clt.rkh +++ b/rkward/plugins/distributions/clt/plot_weibull_clt.rkh @@ -1,7 +1,6 @@ <!DOCTYPE rkhelp> <document> <snippets> - <snippet id="dist_name"><span>Weibull</span></snippet> <snippet id="dist_related"> <li><link href="rkward://component/plot_weibull_distribution"/></li> <li><link href="rkward://rhelp/Weibull"/></li> diff --git a/rkward/plugins/distributions/clt/plot_wilcoxon_clt.rkh b/rkward/plugins/distributions/clt/plot_wilcoxon_clt.rkh index d5d46dd..51b9b9e 100644 --- a/rkward/plugins/distributions/clt/plot_wilcoxon_clt.rkh +++ b/rkward/plugins/distributions/clt/plot_wilcoxon_clt.rkh @@ -1,7 +1,6 @@ <!DOCTYPE rkhelp> <document> <snippets> - <snippet id="dist_name"><span>Wilcoxon</span></snippet> <snippet id="dist_related"> <li><link href="rkward://component/plot_wilcoxon_distribution"/></li> <li><link href="rkward://rhelp/Wilcoxon"/></li> |
From: Thomas F. <tho...@ru...> - 2015-01-31 16:33:02
|
Git commit 929455ef6b74b49e7cf86568e28265e0f10d2978 by Thomas Friedrichsmeier. Committed on 31/01/2015 at 16:29. Pushed by tfry into branch 'master'. Pro-actively scan all included files for labels. (Without this, in some cases, labels would not be resolved). M +11 -5 scripts/update_plugin_messages.py http://commits.kde.org/rkward/929455ef6b74b49e7cf86568e28265e0f10d2978 diff --git a/scripts/update_plugin_messages.py b/scripts/update_plugin_messages.py index 8440893..ce0ee06 100755 --- a/scripts/update_plugin_messages.py +++ b/scripts/update_plugin_messages.py @@ -266,6 +266,15 @@ def getElementLabelsRecursive (elem): ret.update (getElementLabelsRecursive (ce)) return ret +def getAllElementLabels (xmldoc, filename): + ret = getElementLabelsRecursive (xmldoc) + includes = xmldoc.getElementsByTagName ("include") + for inc in includes: + subfile = os.path.join (os.path.dirname (filename), inc.getAttribute ("file")) + subdoc = parseFile (subfile) + ret.update (getAllElementLabels (subdoc, subfile)) + return ret + # It really is sort of lame to have to parse JS and extract i18n-calls, when xgettext could do it. But that would not # - allow us to add info on which plugin this belongs to # - list the i18n strings from the JS file in sequence with the i18n strings from the XML parts of the same plugin @@ -455,11 +464,8 @@ def handleSubFile (filename, fetch_ids = False, is_include=False): infile["infile"] = filename infile["file_prefix"] = xmldoc.documentElement.getAttribute ("base_prefix") infile["caption"] = getFileCaption (xmldoc.documentElement, oldinfile["caption"]) - if (fetch_ids or is_include): - if (is_include): - infile["id_labels"].update (getElementLabelsRecursive (xmldoc.documentElement).items ()) - else: - infile["id_labels"] = getElementLabelsRecursive (xmldoc.documentElement) + if (fetch_ids): + infile["id_labels"] = getAllElementLabels (xmldoc.documentElement, filename) handleNode (xmldoc.documentElement) infile = oldinfile |
From: Thomas F. <tho...@ru...> - 2015-01-31 13:11:55
|
Git commit af5c28f17275c558857dea5069354840f2803592 by Thomas Friedrichsmeier. Committed on 31/01/2015 at 13:10. Pushed by tfry into branch 'master'. Update test standards for rk.results() formatting changes, and typo-fixes. M +3 -3 tests/analysis_plugins/agostino_test.rkout M +2 -2 tests/analysis_plugins/basic_statistics_a.rkout M +1 -1 tests/analysis_plugins/basic_statistics_b.rkout M +4 -4 tests/analysis_plugins/bonett_test.rkout M +1 -1 tests/analysis_plugins/box_test.rkout M +8 -8 tests/analysis_plugins/chisq_out_test.rkout M +6 -6 tests/analysis_plugins/correlation_matrix.rkout M +4 -1 tests/analysis_plugins/correlation_matrix_plot.rkcommands.R M +4 -4 tests/analysis_plugins/correlation_matrix_plot.rkout M +3 -3 tests/analysis_plugins/crosstab_n_to_1.rkout M +2 -2 tests/analysis_plugins/descriptive_stats.rkout M +3 -3 tests/analysis_plugins/dixon_test.rkout M +4 -4 tests/analysis_plugins/grubbs_test.rkout M +2 -2 tests/analysis_plugins/moments_moment.rkout M +3 -3 tests/analysis_plugins/outlier.rkout M +31 -31 tests/analysis_plugins/power_analysis.rkout M +4 -4 tests/analysis_plugins/pp_test.rkout M +2 -2 tests/analysis_plugins/skewness_kurtosis.rkout M +2 -2 tests/plots/barplot.rkcommands.R M +16 -16 tests/plots/pareto_chart.rkout http://commits.kde.org/rkward/af5c28f17275c558857dea5069354840f2803592 diff --git a/tests/analysis_plugins/agostino_test.rkout b/tests/analysis_plugins/agostino_test.rkout index 0df72d6..cc76b1f 100644 --- a/tests/analysis_plugins/agostino_test.rkout +++ b/tests/analysis_plugins/agostino_test.rkout @@ -5,7 +5,7 @@ DATE<br /> <table border="1"> <tr><td>Variable Name</td><td>skewness estimator (skew)</td><td>transformation (z)</td><td>p-value</td><td>Alternative Hypothesis</td><td>Length</td><td>NAs</td></tr> -<tr><td>breaks</td><td>1.272</td><td>2.3145</td><td>0.020643</td><td>data have a skewness</td><td>54</td><td>0</td></tr> -<tr><td>test50z</td><td>0</td><td>0</td><td>1</td><td>data have a skewness</td><td>50</td><td>0</td></tr> -<tr><td>test10x</td><td>0</td><td>0</td><td>1</td><td>data have a skewness</td><td>11</td><td>1</td></tr> +<tr><td>breaks </td><td>1.272</td><td>2.3145</td><td>0.020643</td><td>data have a skewness</td><td>54</td><td>0</td></tr> +<tr><td>test50z</td><td>0.000</td><td>0.0000</td><td>1.000000</td><td>data have a skewness</td><td>50</td><td>0</td></tr> +<tr><td>test10x</td><td>0.000</td><td>0.0000</td><td>1.000000</td><td>data have a skewness</td><td>11</td><td>1</td></tr> </table> diff --git a/tests/analysis_plugins/basic_statistics_a.rkout b/tests/analysis_plugins/basic_statistics_a.rkout index cc75105..3f03da5 100644 --- a/tests/analysis_plugins/basic_statistics_a.rkout +++ b/tests/analysis_plugins/basic_statistics_a.rkout @@ -12,6 +12,6 @@ DATE<br /> <table border="1"> <tr><td>Variable Name</td><td>Number of cases</td><td>Number of missing values</td><td>Mean</td><td>Variance</td><td>sd</td><td>Minimum</td><td>Maximum</td><td>Median</td><td>Inter Quartile Range</td><td>Quartiles</td><td>Quantiles</td><td>Trimmed Mean</td><td>Median Absolute Deviation</td><td>Huber M-Estimator</td></tr> -<tr><td>weight</td><td>15</td><td>0</td><td>136.73</td><td>240.21</td><td>15.499</td><td>115</td><td>164</td><td>135</td><td>23.5</td><td>0%: 115.0 25%: 124.5 50%: 135.0 75%: 148.0 100%: 164.0</td><td>0%: 115.0 20%: 122.4 40%: 130.8 60%: 140.2 80%: 150.8 100%: 164.0</td><td>136.73</td><td>17.554</td><td>3: 143.02</td></tr> -<tr><td>test50x</td><td>50</td><td>0</td><td>125.5</td><td>212.5</td><td>14.577</td><td>101</td><td>150</td><td>125.5</td><td>24.5</td><td>0%: 101.00 25%: 113.25 50%: 125.50 75%: 137.75 100%: 150.00</td><td>0%: 101.0 20%: 110.8 40%: 120.6 60%: 130.4 80%: 140.2 100%: 150.0</td><td>125.5</td><td>18.285</td><td>3: 138.26</td></tr> +<tr><td>weight </td><td>15</td><td>0</td><td>136.73</td><td>240.21</td><td>15.499</td><td>115</td><td>164</td><td>135.0</td><td>23.5</td><td>0%: 115.0 25%: 124.5 50%: 135.0 75%: 148.0 100%: 164.0 </td><td>0%: 115.0 20%: 122.4 40%: 130.8 60%: 140.2 80%: 150.8 100%: 164.0</td><td>136.73</td><td>17.554</td><td>3: 143.02</td></tr> +<tr><td>test50x</td><td>50</td><td>0</td><td>125.50</td><td>212.50</td><td>14.577</td><td>101</td><td>150</td><td>125.5</td><td>24.5</td><td>0%: 101.00 25%: 113.25 50%: 125.50 75%: 137.75 100%: 150.00</td><td>0%: 101.0 20%: 110.8 40%: 120.6 60%: 130.4 80%: 140.2 100%: 150.0</td><td>125.50</td><td>18.285</td><td>3: 138.26</td></tr> </table> diff --git a/tests/analysis_plugins/basic_statistics_b.rkout b/tests/analysis_plugins/basic_statistics_b.rkout index 802b742..21542b6 100644 --- a/tests/analysis_plugins/basic_statistics_b.rkout +++ b/tests/analysis_plugins/basic_statistics_b.rkout @@ -6,5 +6,5 @@ DATE<br /> <table border="1"> <tr><td>Variable Name</td><td>Minimum values</td><td>Maximum values</td></tr> <tr><td>test10x</td><td>101 102</td><td>110 109 108</td></tr> -<tr><td>height</td><td>58 59</td><td>72 71 70</td></tr> +<tr><td>height </td><td>58 59 </td><td>72 71 70 </td></tr> </table> diff --git a/tests/analysis_plugins/bonett_test.rkout b/tests/analysis_plugins/bonett_test.rkout index b506e9f..4bb10eb 100644 --- a/tests/analysis_plugins/bonett_test.rkout +++ b/tests/analysis_plugins/bonett_test.rkout @@ -5,10 +5,10 @@ DATE<br /> <table border="1"> <tr><td>Variable Name</td><td>Kurtosis estimator (tau)</td><td>Transformation (z)</td><td>p-value</td><td>Alternative Hypothesis</td><td>Length</td><td>NAs</td></tr> -<tr><td>test50z</td><td>50</td><td>-2.2224</td><td>0.026254</td><td>kurtosis is not equal to sqrt(2/pi)</td><td>50</td><td>0</td></tr> +<tr><td>test50z</td><td>50.0</td><td>-2.2224</td><td>0.026254</td><td>kurtosis is not equal to sqrt(2/pi)</td><td>50</td><td>0</td></tr> <tr><td>test50y</td><td>12.5</td><td>-2.2224</td><td>0.026254</td><td>kurtosis is not equal to sqrt(2/pi)</td><td>50</td><td>0</td></tr> <tr><td>test50x</td><td>12.5</td><td>-2.2224</td><td>0.026254</td><td>kurtosis is not equal to sqrt(2/pi)</td><td>50</td><td>0</td></tr> -<tr><td>test10z</td><td>10</td><td>-1.1304</td><td>0.25832</td><td>kurtosis is not equal to sqrt(2/pi)</td><td>11</td><td>1</td></tr> -<tr><td>test10y</td><td>2.5</td><td>-1.1304</td><td>0.25832</td><td>kurtosis is not equal to sqrt(2/pi)</td><td>11</td><td>1</td></tr> -<tr><td>test10x</td><td>2.5</td><td>-1.1304</td><td>0.25832</td><td>kurtosis is not equal to sqrt(2/pi)</td><td>11</td><td>1</td></tr> +<tr><td>test10z</td><td>10.0</td><td>-1.1304</td><td>0.258320</td><td>kurtosis is not equal to sqrt(2/pi)</td><td>11</td><td>1</td></tr> +<tr><td>test10y</td><td> 2.5</td><td>-1.1304</td><td>0.258320</td><td>kurtosis is not equal to sqrt(2/pi)</td><td>11</td><td>1</td></tr> +<tr><td>test10x</td><td> 2.5</td><td>-1.1304</td><td>0.258320</td><td>kurtosis is not equal to sqrt(2/pi)</td><td>11</td><td>1</td></tr> </table> diff --git a/tests/analysis_plugins/box_test.rkout b/tests/analysis_plugins/box_test.rkout index 36856c6..074e0f1 100644 --- a/tests/analysis_plugins/box_test.rkout +++ b/tests/analysis_plugins/box_test.rkout @@ -7,5 +7,5 @@ DATE<br /> <table border="1"> <tr><td>Variable Name</td><td>Length</td><td>NAs</td><td>X-squared</td><td>degrees of freedom</td><td>p-value</td></tr> <tr><td>test50x</td><td>50</td><td>0</td><td>44.18</td><td>1</td><td>2.9953e-11</td></tr> -<tr><td>test10y</td><td>11</td><td>1</td><td>4.9</td><td>1</td><td>0.026857</td></tr> +<tr><td>test10y</td><td>11</td><td>1</td><td> 4.90</td><td>1</td><td>2.6857e-02</td></tr> </table> diff --git a/tests/analysis_plugins/chisq_out_test.rkout b/tests/analysis_plugins/chisq_out_test.rkout index 1fb9db7..81a8bf6 100644 --- a/tests/analysis_plugins/chisq_out_test.rkout +++ b/tests/analysis_plugins/chisq_out_test.rkout @@ -5,10 +5,10 @@ DATE<br /> <table border="1"> <tr><td>Variable Name</td><td>Length</td><td>NAs</td><td>X-squared</td><td>p-value</td><td>Alternative Hypothesis</td><td>Variance</td><td>Mean</td><td>Standard Deviation</td><td>Median</td><td>Minimum</td><td>Maximum</td></tr> -<tr><td>shape</td><td>48</td><td>0</td><td>8.6813</td><td>0.0032149</td><td>highest value 0.464125 is an outlier</td><td>0.0069717</td><td>0.21811</td><td>0.083496</td><td>0.19886</td><td>0.09033</td><td>0.46413</td></tr> -<tr><td>perm</td><td>48</td><td>0</td><td>4.0819</td><td>0.043346</td><td>highest value 1300 is an outlier</td><td>191685</td><td>415.45</td><td>437.82</td><td>130.5</td><td>6.3</td><td>1300</td></tr> -<tr><td>peri</td><td>48</td><td>0</td><td>2.7487</td><td>0.097335</td><td>lowest value 308.642 is an outlier</td><td>2049654</td><td>2682.2</td><td>1431.7</td><td>2536.2</td><td>308.64</td><td>4864.2</td></tr> -<tr><td>area</td><td>48</td><td>0</td><td>5.2881</td><td>0.021472</td><td>lowest value 1016 is an outlier</td><td>7203045</td><td>7187.7</td><td>2683.8</td><td>7487</td><td>1016</td><td>12212</td></tr> +<tr><td>shape</td><td>48</td><td>0</td><td>8.6813</td><td>0.0032149</td><td>highest value 0.464125 is an outlier</td><td>6.9717e-03</td><td> 0.21811</td><td>8.3496e-02</td><td> 0.19886</td><td> 0.09033</td><td>4.6413e-01</td></tr> +<tr><td>perm </td><td>48</td><td>0</td><td>4.0819</td><td>0.0433462</td><td>highest value 1300 is an outlier </td><td>1.9168e+05</td><td> 415.45000</td><td>4.3782e+02</td><td> 130.50000</td><td> 6.30000</td><td>1.3000e+03</td></tr> +<tr><td>peri </td><td>48</td><td>0</td><td>2.7487</td><td>0.0973350</td><td>lowest value 308.642 is an outlier </td><td>2.0497e+06</td><td>2682.21194</td><td>1.4317e+03</td><td>2536.19500</td><td> 308.64200</td><td>4.8642e+03</td></tr> +<tr><td>area </td><td>48</td><td>0</td><td>5.2881</td><td>0.0214719</td><td>lowest value 1016 is an outlier </td><td>7.2030e+06</td><td>7187.72917</td><td>2.6838e+03</td><td>7487.00000</td><td>1016.00000</td><td>1.2212e+04</td></tr> </table> <h1>Chi-squared test for outlier</h1> <h2>Parameters</h2> @@ -17,8 +17,8 @@ DATE<br /> DATE<br /> <table border="1"> <tr><td>Variable Name</td><td>X-squared</td><td>p-value</td><td>Alternative Hypothesis</td><td>Variance</td></tr> -<tr><td>shape</td><td>2.342</td><td>0.12592</td><td>lowest value 0.0903296 is an outlier</td><td>0.0069717</td></tr> -<tr><td>perm</td><td>0.87333</td><td>0.35004</td><td>lowest value 6.3 is an outlier</td><td>191685</td></tr> -<tr><td>peri</td><td>2.3229</td><td>0.12748</td><td>highest value 4864.22 is an outlier</td><td>2049654</td></tr> -<tr><td>area</td><td>3.5045</td><td>0.061201</td><td>highest value 12212 is an outlier</td><td>7203045</td></tr> +<tr><td>shape</td><td>2.34205</td><td>0.125924</td><td>lowest value 0.0903296 is an outlier</td><td>6.9717e-03</td></tr> +<tr><td>perm </td><td>0.87333</td><td>0.350036</td><td>lowest value 6.3 is an outlier </td><td>1.9168e+05</td></tr> +<tr><td>peri </td><td>2.32291</td><td>0.127481</td><td>highest value 4864.22 is an outlier </td><td>2.0497e+06</td></tr> +<tr><td>area </td><td>3.50453</td><td>0.061201</td><td>highest value 12212 is an outlier </td><td>7.2030e+06</td></tr> </table> diff --git a/tests/analysis_plugins/correlation_matrix.rkout b/tests/analysis_plugins/correlation_matrix.rkout index 0ecd166..c5731f4 100644 --- a/tests/analysis_plugins/correlation_matrix.rkout +++ b/tests/analysis_plugins/correlation_matrix.rkout @@ -14,8 +14,8 @@ DATE<br /> <br /> <table border="1"> <tr><td>n \ p</td><td>test50x</td><td>test50y</td><td>test50z</td></tr> -<tr><td>test50x</td><td>NA</td><td>0</td><td>0</td></tr> -<tr><td>test50y</td><td>50</td><td>NA</td><td>0</td></tr> +<tr><td>test50x</td><td>NA</td><td> 0</td><td> 0</td></tr> +<tr><td>test50y</td><td>50</td><td>NA</td><td> 0</td></tr> <tr><td>test50z</td><td>50</td><td>50</td><td>NA</td></tr> </table> <h1>Correlation Matrix</h1> @@ -26,8 +26,8 @@ DATE<br /> DATE<br /> <table border="1"> <tr><td>Coefficient</td><td>test10y</td><td>test10a</td></tr> -<tr><td>test10y</td><td>NA</td><td>0.60718</td></tr> -<tr><td>test10a</td><td>0.60718</td><td>NA</td></tr> +<tr><td>test10y</td><td> NA</td><td>0.60718</td></tr> +<tr><td>test10a</td><td>0.60718</td><td> NA</td></tr> </table> <h1>Correlation Matrix</h1> <h2>Parameters</h2> @@ -37,6 +37,6 @@ DATE<br /> DATE<br /> <table border="1"> <tr><td>Coefficient</td><td>weight</td><td>height</td></tr> -<tr><td>weight</td><td>1</td><td>0.99549</td></tr> -<tr><td>height</td><td>0.99549</td><td>1</td></tr> +<tr><td>weight</td><td>1.00000</td><td>0.99549</td></tr> +<tr><td>height</td><td>0.99549</td><td>1.00000</td></tr> </table> diff --git a/tests/analysis_plugins/correlation_matrix_plot.rkcommands.R b/tests/analysis_plugins/correlation_matrix_plot.rkcommands.R index 90b98e1..d00ce31 100644 --- a/tests/analysis_plugins/correlation_matrix_plot.rkcommands.R +++ b/tests/analysis_plugins/correlation_matrix_plot.rkcommands.R @@ -23,7 +23,10 @@ cor.graph <- function(x) { ## Print result data <- data.frame (rock) -rk.header ("Correlation Matrix Plot", parameters=list ("Method", "pearson", "Exclusion", "pairwise.complete.obs", "Precision", "3 digits", "Scale text", "TRUE")) +rk.header ("Correlation Matrix Plot", parameters=list("Method"="Pearson", + "Exclude missing values"="pairwise", + "Precision (digits)"="3", + "Scale text"="yes")) rk.graph.on () try ({ diff --git a/tests/analysis_plugins/correlation_matrix_plot.rkout b/tests/analysis_plugins/correlation_matrix_plot.rkout index 575c73b..32b5dc0 100644 --- a/tests/analysis_plugins/correlation_matrix_plot.rkout +++ b/tests/analysis_plugins/correlation_matrix_plot.rkout @@ -1,9 +1,9 @@ <h1>Correlation Matrix Plot</h1> <h2>Parameters</h2> -<ul><li>Method: pearson</li> -<li>Exclusion: pairwise.complete.obs</li> -<li>Precision: 3 digits</li> -<li>Scale text: TRUE</li> +<ul><li>Method: Pearson</li> +<li>Exclude missing values: pairwise</li> +<li>Precision (digits): 3</li> +<li>Scale text: yes</li> </ul> DATE<br /> <img src="graph.png" width="480" height="480"><br> diff --git a/tests/analysis_plugins/crosstab_n_to_1.rkout b/tests/analysis_plugins/crosstab_n_to_1.rkout index 3bc4557..56cfac1 100644 --- a/tests/analysis_plugins/crosstab_n_to_1.rkout +++ b/tests/analysis_plugins/crosstab_n_to_1.rkout @@ -41,9 +41,9 @@ DATE<br /> <br /> <table border="1"> <tr><td></td><td>tension = L</td><td>tension = M</td><td>tension = H</td></tr> -<tr><td>tension = L</td><td>18</td><td>0</td><td>0</td></tr> -<tr><td>tension = M</td><td>0</td><td>18</td><td>0</td></tr> -<tr><td>tension = H</td><td>0</td><td>0</td><td>18</td></tr> +<tr><td>tension = L</td><td>18</td><td> 0</td><td> 0</td></tr> +<tr><td>tension = M</td><td> 0</td><td>18</td><td> 0</td></tr> +<tr><td>tension = H</td><td> 0</td><td> 0</td><td>18</td></tr> </table> <h2>Pearson's Chi Square Test for Crosstabs</h2> <h3>Parameters</h3> diff --git a/tests/analysis_plugins/descriptive_stats.rkout b/tests/analysis_plugins/descriptive_stats.rkout index c6f73c8..e12650c 100644 --- a/tests/analysis_plugins/descriptive_stats.rkout +++ b/tests/analysis_plugins/descriptive_stats.rkout @@ -11,6 +11,6 @@ DATE<br /> <br /> <table border="1"> <tr><td>Object</td><td>mean</td><td>median</td><td>min</td><td>max</td><td>standard deviation</td><td>sum</td><td>product</td><td>Median Absolute Deviation</td><td>length of sample</td><td>number of NAs</td></tr> -<tr><td>height</td><td>65</td><td>65</td><td>58</td><td>72</td><td>4.4721</td><td>975</td><td>1.511e+27</td><td>5.8512</td><td>15</td><td>0</td></tr> -<tr><td>test10z</td><td>22</td><td>22</td><td>4</td><td>40</td><td>12.111</td><td>220</td><td>3.8051e+12</td><td>14.628</td><td>11</td><td>1</td></tr> +<tr><td>height </td><td>65</td><td>65</td><td>58</td><td>72</td><td> 4.4721</td><td>975</td><td>1.5110e+27</td><td> 5.8512</td><td>15</td><td>0</td></tr> +<tr><td>test10z</td><td>22</td><td>22</td><td> 4</td><td>40</td><td>12.1106</td><td>220</td><td>3.8051e+12</td><td>14.6280</td><td>11</td><td>1</td></tr> </table> diff --git a/tests/analysis_plugins/dixon_test.rkout b/tests/analysis_plugins/dixon_test.rkout index 84b613d..6de95ca 100644 --- a/tests/analysis_plugins/dixon_test.rkout +++ b/tests/analysis_plugins/dixon_test.rkout @@ -7,8 +7,8 @@ DATE<br /> <table border="1"> <tr><td>Variable Name</td><td>Length</td><td>NAs</td><td>Dixon Q-statistic</td><td>p-value</td><td>Alternative Hypothesis</td><td>Mean</td><td>Standard Deviation</td><td>Median</td><td>Minimum</td><td>Maximum</td></tr> -<tr><td>weight</td><td>15</td><td>0</td><td>0.22727</td><td>0.76454</td><td>highest value 164 is an outlier</td><td>136.73</td><td>15.499</td><td>135</td><td>115</td><td>164</td></tr> -<tr><td>height</td><td>15</td><td>0</td><td>0.16667</td><td>0.4514</td><td>highest value 72 is an outlier</td><td>65</td><td>4.4721</td><td>65</td><td>58</td><td>72</td></tr> +<tr><td>weight</td><td>15</td><td>0</td><td>0.22727</td><td>0.76454</td><td>highest value 164 is an outlier</td><td>136.73</td><td>15.4987</td><td>135</td><td>115</td><td>164</td></tr> +<tr><td>height</td><td>15</td><td>0</td><td>0.16667</td><td>0.45140</td><td>highest value 72 is an outlier </td><td> 65.00</td><td> 4.4721</td><td> 65</td><td> 58</td><td> 72</td></tr> </table> <h1>Dixon test for outlier</h1> <h2>Parameters</h2> @@ -20,5 +20,5 @@ DATE<br /> <table border="1"> <tr><td>Variable Name</td><td>Dixon Q-statistic</td><td>p-value</td><td>Alternative Hypothesis</td></tr> <tr><td>weight</td><td>0.12821</td><td>0.86257</td><td>lowest value 115 is an outlier</td></tr> -<tr><td>height</td><td>0.16667</td><td>0.7743</td><td>lowest value 58 is an outlier</td></tr> +<tr><td>height</td><td>0.16667</td><td>0.77430</td><td>lowest value 58 is an outlier </td></tr> </table> diff --git a/tests/analysis_plugins/grubbs_test.rkout b/tests/analysis_plugins/grubbs_test.rkout index 65c998a..a711a78 100644 --- a/tests/analysis_plugins/grubbs_test.rkout +++ b/tests/analysis_plugins/grubbs_test.rkout @@ -7,8 +7,8 @@ DATE<br /> <table border="1"> <tr><td>Variable Name</td><td>Length</td><td>NAs</td><td>G</td><td>U</td><td>p-value</td><td>Alternative Hypothesis</td></tr> -<tr><td>breaks</td><td>54</td><td>0</td><td>3.1709</td><td>0.80671</td><td>0.047523</td><td>highest value 70 is an outlier</td></tr> -<tr><td>test10z</td><td>11</td><td>1</td><td>1.4863</td><td>0.72727</td><td>0.78497</td><td>highest value 40 is an outlier</td></tr> +<tr><td>breaks </td><td>54</td><td>0</td><td>3.1709</td><td>0.80671</td><td>0.047523</td><td>highest value 70 is an outlier</td></tr> +<tr><td>test10z</td><td>11</td><td>1</td><td>1.4863</td><td>0.72727</td><td>0.784971</td><td>highest value 40 is an outlier</td></tr> </table> <h1>Grubbs tests for one or two outliers in data sample</h1> <h2>Parameters</h2> @@ -19,6 +19,6 @@ DATE<br /> DATE<br /> <table border="1"> <tr><td>Variable Name</td><td>Length</td><td>NAs</td><td>G</td><td>U</td><td>p-value</td><td>Alternative Hypothesis</td><td>Mean</td><td>Standard Deviation</td><td>Median</td><td>Minimum</td><td>Maximum</td></tr> -<tr><td>breaks</td><td>54</td><td>0</td><td>4.5459</td><td>0.77345</td><td>1</td><td>10 and 70 are outliers</td><td>28.148</td><td>13.199</td><td>26</td><td>10</td><td>70</td></tr> -<tr><td>test10z</td><td>11</td><td>1</td><td>2.9726</td><td>0.50909</td><td>1</td><td>4 and 40 are outliers</td><td>22</td><td>12.111</td><td>22</td><td>4</td><td>40</td></tr> +<tr><td>breaks </td><td>54</td><td>0</td><td>4.5459</td><td>0.77345</td><td>1</td><td>10 and 70 are outliers</td><td>28.148</td><td>13.199</td><td>26</td><td>10</td><td>70</td></tr> +<tr><td>test10z</td><td>11</td><td>1</td><td>2.9726</td><td>0.50909</td><td>1</td><td>4 and 40 are outliers </td><td>22.000</td><td>12.111</td><td>22</td><td> 4</td><td>40</td></tr> </table> diff --git a/tests/analysis_plugins/moments_moment.rkout b/tests/analysis_plugins/moments_moment.rkout index 4f88833..0243b2f 100644 --- a/tests/analysis_plugins/moments_moment.rkout +++ b/tests/analysis_plugins/moments_moment.rkout @@ -8,10 +8,10 @@ DATE<br /> <table border="1"> <tr><td>Variable Name</td><td>Moment</td></tr> -<tr><td>test50z</td><td>102</td></tr> +<tr><td>test50z</td><td>102.0</td></tr> <tr><td>test50y</td><td>225.5</td></tr> <tr><td>test50x</td><td>125.5</td></tr> -<tr><td>test10z</td><td>22</td></tr> +<tr><td>test10z</td><td> 22.0</td></tr> <tr><td>test10y</td><td>205.5</td></tr> <tr><td>test10x</td><td>105.5</td></tr> </table> diff --git a/tests/analysis_plugins/outlier.rkout b/tests/analysis_plugins/outlier.rkout index b2857db..b1cfd3d 100644 --- a/tests/analysis_plugins/outlier.rkout +++ b/tests/analysis_plugins/outlier.rkout @@ -5,7 +5,7 @@ DATE<br /> <table border="1"> <tr><td>Variable Name</td><td>Length</td><td>NAs</td><td>Outlier</td></tr> -<tr><td>breaks</td><td>54</td><td>0</td><td>70</td></tr> +<tr><td>breaks </td><td>54</td><td>0</td><td> 70</td></tr> <tr><td>test50z</td><td>50</td><td>0</td><td>200</td></tr> </table> <h1>Find potential outlier</h1> @@ -15,6 +15,6 @@ DATE<br /> DATE<br /> <table border="1"> <tr><td>Variable Name</td><td>Outlier</td><td>Mean</td><td>Standard Deviation</td><td>Median</td><td>Minimum</td><td>Maximum</td></tr> -<tr><td>breaks</td><td>10</td><td>28.148</td><td>13.199</td><td>26</td><td>10</td><td>70</td></tr> -<tr><td>test50z</td><td>4</td><td>102</td><td>58.31</td><td>102</td><td>4</td><td>200</td></tr> +<tr><td>breaks </td><td>10</td><td> 28.148</td><td>13.199</td><td> 26</td><td>10</td><td> 70</td></tr> +<tr><td>test50z</td><td> 4</td><td>102.000</td><td>58.310</td><td>102</td><td> 4</td><td>200</td></tr> </table> diff --git a/tests/analysis_plugins/power_analysis.rkout b/tests/analysis_plugins/power_analysis.rkout index 8dd4c62..6e9c2d8 100644 --- a/tests/analysis_plugins/power_analysis.rkout +++ b/tests/analysis_plugins/power_analysis.rkout @@ -6,10 +6,10 @@ DATE<br /> <table border="1"> <tr><td></td><td>Parameters</td></tr> -<tr><td>n</td><td>30</td></tr> -<tr><td>d</td><td>0.3</td></tr> -<tr><td>sig.level</td><td>0.05</td></tr> -<tr><td>power</td><td>0.20785</td></tr> +<tr><td>n </td><td>30.00000</td></tr> +<tr><td>d </td><td> 0.30000</td></tr> +<tr><td>sig.level</td><td> 0.05000</td></tr> +<tr><td>power </td><td> 0.20785</td></tr> </table> <p class='character'><strong>Note:</strong> n is number in *each* group</p> @@ -27,11 +27,11 @@ DATE<br /> DATE<br /> <table border="1"> <tr><td></td><td>Parameters</td></tr> -<tr><td>n1</td><td>27</td></tr> -<tr><td>n2</td><td>33</td></tr> -<tr><td>d</td><td>0.3</td></tr> -<tr><td>sig.level</td><td>0.05</td></tr> -<tr><td>power</td><td>0.20624</td></tr> +<tr><td>n1 </td><td>27.00000</td></tr> +<tr><td>n2 </td><td>33.00000</td></tr> +<tr><td>d </td><td> 0.30000</td></tr> +<tr><td>sig.level</td><td> 0.05000</td></tr> +<tr><td>power </td><td> 0.20624</td></tr> </table> <p class='character'>Interpretation of effect size <strong>d</strong> (according to Cohen):</p> @@ -47,10 +47,10 @@ DATE<br /> DATE<br /> <table border="1"> <tr><td></td><td>Parameters</td></tr> -<tr><td>n</td><td>86.875</td></tr> -<tr><td>r</td><td>0.3</td></tr> -<tr><td>sig.level</td><td>0.05</td></tr> -<tr><td>power</td><td>0.81</td></tr> +<tr><td>n </td><td>86.875</td></tr> +<tr><td>r </td><td> 0.300</td></tr> +<tr><td>sig.level</td><td> 0.050</td></tr> +<tr><td>power </td><td> 0.810</td></tr> </table> <p class='character'>Interpretation of effect size <strong>r</strong> (according to Cohen):</p> @@ -65,11 +65,11 @@ DATE<br /> DATE<br /> <table border="1"> <tr><td></td><td>Parameters</td></tr> -<tr><td>w</td><td>0.3</td></tr> -<tr><td>N</td><td>30</td></tr> -<tr><td>df</td><td>32</td></tr> -<tr><td>sig.level</td><td>0.71662</td></tr> -<tr><td>power</td><td>0.81</td></tr> +<tr><td>w </td><td> 0.30000</td></tr> +<tr><td>N </td><td>30.00000</td></tr> +<tr><td>df </td><td>32.00000</td></tr> +<tr><td>sig.level</td><td> 0.71662</td></tr> +<tr><td>power </td><td> 0.81000</td></tr> </table> <p class='character'><strong>Note:</strong> N is the number of observations</p> @@ -87,10 +87,10 @@ DATE<br /> DATE<br /> <table border="1"> <tr><td></td><td>Parameters</td></tr> -<tr><td>h</td><td>0.3</td></tr> -<tr><td>n</td><td>30</td></tr> -<tr><td>sig.level</td><td>0.38821</td></tr> -<tr><td>power</td><td>0.81</td></tr> +<tr><td>h </td><td> 0.30000</td></tr> +<tr><td>n </td><td>30.00000</td></tr> +<tr><td>sig.level</td><td> 0.38821</td></tr> +<tr><td>power </td><td> 0.81000</td></tr> </table> <p class='character'><strong>Note:</strong> same sample sizes</p> @@ -108,10 +108,10 @@ DATE<br /> DATE<br /> <table border="1"> <tr><td></td><td>Parameters</td></tr> -<tr><td>d</td><td>0.3</td></tr> -<tr><td>n</td><td>30</td></tr> -<tr><td>sig.level</td><td>0.40906</td></tr> -<tr><td>power</td><td>0.8</td></tr> +<tr><td>d </td><td> 0.30000</td></tr> +<tr><td>n </td><td>30.00000</td></tr> +<tr><td>sig.level</td><td> 0.40906</td></tr> +<tr><td>power </td><td> 0.80000</td></tr> </table> <p class='character'>Interpretation of effect size <strong>d</strong> (according to Cohen):</p> @@ -126,11 +126,11 @@ DATE<br /> DATE<br /> <table border="1"> <tr><td></td><td>Parameters</td></tr> -<tr><td>u</td><td>3.4454</td></tr> -<tr><td>v</td><td>30</td></tr> -<tr><td>f2</td><td>0.3</td></tr> -<tr><td>sig.level</td><td>0.1</td></tr> -<tr><td>power</td><td>0.8</td></tr> +<tr><td>u </td><td> 3.4454</td></tr> +<tr><td>v </td><td>30.0000</td></tr> +<tr><td>f2 </td><td> 0.3000</td></tr> +<tr><td>sig.level</td><td> 0.1000</td></tr> +<tr><td>power </td><td> 0.8000</td></tr> </table> <p class='character'>Interpretation of effect size <strong>f<sup>2</sup></strong> (according to Cohen):</p> diff --git a/tests/analysis_plugins/pp_test.rkout b/tests/analysis_plugins/pp_test.rkout index 63cab64..9ad9942 100644 --- a/tests/analysis_plugins/pp_test.rkout +++ b/tests/analysis_plugins/pp_test.rkout @@ -5,8 +5,8 @@ DATE<br /> <table border="1"> <tr><td>Variable Name</td><td>Length</td><td>NAs</td><td>Dickey-Fuller</td><td>Truncation lag parameter</td><td>p-value</td></tr> -<tr><td>shape</td><td>48</td><td>0</td><td>-8.2621</td><td>9</td><td>0.01</td></tr> -<tr><td>perm</td><td>48</td><td>0</td><td>-2.4302</td><td>9</td><td>0.40232</td></tr> -<tr><td>peri</td><td>48</td><td>0</td><td>-3.4823</td><td>9</td><td>0.054578</td></tr> -<tr><td>area</td><td>48</td><td>0</td><td>-4.0273</td><td>9</td><td>0.01627</td></tr> +<tr><td>shape</td><td>48</td><td>0</td><td>-8.2621</td><td>9</td><td>0.010000</td></tr> +<tr><td>perm </td><td>48</td><td>0</td><td>-2.4302</td><td>9</td><td>0.402316</td></tr> +<tr><td>peri </td><td>48</td><td>0</td><td>-3.4823</td><td>9</td><td>0.054578</td></tr> +<tr><td>area </td><td>48</td><td>0</td><td>-4.0273</td><td>9</td><td>0.016270</td></tr> </table> diff --git a/tests/analysis_plugins/skewness_kurtosis.rkout b/tests/analysis_plugins/skewness_kurtosis.rkout index 2007251..e7559ce 100644 --- a/tests/analysis_plugins/skewness_kurtosis.rkout +++ b/tests/analysis_plugins/skewness_kurtosis.rkout @@ -3,6 +3,6 @@ DATE<br /> <table border="1"> <tr><td>Variable Name</td><td>Skewness</td><td>Kurtosis</td><td>Excess Kurtosis</td><td>Geary Kurtosis</td><td>Length</td><td>NAs</td></tr> <tr><td>weight</td><td>0.25247</td><td>1.9002</td><td>-1.0998</td><td>0.86258</td><td>15</td><td>0</td></tr> -<tr><td>height</td><td>0</td><td>1.7893</td><td>-1.2107</td><td>0.8641</td><td>15</td><td>0</td></tr> -<tr><td>breaks</td><td>1.272</td><td>4.499</td><td>1.499</td><td>0.75029</td><td>54</td><td>0</td></tr> +<tr><td>height</td><td>0.00000</td><td>1.7893</td><td>-1.2107</td><td>0.86410</td><td>15</td><td>0</td></tr> +<tr><td>breaks</td><td>1.27196</td><td>4.4990</td><td> 1.4990</td><td>0.75029</td><td>54</td><td>0</td></tr> </table> diff --git a/tests/plots/barplot.rkcommands.R b/tests/plots/barplot.rkcommands.R index 980e64f..e037b1d 100644 --- a/tests/plots/barplot.rkcommands.R +++ b/tests/plots/barplot.rkcommands.R @@ -1,7 +1,7 @@ local({ ## Print result x <- swiss[["Catholic"]] -# barplot is a bit picky about attributes, so we need to convert to vector explicitely +# barplot is a bit picky about attributes, so we need to convert to vector explicitly if(!is.matrix(x)) x <- as.vector(x) if(!is.matrix(x) && is.data.frame(x)) x <- data.matrix(x) names(x) <- rownames (swiss) @@ -21,7 +21,7 @@ rk.graph.off () local({ ## Print result x <- test_table -# barplot is a bit picky about attributes, so we need to convert to vector explicitely +# barplot is a bit picky about attributes, so we need to convert to vector explicitly if(!is.matrix(x)) x <- as.vector(x) if(!is.matrix(x) && is.data.frame(x)) x <- data.matrix(x) rk.header ("Barplot", parameters=list ("Variable"=rk.get.description (test_table), "colors"="default", "Type"="stacked", "Legend"="TRUE")) diff --git a/tests/plots/pareto_chart.rkout b/tests/plots/pareto_chart.rkout index 426bc56..a19710c 100644 --- a/tests/plots/pareto_chart.rkout +++ b/tests/plots/pareto_chart.rkout @@ -6,16 +6,16 @@ DATE<br /> <img src="graph.png" width="480" height="480"><br><table border="1"> <tr><td></td><td>Frequency</td><td>Cum.Freq.</td><td>Percentage</td><td>Cum.Percent.</td></tr> -<tr><td>A</td><td>53</td><td>53</td><td>21.116</td><td>21.116</td></tr> -<tr><td>B</td><td>32</td><td>85</td><td>12.749</td><td>33.865</td></tr> -<tr><td>C</td><td>29</td><td>114</td><td>11.554</td><td>45.418</td></tr> -<tr><td>D</td><td>29</td><td>143</td><td>11.554</td><td>56.972</td></tr> -<tr><td>E</td><td>28</td><td>171</td><td>11.155</td><td>68.127</td></tr> -<tr><td>F</td><td>20</td><td>191</td><td>7.9681</td><td>76.096</td></tr> -<tr><td>G</td><td>19</td><td>210</td><td>7.5697</td><td>83.665</td></tr> -<tr><td>H</td><td>15</td><td>225</td><td>5.9761</td><td>89.641</td></tr> -<tr><td>I</td><td>13</td><td>238</td><td>5.1793</td><td>94.821</td></tr> -<tr><td>J</td><td>13</td><td>251</td><td>5.1793</td><td>100</td></tr> +<tr><td>A</td><td>53</td><td> 53</td><td>21.1155</td><td> 21.116</td></tr> +<tr><td>B</td><td>32</td><td> 85</td><td>12.7490</td><td> 33.865</td></tr> +<tr><td>C</td><td>29</td><td>114</td><td>11.5538</td><td> 45.418</td></tr> +<tr><td>D</td><td>29</td><td>143</td><td>11.5538</td><td> 56.972</td></tr> +<tr><td>E</td><td>28</td><td>171</td><td>11.1554</td><td> 68.127</td></tr> +<tr><td>F</td><td>20</td><td>191</td><td> 7.9681</td><td> 76.096</td></tr> +<tr><td>G</td><td>19</td><td>210</td><td> 7.5697</td><td> 83.665</td></tr> +<tr><td>H</td><td>15</td><td>225</td><td> 5.9761</td><td> 89.641</td></tr> +<tr><td>I</td><td>13</td><td>238</td><td> 5.1793</td><td> 94.821</td></tr> +<tr><td>J</td><td>13</td><td>251</td><td> 5.1793</td><td>100.000</td></tr> </table> <h1>Pareto chart</h1> @@ -26,11 +26,11 @@ DATE<br /> DATE<br /> <img src="graph.png" width="480" height="480"><br><table border="1"> <tr><td></td><td>Frequency</td><td>Cum.Freq.</td><td>Percentage</td><td>Cum.Percent.</td></tr> -<tr><td>A.L</td><td>401</td><td>401</td><td>26.382</td><td>26.382</td></tr> -<tr><td>B.M</td><td>259</td><td>660</td><td>17.039</td><td>43.421</td></tr> -<tr><td>B.L</td><td>254</td><td>914</td><td>16.711</td><td>60.132</td></tr> -<tr><td>A.H</td><td>221</td><td>1135</td><td>14.539</td><td>74.671</td></tr> -<tr><td>A.M</td><td>216</td><td>1351</td><td>14.211</td><td>88.882</td></tr> -<tr><td>B.H</td><td>169</td><td>1520</td><td>11.118</td><td>100</td></tr> +<tr><td>A.L</td><td>401</td><td> 401</td><td>26.382</td><td> 26.382</td></tr> +<tr><td>B.M</td><td>259</td><td> 660</td><td>17.039</td><td> 43.421</td></tr> +<tr><td>B.L</td><td>254</td><td> 914</td><td>16.711</td><td> 60.132</td></tr> +<tr><td>A.H</td><td>221</td><td>1135</td><td>14.539</td><td> 74.671</td></tr> +<tr><td>A.M</td><td>216</td><td>1351</td><td>14.211</td><td> 88.882</td></tr> +<tr><td>B.H</td><td>169</td><td>1520</td><td>11.118</td><td>100.000</td></tr> </table> |
From: Thomas F. <tho...@ru...> - 2015-01-31 13:11:51
|
Git commit f5d6394a82bb0eddc3c191a49674ab708c0d4330 by Thomas Friedrichsmeier. Committed on 31/01/2015 at 13:01. Pushed by tfry into branch 'master'. Fix quote M +1 -1 rkward/plugins/plots/cor_graph.js http://commits.kde.org/rkward/f5d6394a82bb0eddc3c191a49674ab708c0d4330 diff --git a/rkward/plugins/plots/cor_graph.js b/rkward/plugins/plots/cor_graph.js index 47abc3a..894fe4a 100644 --- a/rkward/plugins/plots/cor_graph.js +++ b/rkward/plugins/plots/cor_graph.js @@ -48,7 +48,7 @@ function doPrintout (full) { if (full) { echo ('rk.graph.off ()\n'); echo ('\n'); - echo ('rk.print(' + i18n ("Legend:") + '\\t\'***\': p < 0.001 -- \'**\': p < 0.01 -- \'*\': p < 0.05 -- \'.\'\': p < 0.1")\n'); + echo ('rk.print('+ quote (i18n (noquote ("Legend:")) + '\\t\'***\': p < 0.001 -- \'**\': p < 0.01 -- \'*\': p < 0.05 -- \'.\'\': p < 0.1') + ')\n'); } } |
From: Thomas F. <tho...@ru...> - 2015-01-31 12:04:05
|
Git commit 5b57b59157192d7cd1a5f3bc413ab7c7ac20e5c4 by Thomas Friedrichsmeier. Committed on 31/01/2015 at 11:58. Pushed by tfry into branch 'master'. Slight restructuring of RKStandardComponent::parseLogic(). Pass through the list of all elements once, instead of compiling separate lists per tag name. M +82 -103 rkward/plugin/rkstandardcomponent.cpp http://commits.kde.org/rkward/5b57b59157192d7cd1a5f3bc413ab7c7ac20e5c4 diff --git a/rkward/plugin/rkstandardcomponent.cpp b/rkward/plugin/rkstandardcomponent.cpp index 41120ad..0f384f5 100644 --- a/rkward/plugin/rkstandardcomponent.cpp +++ b/rkward/plugin/rkstandardcomponent.cpp @@ -702,117 +702,96 @@ void RKComponentBuilder::parseLogic (const QDomElement &element, XMLHelper &xml, if (element.isNull ()) return; - // find connect elements - XMLChildList children = xml.getChildElements (element, "connect", DL_INFO); - - XMLChildList::const_iterator it; - for (it = children.constBegin (); it != children.constEnd (); ++it) { - addConnection (xml.getStringAttribute (*it, "client", "#noid#", DL_WARNING), QString::null, xml.getStringAttribute (*it, "governor", "#noid#", DL_WARNING), QString::null, xml.getBoolAttribute (*it, "reconcile", false, DL_INFO), element); - } - - children = xml.getChildElements (element, "dependency_check", DL_INFO); - for (it = children.constBegin (); it != children.constEnd (); ++it) { - RKComponentPropertyBool *dep = new RKComponentPropertyBool (component (), false); - dep->setInternal (true); - dep->setBoolValue (RKComponentDependency::isRKWardVersionCompatible (*it) && RKComponentDependency::isRVersionCompatible (*it)); - component ()->addChild (xml.getStringAttribute (*it, "id", "#noid#", DL_WARNING), dep); - } - - // find outside elements - children = xml.getChildElements (element, "external", DL_INFO); - for (it = children.constBegin (); it != children.constEnd (); ++it) { - QString id = xml.getStringAttribute (*it, "id", "#noid#", DL_WARNING); - RKComponentPropertyBase *prop = new RKComponentPropertyBase (component (), xml.getBoolAttribute (*it, "required", false, DL_INFO)); - component ()->addChild (id, prop); - prop->setInternal (true); - component ()->connect (prop, SIGNAL (valueChanged(RKComponentPropertyBase*)), component (), SLOT (outsideValueChanged(RKComponentPropertyBase*))); - - QString dummy = xml.getStringAttribute (*it, "default", QString::null, DL_INFO); - if (!dummy.isNull ()) { - initial_values.insert (id, dummy); - } - } - - // find initialize elements - children = xml.getChildElements (element, "set", DL_INFO); - for (it = children.constBegin (); it != children.constEnd (); ++it) { - // NOTE: It is by design that if there are several initializations for a single id, the latest one takes precedence. Useful in some cases of inclusion. - initial_values.insert (xml.getStringAttribute (*it, "id", "#noid#", DL_WARNING), xml.getStringAttribute (*it, "to", "false", DL_WARNING)); - } - - // i18n'ed strings - children = xml.getChildElements (element, "i18n", DL_INFO); - for (it = children.constBegin (); it != children.constEnd (); ++it) { - QString id = xml.getStringAttribute (*it, "id", "#noid#", DL_WARNING); - RKComponentPropertyBase *prop = new RKComponentPropertyBase (component (), false); - component ()->addChild (id, prop); - prop->setInternal (true); - initial_values.insert (id, xml.i18nStringAttribute (*it, "label", QString (), DL_WARNING)); - } - - // find convert elements QMap<RKComponentPropertyBase*, QStringList> switch_convert_sources; - children = xml.getChildElements (element, "convert", DL_INFO); - for (it = children.constBegin (); it != children.constEnd (); ++it) { - RKComponentPropertyConvert *convert = new RKComponentPropertyConvert (component ()); - convert->setInternal (true); - QString id = xml.getStringAttribute (*it, "id", "#noid#", DL_WARNING); - int mode = xml.getMultiChoiceAttribute (*it, "mode", convert->convertModeOptionString (), 0, DL_WARNING); - convert->setMode ((RKComponentPropertyConvert::ConvertMode) mode); - if ((mode == RKComponentPropertyConvert::Equals) || (mode == RKComponentPropertyConvert::NotEquals)) { - convert->setStandard (xml.getStringAttribute (*it, "standard", QString::null, DL_WARNING)); - } else if (mode == RKComponentPropertyConvert::Range) { - convert->setRange (xml.getDoubleAttribute (*it, "min", -FLT_MAX, DL_INFO), xml.getDoubleAttribute (*it, "max", FLT_MAX, DL_INFO)); - } - switch_convert_sources.insert (convert, xml.getStringAttribute (*it, "sources", QString::null, DL_WARNING).split (';')); - convert->setRequireTrue (xml.getBoolAttribute (*it, "require_true", false, DL_INFO)); - component ()->addChild (id, convert); - } - - // find switch elements - children = xml.getChildElements (element, "switch", DL_INFO); - for (it = children.constBegin (); it != children.constEnd (); ++it) { - QDomElement t = xml.getChildElement (*it, "true", DL_INFO); - QDomElement f = xml.getChildElement (*it, "false", DL_INFO); - if (t.isNull () != f.isNull ()) { - xml.displayError (&(*it), "One of <true> / <false> was provided for boolean <switch>, but not the other. Skipping switch.", DL_ERROR); - continue; - } - - XMLChildList case_elems = xml.getChildElements (*it, "case", DL_INFO); - QDomElement default_elem = xml.getChildElement (*it, "default", DL_INFO); - if (!default_elem.isNull ()) case_elems.append (default_elem); - if (t.isNull ()) { - if (case_elems.isEmpty ()) { - xml.displayError (&(*it), "Neither <true> / <false> nor <case> / <default> were provided. Skipping switch.", DL_ERROR); + const XMLChildList children = xml.getChildElements (element, QString::null, DL_ERROR); + for (int i = 0; i < children.size (); ++i) { + const QDomElement &cel = children[i]; + const QString tagName = cel.tagName (); + if (tagName == QLatin1String ("connect")) { + addConnection (xml.getStringAttribute (cel, "client", "#noid#", DL_WARNING), QString (), xml.getStringAttribute (cel, "governor", "#noid#", DL_WARNING), QString (), xml.getBoolAttribute (cel, "reconcile", false, DL_INFO), element); + } else if (tagName == QLatin1String ("dependency_check")) { + RKComponentPropertyBool *dep = new RKComponentPropertyBool (component (), false); + dep->setInternal (true); + dep->setBoolValue (RKComponentDependency::isRKWardVersionCompatible (cel) && RKComponentDependency::isRVersionCompatible (cel)); + component ()->addChild (xml.getStringAttribute (cel, "id", "#noid#", DL_WARNING), dep); + } else if (tagName == QLatin1String ("external")) { + QString id = xml.getStringAttribute (cel, "id", "#noid#", DL_WARNING); + RKComponentPropertyBase *prop = new RKComponentPropertyBase (component (), xml.getBoolAttribute (cel, "required", false, DL_INFO)); + component ()->addChild (id, prop); + prop->setInternal (true); + component ()->connect (prop, SIGNAL (valueChanged(RKComponentPropertyBase*)), component (), SLOT (outsideValueChanged(RKComponentPropertyBase*))); + + QString dummy = xml.getStringAttribute (cel, "default", QString (), DL_INFO); + if (!dummy.isNull ()) { + initial_values.insert (id, dummy); + } + } else if (tagName == QLatin1String ("set")) { + // NOTE: It is by design that if there are several initializations for a single id, the latest one takes precedence. Useful in some cases of inclusion. + initial_values.insert (xml.getStringAttribute (cel, "id", "#noid#", DL_WARNING), xml.getStringAttribute (cel, "to", "false", DL_WARNING)); + } else if (tagName == QLatin1String ("i18n")) { + QString id = xml.getStringAttribute (cel, "id", "#noid#", DL_WARNING); + RKComponentPropertyBase *prop = new RKComponentPropertyBase (component (), false); + component ()->addChild (id, prop); + prop->setInternal (true); + initial_values.insert (id, xml.i18nStringAttribute (cel, "label", QString (), DL_WARNING)); + } else if (tagName == QLatin1String ("convert")) { + RKComponentPropertyConvert *convert = new RKComponentPropertyConvert (component ()); + convert->setInternal (true); + QString id = xml.getStringAttribute (cel, "id", "#noid#", DL_WARNING); + int mode = xml.getMultiChoiceAttribute (cel, "mode", convert->convertModeOptionString (), 0, DL_WARNING); + convert->setMode ((RKComponentPropertyConvert::ConvertMode) mode); + if ((mode == RKComponentPropertyConvert::Equals) || (mode == RKComponentPropertyConvert::NotEquals)) { + convert->setStandard (xml.getStringAttribute (cel, "standard", QString (), DL_WARNING)); + } else if (mode == RKComponentPropertyConvert::Range) { + convert->setRange (xml.getDoubleAttribute (cel, "min", -FLT_MAX, DL_INFO), xml.getDoubleAttribute (cel, "max", FLT_MAX, DL_INFO)); + } + switch_convert_sources.insert (convert, xml.getStringAttribute (cel, "sources", QString (), DL_WARNING).split (';')); + convert->setRequireTrue (xml.getBoolAttribute (cel, "require_true", false, DL_INFO)); + component ()->addChild (id, convert); + } else if (tagName == QLatin1String ("switch")) { + QDomElement t = xml.getChildElement (cel, "true", DL_INFO); + QDomElement f = xml.getChildElement (cel, "false", DL_INFO); + if (t.isNull () != f.isNull ()) { + xml.displayError (&(cel), "One of <true> / <false> was provided for boolean <switch>, but not the other. Skipping switch.", DL_ERROR); continue; } - } else { - if (!case_elems.isEmpty ()) { - xml.displayError (&(*it), "One <true> / <false> *or* <case> / <default> may be provided a <switch>. Proceeding with boolean switch.", DL_ERROR); - case_elems.clear (); + + XMLChildList case_elems = xml.getChildElements (cel, "case", DL_INFO); + QDomElement default_elem = xml.getChildElement (cel, "default", DL_INFO); + if (!default_elem.isNull ()) case_elems.append (default_elem); + + if (t.isNull ()) { + if (case_elems.isEmpty ()) { + xml.displayError (&cel, "Neither <true> / <false> nor <case> / <default> were provided. Skipping switch.", DL_ERROR); + continue; + } + } else { + if (!case_elems.isEmpty ()) { + xml.displayError (&cel, "One <true> / <false> *or* <case> / <default> may be provided a <switch>. Proceeding with boolean switch.", DL_ERROR); + case_elems.clear (); + } + case_elems.append (f); + case_elems.append (t); } - case_elems.append (f); - case_elems.append (t); - } - QStringList def_strings; - QStringList standards; - QStringList sources; - sources.append (xml.getStringAttribute (*it, "condition", QString (), DL_ERROR)); // store condition prop as first "source" + QStringList def_strings; + QStringList standards; + QStringList sources; + sources.append (xml.getStringAttribute (cel, "condition", QString (), DL_ERROR)); // store condition prop as first "source" - for (XMLChildList::const_iterator cit = case_elems.constBegin (); cit != case_elems.constEnd (); ++cit) { - def_strings.append (xml.getStringAttribute (*cit, "fixed_value", QString (), DL_INFO)); - sources.append (xml.getStringAttribute (*cit, "dynamic_value", QString (), DL_INFO)); - if ((*cit).tagName () == "case") standards.append (xml.getStringAttribute (*cit, "standard", QString (), DL_WARNING)); - } + for (XMLChildList::const_iterator cit = case_elems.constBegin (); cit != case_elems.constEnd (); ++cit) { + def_strings.append (xml.getStringAttribute (*cit, "fixed_value", QString (), DL_INFO)); + sources.append (xml.getStringAttribute (*cit, "dynamic_value", QString (), DL_INFO)); + if ((*cit).tagName () == "case") standards.append (xml.getStringAttribute (*cit, "standard", QString (), DL_WARNING)); + } - QString id = xml.getStringAttribute (*it, "id", "#noid#", DL_WARNING); - RKComponentPropertySwitch *switchel = new RKComponentPropertySwitch (component (), def_strings, standards); - switchel->setInternal (true); - switch_convert_sources.insert (switchel, sources); - component ()->addChild (id, switchel); + QString id = xml.getStringAttribute (cel, "id", "#noid#", DL_WARNING); + RKComponentPropertySwitch *switchel = new RKComponentPropertySwitch (component (), def_strings, standards); + switchel->setInternal (true); + switch_convert_sources.insert (switchel, sources); + component ()->addChild (id, switchel); + } } // resolve source properties for switch and convert elements, *after* all properties have been created |
From: Thomas F. <tho...@ru...> - 2015-01-31 12:04:04
|
Git commit 7a428e45a0f8979fcc46de7dd51549ba46c26896 by Thomas Friedrichsmeier. Committed on 31/01/2015 at 09:51. Pushed by tfry into branch 'master'. Use <i18n> and <label> to achieve full translatability of CLT plugins, M +0 -1 rkward/plugins/distributions/clt/plot_beta_clt.rkh M +1 -3 rkward/plugins/distributions/clt/plot_beta_clt.xml M +1 -3 rkward/plugins/distributions/clt/plot_binomial_clt.xml M +1 -3 rkward/plugins/distributions/clt/plot_chi_squared_clt.xml M +2 -2 rkward/plugins/distributions/clt/plot_clt_help_snippets.xml M +3 -1 rkward/plugins/distributions/clt/plot_clt_snippets.xml M +1 -3 rkward/plugins/distributions/clt/plot_exponential_clt.xml M +1 -3 rkward/plugins/distributions/clt/plot_f_clt.xml M +1 -3 rkward/plugins/distributions/clt/plot_gamma_clt.xml M +1 -3 rkward/plugins/distributions/clt/plot_geometric_clt.xml M +1 -3 rkward/plugins/distributions/clt/plot_hypergeometric_clt.xml M +1 -3 rkward/plugins/distributions/clt/plot_logistic_clt.xml M +1 -3 rkward/plugins/distributions/clt/plot_lognormal_clt.xml M +1 -3 rkward/plugins/distributions/clt/plot_negbinomial_clt.xml M +1 -3 rkward/plugins/distributions/clt/plot_normal_clt.xml M +1 -3 rkward/plugins/distributions/clt/plot_poisson_clt.xml M +1 -3 rkward/plugins/distributions/clt/plot_t_clt.xml M +1 -3 rkward/plugins/distributions/clt/plot_uniform_clt.xml M +1 -3 rkward/plugins/distributions/clt/plot_weibull_clt.xml M +1 -3 rkward/plugins/distributions/clt/plot_wilcoxon_clt.xml http://commits.kde.org/rkward/7a428e45a0f8979fcc46de7dd51549ba46c26896 diff --git a/rkward/plugins/distributions/clt/plot_beta_clt.rkh b/rkward/plugins/distributions/clt/plot_beta_clt.rkh index d74707d..95ffa3b 100644 --- a/rkward/plugins/distributions/clt/plot_beta_clt.rkh +++ b/rkward/plugins/distributions/clt/plot_beta_clt.rkh @@ -1,7 +1,6 @@ <!DOCTYPE rkhelp> <document> <snippets> - <snippet id="dist_name"><span>Beta</span></snippet> <snippet id="dist_related"> <li><link href="rkward://component/plot_beta_distribution"/></li> <li><link href="rkward://rhelp/Beta"/></li> diff --git a/rkward/plugins/distributions/clt/plot_beta_clt.xml b/rkward/plugins/distributions/clt/plot_beta_clt.xml index 5f8f41e..4e5d6d3 100644 --- a/rkward/plugins/distributions/clt/plot_beta_clt.xml +++ b/rkward/plugins/distributions/clt/plot_beta_clt.xml @@ -14,9 +14,7 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_dopoints" to="false" /> - <script><![CDATA[ - gui.setValue ("plotoptions.default_main", i18n ("Beta")); - ]]></script> + <i18n id="dist_name" label="Beta" i18n_context="Distribution name"/> </logic> <dialog label="Central Limit Theorem: Beta to Normal" > <insert snippet="clt_layout"/> diff --git a/rkward/plugins/distributions/clt/plot_binomial_clt.xml b/rkward/plugins/distributions/clt/plot_binomial_clt.xml index 9ebff82..96dfd66 100644 --- a/rkward/plugins/distributions/clt/plot_binomial_clt.xml +++ b/rkward/plugins/distributions/clt/plot_binomial_clt.xml @@ -14,9 +14,7 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_verticals" to="false" /> - <script><![CDATA[ - gui.setValue ("plotoptions.default_main", i18n ("Binomial")); - ]]></script> + <i18n id="dist_name" label="Binomial" i18n_context="Distribution name"/> </logic> <dialog label="Central Limit Theorem: Binomial to Normal" > <insert snippet="clt_layout"/> diff --git a/rkward/plugins/distributions/clt/plot_chi_squared_clt.xml b/rkward/plugins/distributions/clt/plot_chi_squared_clt.xml index e76f909..ceff2df 100644 --- a/rkward/plugins/distributions/clt/plot_chi_squared_clt.xml +++ b/rkward/plugins/distributions/clt/plot_chi_squared_clt.xml @@ -14,9 +14,7 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_dopoints" to="false" /> - <script><![CDATA[ - gui.setValue ("plotoptions.default_main", i18n ("Chi-Squared")); - ]]></script> + <i18n id="dist_name" label="Chi-Squared" i18n_context="Distribution name"/> </logic> <dialog label="Central Limit Theorem: Chi squared to Normal" > <insert snippet="clt_layout"/> diff --git a/rkward/plugins/distributions/clt/plot_clt_help_snippets.xml b/rkward/plugins/distributions/clt/plot_clt_help_snippets.xml index 7e4d2c2..3b0232c 100644 --- a/rkward/plugins/distributions/clt/plot_clt_help_snippets.xml +++ b/rkward/plugins/distributions/clt/plot_clt_help_snippets.xml @@ -2,10 +2,10 @@ <document> <snippet id="clt_help_template"> <summary> - Normal approximation to <insert snippet="dist_name"/> Sample averages. Most of this help file is generic description of CLT plugins. Sample averages from a contending distribution (Binomial here) are compared to a target Normal distribution. The comparison is made based on either histograms or distribution functions. For brevity, D will denote the contending distribution (<insert snippet="dist_name"/> here). + Normal approximation to <label id="dist_name"/> Sample averages. Most of this help file is generic description of CLT plugins. Sample averages from a contending distribution (<label id="dist_name"/> here) are compared to a target Normal distribution. The comparison is made based on either histograms or distribution functions. For brevity, D will denote the contending distribution (<label id="dist_name"/> here). </summary> <usage> - Choose the <insert snippet="dist_name"/> parameters, the sample sizes needed for CLT and a choice of function. The function specific options are provided in different tabs. + Choose the <label id="dist_name"/> parameters, the sample sizes needed for CLT and a choice of function. The function specific options are provided in different tabs. </usage> <settings> <caption id="tab_plot_distrib_clt"/> diff --git a/rkward/plugins/distributions/clt/plot_clt_snippets.xml b/rkward/plugins/distributions/clt/plot_clt_snippets.xml index 1b4305f..79bfb83 100644 --- a/rkward/plugins/distributions/clt/plot_clt_snippets.xml +++ b/rkward/plugins/distributions/clt/plot_clt_snippets.xml @@ -6,7 +6,9 @@ <set id="plotoptions.allow_type" to="false"/> <set id="plotoptions.allow_grid" to="true"/> <set id="plotoptions.allow_ylim" to="false"/> - <set id="plotoptions.default_xlab" to=""Sample Averages""/> + <i18n id="sample_avgs_label" label="Sample Averages"/> + <connect client="plotoptions.default_xlab" governor="sample_avgs_label.quoted"/> + <connect client="plotoptions.default_main" governor="dist_name.quoted"/> <set id="normlinecol.default_color" to="red" /> diff --git a/rkward/plugins/distributions/clt/plot_exponential_clt.xml b/rkward/plugins/distributions/clt/plot_exponential_clt.xml index e632a6f..fb216b5 100644 --- a/rkward/plugins/distributions/clt/plot_exponential_clt.xml +++ b/rkward/plugins/distributions/clt/plot_exponential_clt.xml @@ -13,9 +13,7 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_dopoints" to="false" /> - <script><![CDATA[ - gui.setValue ("plotoptions.default_main", i18n ("Exponential")); - ]]></script> + <i18n id="dist_name" label="Exponential" i18n_context="Distribution name"/> </logic> <dialog label="Central Limit Theorem: Exponential to Normal" > <insert snippet="clt_layout"/> diff --git a/rkward/plugins/distributions/clt/plot_f_clt.xml b/rkward/plugins/distributions/clt/plot_f_clt.xml index 0439392..1a20149 100644 --- a/rkward/plugins/distributions/clt/plot_f_clt.xml +++ b/rkward/plugins/distributions/clt/plot_f_clt.xml @@ -15,9 +15,7 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_dopoints" to="false" /> - <script><![CDATA[ - gui.setValue ("plotoptions.default_main", i18n ("F")); - ]]></script> + <i18n id="dist_name" label="F" i18n_context="Distribution name"/> </logic> <dialog label="Central Limit Theorem: F to Normal" > <insert snippet="clt_layout"/> diff --git a/rkward/plugins/distributions/clt/plot_gamma_clt.xml b/rkward/plugins/distributions/clt/plot_gamma_clt.xml index 959a5a1..0d7b91c 100644 --- a/rkward/plugins/distributions/clt/plot_gamma_clt.xml +++ b/rkward/plugins/distributions/clt/plot_gamma_clt.xml @@ -14,9 +14,7 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_dopoints" to="false" /> - <script><![CDATA[ - gui.setValue ("plotoptions.default_main", i18n ("Gamma")); - ]]></script> + <i18n id="dist_name" label="Gamma" i18n_context="Distribution name"/> </logic> <dialog label="Central Limit Theorem: Gamma to Normal" > <insert snippet="clt_layout"/> diff --git a/rkward/plugins/distributions/clt/plot_geometric_clt.xml b/rkward/plugins/distributions/clt/plot_geometric_clt.xml index 28320ad..ab54c96 100644 --- a/rkward/plugins/distributions/clt/plot_geometric_clt.xml +++ b/rkward/plugins/distributions/clt/plot_geometric_clt.xml @@ -13,9 +13,7 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_verticals" to="false" /> - <script><![CDATA[ - gui.setValue ("plotoptions.default_main", i18n ("Geometric")); - ]]></script> + <i18n id="dist_name" label="Geometric" i18n_context="Distribution name"/> </logic> <dialog label="Central Limit Theorem: Geometric to Normal" > <insert snippet="clt_layout"/> diff --git a/rkward/plugins/distributions/clt/plot_hypergeometric_clt.xml b/rkward/plugins/distributions/clt/plot_hypergeometric_clt.xml index 87fc1e2..b88ec40 100644 --- a/rkward/plugins/distributions/clt/plot_hypergeometric_clt.xml +++ b/rkward/plugins/distributions/clt/plot_hypergeometric_clt.xml @@ -15,9 +15,7 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_verticals" to="false" /> - <script><![CDATA[ - gui.setValue ("plotoptions.default_main", i18n ("Hypergeometric")); - ]]></script> + <i18n id="dist_name" label="Hypergeometric" i18n_context="Distribution name"/> </logic> <dialog label="Central Limit Theorem: Hypergeometric to Normal" > <insert snippet="clt_layout"/> diff --git a/rkward/plugins/distributions/clt/plot_logistic_clt.xml b/rkward/plugins/distributions/clt/plot_logistic_clt.xml index c1fd95e..a8fa73a 100644 --- a/rkward/plugins/distributions/clt/plot_logistic_clt.xml +++ b/rkward/plugins/distributions/clt/plot_logistic_clt.xml @@ -14,9 +14,7 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_dopoints" to="false" /> - <script><![CDATA[ - gui.setValue ("plotoptions.default_main", i18n ("Logistic")); - ]]></script> + <i18n id="dist_name" label="Logistic" i18n_context="Distribution name"/> </logic> <dialog label="Central Limit Theorem: Logistic to Normal" > <insert snippet="clt_layout"/> diff --git a/rkward/plugins/distributions/clt/plot_lognormal_clt.xml b/rkward/plugins/distributions/clt/plot_lognormal_clt.xml index d1e90df..1d20b86 100644 --- a/rkward/plugins/distributions/clt/plot_lognormal_clt.xml +++ b/rkward/plugins/distributions/clt/plot_lognormal_clt.xml @@ -14,9 +14,7 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_dopoints" to="false" /> - <script><![CDATA[ - gui.setValue ("plotoptions.default_main", i18n ("Lognormal")); - ]]></script> + <i18n id="dist_name" label="Lognormal" i18n_context="Distribution name"/> </logic> <dialog label="Central Limit Theorem: Lognormal to Normal" > <insert snippet="clt_layout"/> diff --git a/rkward/plugins/distributions/clt/plot_negbinomial_clt.xml b/rkward/plugins/distributions/clt/plot_negbinomial_clt.xml index f395fdb..ae87e6d 100644 --- a/rkward/plugins/distributions/clt/plot_negbinomial_clt.xml +++ b/rkward/plugins/distributions/clt/plot_negbinomial_clt.xml @@ -26,9 +26,7 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_verticals" to="false" /> - <script><![CDATA[ - gui.setValue ("plotoptions.default_main", i18n ("Negative Binomial")); - ]]></script> + <i18n id="dist_name" label="Negative Binomial" i18n_context="Distribution name"/> <convert id="useprob" mode="equals" sources="param.string" standard="pprob" /> <connect client="prob.enabled" governor="useprob" /> diff --git a/rkward/plugins/distributions/clt/plot_normal_clt.xml b/rkward/plugins/distributions/clt/plot_normal_clt.xml index 3c25a2c..06f00cc 100644 --- a/rkward/plugins/distributions/clt/plot_normal_clt.xml +++ b/rkward/plugins/distributions/clt/plot_normal_clt.xml @@ -14,9 +14,7 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_dopoints" to="false" /> - <script><![CDATA[ - gui.setValue ("plotoptions.default_main", i18n ("Normal")); - ]]></script> + <i18n id="dist_name" label="Normal" i18n_context="Distribution name"/> </logic> <dialog label="Central Limit Theorem: Normal to Normal" > <insert snippet="clt_layout"/> diff --git a/rkward/plugins/distributions/clt/plot_poisson_clt.xml b/rkward/plugins/distributions/clt/plot_poisson_clt.xml index 9b56c6a..0c6f53a 100644 --- a/rkward/plugins/distributions/clt/plot_poisson_clt.xml +++ b/rkward/plugins/distributions/clt/plot_poisson_clt.xml @@ -13,9 +13,7 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_verticals" to="false" /> - <script><![CDATA[ - gui.setValue ("plotoptions.default_main", i18n ("Poisson")); - ]]></script> + <i18n id="dist_name" label="Poisson" i18n_context="Distribution name"/> </logic> <dialog label="Central Limit Theorem: Poisson to Normal" > <insert snippet="clt_layout"/> diff --git a/rkward/plugins/distributions/clt/plot_t_clt.xml b/rkward/plugins/distributions/clt/plot_t_clt.xml index f2224be..6f450cb 100644 --- a/rkward/plugins/distributions/clt/plot_t_clt.xml +++ b/rkward/plugins/distributions/clt/plot_t_clt.xml @@ -14,9 +14,7 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_dopoints" to="false" /> - <script><![CDATA[ - gui.setValue ("plotoptions.default_main", i18n ("t")); - ]]></script> + <i18n id="dist_name" label="t" i18n_context="Distribution name"/> </logic> <dialog label="Central Limit Theorem: t to Normal" > <insert snippet="clt_layout"/> diff --git a/rkward/plugins/distributions/clt/plot_uniform_clt.xml b/rkward/plugins/distributions/clt/plot_uniform_clt.xml index fc4f98f..019c131 100644 --- a/rkward/plugins/distributions/clt/plot_uniform_clt.xml +++ b/rkward/plugins/distributions/clt/plot_uniform_clt.xml @@ -14,9 +14,7 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_dopoints" to="false" /> - <script><![CDATA[ - gui.setValue ("plotoptions.default_main", i18n ("Uniform")); - ]]></script> + <i18n id="dist_name" label="Uniform" i18n_context="Distribution name"/> </logic> <dialog label="Central Limit Theorem: Uniform to Normal" > <insert snippet="clt_layout"/> diff --git a/rkward/plugins/distributions/clt/plot_weibull_clt.xml b/rkward/plugins/distributions/clt/plot_weibull_clt.xml index 1c9ab77..6350a1a 100644 --- a/rkward/plugins/distributions/clt/plot_weibull_clt.xml +++ b/rkward/plugins/distributions/clt/plot_weibull_clt.xml @@ -14,9 +14,7 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_dopoints" to="false" /> - <script><![CDATA[ - gui.setValue ("plotoptions.default_main", i18n ("Weibull")); - ]]></script> + <i18n id="dist_name" label="Weibull" i18n_context="Distribution name"/> </logic> <dialog label="Central Limit Theorem: Weibull to Normal" > <insert snippet="clt_layout"/> diff --git a/rkward/plugins/distributions/clt/plot_wilcoxon_clt.xml b/rkward/plugins/distributions/clt/plot_wilcoxon_clt.xml index a3715f4..b903577 100644 --- a/rkward/plugins/distributions/clt/plot_wilcoxon_clt.xml +++ b/rkward/plugins/distributions/clt/plot_wilcoxon_clt.xml @@ -14,9 +14,7 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_verticals" to="false" /> - <script><![CDATA[ - gui.setValue ("plotoptions.default_main", i18n ("Wilcoxon")); - ]]></script> + <i18n id="dist_name" label="Wilcoxon" i18n_context="Distribution name"/> </logic> <dialog label="Central Limit Theorem: Wilcoxon to Normal" > <insert snippet="clt_layout"/> |
From: m.eik m. <mei...@un...> - 2015-01-31 03:28:55
|
Git commit 1d2dd5e70df6f9aec5b37b5d6b99cba35e78095a by m.eik michalke. Committed on 31/01/2015 at 03:27. Pushed by meikm into branch 'master'. updated skeleton dialog M +5 -3 packages/rkwarddev/inst/rkward/RKWardPluginSkeleton.pluginmap M +70 -62 packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.js M +8 -11 packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.rkh M +38 -14 packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.xml M +8 -2 packages/rkwarddev/inst/rkward/rkwarddev.pluginmap http://commits.kde.org/rkward/1d2dd5e70df6f9aec5b37b5d6b99cba35e78095a diff --git a/packages/rkwarddev/inst/rkward/RKWardPluginSkeleton.pluginmap b/packages/rkwarddev/inst/rkward/RKWardPluginSkeleton.pluginmap index 8c608f8..91c66f9 100644 --- a/packages/rkwarddev/inst/rkward/RKWardPluginSkeleton.pluginmap +++ b/packages/rkwarddev/inst/rkward/RKWardPluginSkeleton.pluginmap @@ -1,7 +1,9 @@ <!DOCTYPE rkpluginmap > <document + base_prefix="" namespace="CreateRKWardpluginskeleton" - id="CreateRKWardpluginskeleton__rkward" + id="CreateRKWardpluginskeleton_rkward" + po_id="CreateRKWardpluginskeleton_rkward" priority="medium" > <!-- @@ -15,7 +17,7 @@ shortinfo="GUI interface to create RKWard plugin skeletons" longinfo="GUI interface to create RKWard plugin skeletons" version="0.06-5" - releasedate="2014-10-19" + releasedate="2015-01-30" url="http://rkward.kde.org" license="GPL (>= 3)" > @@ -38,7 +40,7 @@ <hierarchy> <menu id="file" - label.file="File" + label="File" > <menu id="export" diff --git a/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.js b/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.js index 94be83c..194522d 100644 --- a/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.js +++ b/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.js @@ -34,6 +34,7 @@ function preprocess(){ function calculate(){ // read in variables from dialog + var inpPluginnm = getString("inp_Pluginnm"); var inpLicense = getString("inp_License"); var inpShrtdscr = getString("inp_Shrtdscr"); @@ -44,16 +45,13 @@ function calculate(){ var inpGivennam = getString("inp_Givennam"); var inpFamilynm = getString("inp_Familynm"); var inpEmail = getString("inp_Email"); - var chcAuthor = getBoolean("chc_Author"); - var chcMaintanr = getBoolean("chc_Maintanr"); + var ocolOclInpGvnnmtx = getList("ost_fPPPPGGFFE.ocl_inpGvnnmtx"); + var ocolOclInpFmlynmt = getList("ost_fPPPPGGFFE.ocl_inpFmlynmt"); + var ocolOclInpEmaltxt = getList("ost_fPPPPGGFFE.ocl_inpEmaltxt"); + var ocolOclChcAthrstt = getList("ost_fPPPPGGFFE.ocl_chcAthrstt"); + var ocolOclChcMntnrst = getList("ost_fPPPPGGFFE.ocl_chcMntnrst"); + var ocolOclChcCntrbtr = getList("ost_fPPPPGGFFE.ocl_chcCntrbtr"); var brwDTEMPDIR = getString("brw_DTEMPDIR"); - var chcOvrwrtxs = getBoolean("chc_Ovrwrtxs"); - var chcAddwzrds = getBoolean("chc_Addwzrds"); - var chcIncldplg = getBoolean("chc_Incldplg"); - var chcOpnflsfr = getBoolean("chc_Opnflsfr"); - var chcAddplRKW = getBoolean("chc_AddplRKW"); - var chcShwthplg = getBoolean("chc_Shwthplg"); - var chcGsRKW060 = getBoolean("chc_GsRKW060"); var drpPlcntpmn = getString("drp_Plcntpmn"); var inpNmnmnplg = getString("inp_Nmnmnplg"); var inpRKWardmn = getString("inp_RKWardmn"); @@ -70,62 +68,20 @@ function calculate(){ var ocolOclInpRpstryt = getList("ost_fDRDRPPRRP.ocl_inpRpstryt"); var inpSummary = getString("inp_Summary"); var inpUsage = getString("inp_Usage"); + var chcAuthor = getBoolean("chc_Author.state"); + var chcMaintanr = getBoolean("chc_Maintanr.state"); + var chcContrbtr = getBoolean("chc_Contrbtr.state"); + var chcOvrwrtxs = getBoolean("chc_Ovrwrtxs.state"); + var chcAddwzrds = getBoolean("chc_Addwzrds.state"); + var chcIncldplg = getBoolean("chc_Incldplg.state"); + var chcOpnflsfr = getBoolean("chc_Opnflsfr.state"); + var chcAddplRKW = getBoolean("chc_AddplRKW.state"); + var chcShwthplg = getBoolean("chc_Shwthplg.state"); + var chcGsRKW060 = getBoolean("chc_GsRKW060.state"); var frmDfndpndnChecked = getBoolean("frm_Dfndpndn.checked"); var frmWrthlpflChecked = getBoolean("frm_Wrthlpfl.checked"); // the R code to be evaluated - // define the array arrOptAuthorRole for values of R option "role" - var arrOptAuthorRole = new Array(); - if(chcAuthor) { - arrOptAuthorRole.push("\"aut\""); - } else { - arrOptAuthorRole.push(); - } - if(chcMaintanr) { - arrOptAuthorRole.push("\"cre\""); - } else { - arrOptAuthorRole.push(); - } - // clean array arrOptAuthorRole from empty strings - arrOptAuthorRole = arrOptAuthorRole.filter(String); - // set the actual variable optAuthorRole with all values for R option "role" - if(arrOptAuthorRole.length > 0) { - var optAuthorRole = "role=c(" + arrOptAuthorRole.join(", ") + ")"; - } else { - var optAuthorRole = ""; - } - - // define the array arrOptAuthor for values of R option "author" - var arrOptAuthor = new Array(); - if(inpGivennam) { - arrOptAuthor.push("given=\"" + inpGivennam + "\""); - } else { - arrOptAuthor.push(); - } - if(inpFamilynm) { - arrOptAuthor.push("family=\"" + inpFamilynm + "\""); - } else { - arrOptAuthor.push(); - } - if(inpEmail) { - arrOptAuthor.push("email=\"" + inpEmail + "\""); - } else { - arrOptAuthor.push(); - } - if(optAuthorRole) { - arrOptAuthor.push(optAuthorRole); - } else { - arrOptAuthor.push(); - } - // clean array arrOptAuthor from empty strings - arrOptAuthor = arrOptAuthor.filter(String); - // set the actual variable optAuthor with all values for R option "author" - if(arrOptAuthor.length > 0) { - var optAuthor = ",\n\tauthor=person(" + arrOptAuthor.join(", ") + ")"; - } else { - var optAuthor = ""; - } - // define the array arrOptAbout for values of R option "about" var arrOptAbout = new Array(); if(inpShrtdscr) { @@ -269,7 +225,59 @@ function calculate(){ if(inpPluginnm) { echo("\n\tname=\"" + inpPluginnm + "\""); } - echo(optAuthor); + var ocolOclInpGvnnmtx = getList("ost_fPPPPGGFFE.ocl_inpGvnnmtx"); + var ocolOclInpFmlynmt = getList("ost_fPPPPGGFFE.ocl_inpFmlynmt"); + var ocolOclInpEmaltxt = getList("ost_fPPPPGGFFE.ocl_inpEmaltxt"); + var ocolOclChcAthrstt = getList("ost_fPPPPGGFFE.ocl_chcAthrstt"); + var ocolOclChcMntnrst = getList("ost_fPPPPGGFFE.ocl_chcMntnrst"); + var ocolOclChcCntrbtr = getList("ost_fPPPPGGFFE.ocl_chcCntrbtr"); + if(ocolOclInpGvnnmtx != "") { + echo("\tauthor=\"c(\n\t\t\t"); + for (var i = 0; i < ocolOclInpGvnnmtx.length; ++i){ + // define the array arrOptAuthorRole for values of R option "role" + var arrOptAuthorRole = new Array(); + if(ocolOclChcAthrstt[i] == 1) { + arrOptAuthorRole.push("\\\"aut\\\""); + } else { + arrOptAuthorRole.push(); + } + if(ocolOclChcMntnrst[i] == 1) { + arrOptAuthorRole.push("\\\"cre\\\""); + } else { + arrOptAuthorRole.push(); + } + if(ocolOclChcCntrbtr[i] == 1) { + arrOptAuthorRole.push("\\\"ctb\\\""); + } else { + arrOptAuthorRole.push(); + } + // clean array arrOptAuthorRole from empty strings + arrOptAuthorRole = arrOptAuthorRole.filter(String); + // set the actual variable optAuthorRole with all values for R option "role" + if(arrOptAuthorRole.length > 0) { + var optAuthorRole = "role=c(" + arrOptAuthorRole.join(", ") + ")"; + } else { + var optAuthorRole = ""; + } + + echo("person("); + echo("given=\\\"" + ocolOclInpGvnnmtx[i] + "\\\""); + if(ocolOclInpFmlynmt[i]) { + echo(", family=\\\"" + ocolOclInpFmlynmt[i] + "\\\""); + } + if(ocolOclInpEmaltxt[i]) { + echo(", email=\\\"" + ocolOclInpEmaltxt[i] + "\\\""); + } + if(optAuthorRole) { + echo(", " + optAuthorRole); + } + echo(")"); + if(i + 1 < ocolOclInpGvnnmtx.length) { + echo(",\n\t\t\t"); + } + } + echo("\n\t\t)\",\n"); + } echo(optAbout); echo("\n)\n\n"); if(frmDfndpndnChecked && (optDependencies || ocolOclInpPckgtxt)) { diff --git a/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.rkh b/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.rkh index 2fc6e21..6196c93 100644 --- a/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.rkh +++ b/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.rkh @@ -40,6 +40,8 @@ A category for your plugin. This infromation is currently ignored by RKWard. </setting> <caption id="frm_Plugnthr" /> + <caption id="frm_Pckgthrs" /> + <caption id="frm_Packgthr" /> <setting id="inp_Givennam"> First name of the package author. </setting> @@ -49,12 +51,15 @@ <setting id="inp_Email"> The authors e-mail address, important for bug reports and receiving a myriad of thank yous... </setting> - <caption id="frm_Authrrls" /> + <caption id="frm_Roles" /> <setting id="chc_Author"> - Check this if you are the author of the plugin code. + Check this if this person is the author of the plugin code. </setting> <setting id="chc_Maintanr"> - Check this if you maintain the plugin package. + Check this if this person maintains the plugin package. + </setting> + <setting id="chc_Contrbtr"> + Check this if this person is a contributor to the plugin code (e.g., translations). </setting> <caption id="tab_Cretptns" /> <caption id="frm_rDTEMPDIRD" /> @@ -118,14 +123,6 @@ <setting id="inp_Repostry"> The repository to download R packages from required to run this plugin. </setting> - <setting id="ost_fDRDRPPRRP.ocl_inpPckgtxt"> - </setting> - <setting id="ost_fDRDRPPRRP.ocl_inpmintext"> - </setting> - <setting id="ost_fDRDRPPRRP.ocl_inpmaxtext"> - </setting> - <setting id="ost_fDRDRPPRRP.ocl_inpRpstryt"> - </setting> <caption id="tab_Helppage" /> <caption id="frm_Wrthlpfl" /> <setting id="inp_Summary"> diff --git a/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.xml b/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.xml index 4b8e8c6..b1cfc71 100644 --- a/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.xml +++ b/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.xml @@ -30,20 +30,44 @@ </row> </frame> <frame label="Plugin author" id="frm_Plugnthr"> - <row id="row_cGGFFEEGGF"> - <column id="clm_inptGGFFEE"> - <input label="Given name" id="inp_Givennam" required="true" /> - <input label="Family name" id="inp_Familynm" required="true" /> - <input label="E-mail" id="inp_Email" required="true" /> - <stretch /> - </column> - <column id="clm_frmlAAAAMM"> - <frame label="Author roles" id="frm_Authrrls"> - <checkbox id="chc_Author" label="Author" value="true" checked="true" /> - <checkbox id="chc_Maintanr" label="Maintainer" value="true" checked="true" /> - <stretch /> - </frame> - </column> + <row id="row_oPPPPGGFFE"> + <optionset id="ost_fPPPPGGFFE"> + <logic> + <connect governor="chc_Maintanr.state" client="inp_Email.required" /> + </logic> + <content> + <optiondisplay /> + <frame label="Package authors" id="frm_Pckgthrs"> + <row id="row_fPPGGFFEEG"> + <frame label="Package author" id="frm_Packgthr"> + <row id="row_cGGFFEEGGF"> + <column id="clm_inptGGFFEE"> + <input label="Given name" id="inp_Givennam" required="true" /> + <input label="Family name" id="inp_Familynm" required="true" /> + <input label="E-mail" id="inp_Email" /> + <stretch /> + </column> + <column id="clm_frRRAAMMCC"> + <frame label="Roles" id="frm_Roles"> + <checkbox id="chc_Author" label="Author" value="true" checked="true" /> + <checkbox id="chc_Maintanr" label="Maintainer" value="true" checked="true" /> + <checkbox id="chc_Contrbtr" label="Contributor" value="true" /> + <stretch /> + </frame> + </column> + </row> + </frame> + </row> + <stretch /> + </frame> + </content> + <optioncolumn id="ocl_inpGvnnmtx" connect="inp_Givennam.text" label="Given name" /> + <optioncolumn id="ocl_inpFmlynmt" connect="inp_Familynm.text" label="Family name" /> + <optioncolumn id="ocl_inpEmaltxt" connect="inp_Email.text" label="E-mail" /> + <optioncolumn id="ocl_chcAthrstt" connect="chc_Author.state" label="Author" /> + <optioncolumn id="ocl_chcMntnrst" connect="chc_Maintanr.state" label="Maintainer" /> + <optioncolumn id="ocl_chcCntrbtr" connect="chc_Contrbtr.state" label="Contributor" /> + </optionset> </row> </frame> </column> diff --git a/packages/rkwarddev/inst/rkward/rkwarddev.pluginmap b/packages/rkwarddev/inst/rkward/rkwarddev.pluginmap index f27e2d3..3f01929 100644 --- a/packages/rkwarddev/inst/rkward/rkwarddev.pluginmap +++ b/packages/rkwarddev/inst/rkward/rkwarddev.pluginmap @@ -1,5 +1,11 @@ <!DOCTYPE rkpluginmap> -<document base_prefix="" namespace="rkward"> - <require file="RKWardPluginSkeleton.pluginmap" /> +<document + base_prefix="" + namespace="CreateRKWardpluginskeleton" + id="CreateRKWardpluginskeleton_rkward" + po_id="CreateRKWardpluginskeleton_rkward" + priority="medium" +> + <include file="RKWardPluginSkeleton.pluginmap" /> </document> |
From: Thomas F. <tho...@ru...> - 2015-01-30 21:21:45
|
Git commit cec8e458eba3bd8d12b4eaddb31fcc6801ba9ccf by Thomas Friedrichsmeier. Committed on 30/01/2015 at 20:03. Pushed by tfry into branch 'master'. Implement some more string functionality that will be needed for proper i18n of CLT plugins (but should also come in handy, elsewhere) - <label>-element to insert element labels into .rkh pages - <i18n>-element to define a translatable string property - string properties gain modifier "quoted" M +3 -0 ChangeLog M +36 -1 doc/rkwardplugins/index.docbook M +6 -6 rkward/plugin/rkcomponentproperties.cpp M +10 -0 rkward/plugin/rkstandardcomponent.cpp M +49 -18 rkward/windows/rkhtmlwindow.cpp M +9 -2 rkward/windows/rkhtmlwindow.h http://commits.kde.org/rkward/cec8e458eba3bd8d12b4eaddb31fcc6801ba9ccf diff --git a/ChangeLog b/ChangeLog index 8409cd7..ea4c697 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +- New element <i18n> for use in plugins' logic section: Provides a translatable string property +- New element <label> for use in plugin help pages: Copies the label-attribute of the given element into the text +- New string property modifier "quoted" to make it easier to quote dynamic strings inside plugins - Reworked distribution calculator plugins - Added power analysis plugin (already existed as separate plugin) - TODO: add automated tests diff --git a/doc/rkwardplugins/index.docbook b/doc/rkwardplugins/index.docbook index 4da8d3d..2c298c6 100644 --- a/doc/rkwardplugins/index.docbook +++ b/doc/rkwardplugins/index.docbook @@ -2530,7 +2530,17 @@ local({ <variablelist> <varlistentry> <term>String properties</term> -<listitem><para>The most simple type of property, used to simply hold a piece of text. It does not provide any modifiers. If you attempt to fetch modified values from the JS template, it will return the usual value, and a warning will be written to the terminal you're running rkward from.</para></listitem> +<listitem><para>The most simple type of property, used to simply hold a piece of text. Modifiers: + <variablelist> + <varlistentry> + <term>No modifier ("")</term> + <listitem><para>The string as defined / set.</para></listitem> + </varlistentry> + <varlistentry> + <term>quoted</term> + <listitem><para>The string in quoted form (suitable for passing to R as character).</para></listitem> + </varlistentry> + </variablelist></para></listitem> </varlistentry> <varlistentry> <term>Boolean properties</term> @@ -3324,6 +3334,21 @@ Child-elements: </varlistentry> <varlistentry> +<term><i18n></term> +<listitem><para>Creates a new (string) property that is supposed to be provide an i18n'ed label. Attributes: + <variablelist> + <varlistentry> + <term><parameter>id</parameter></term> + <listitem><para>The ID of the new property (required)</para></listitem> + </varlistentry> + <varlistentry> + <term><parameter>label</parameter></term> + <listitem><para>The label. This will be translated. (required)</para></listitem> + </varlistentry> + </variablelist></para></listitem> +</varlistentry> + +<varlistentry> <term><set></term> <listitem><para>Set a property to a fixed value (of course, if you additionally connect the property to some other property, the value does not remain fixed). For instance, if you embed a plugin, but want to hide some of its elements, you might set the visibility property of those elements to false. Useful esp. for embedded/embedding plugins. Note: If there are several <set> elements for a single <parameter>id</parameter>, the latest one to be defined takes precendence. This will sometimes be useful to rely on when using <include>d parts. @@ -4224,6 +4249,16 @@ Child elements: </variablelist></para></listitem> </varlistentry> <varlistentry> +<term><label></term> +<listitem><para>Inserts the value of a UI label. Can be used in any of the sections described above. + <variablelist> + <varlistentry> + <term>id</term> + <listitem><para>The id of the element in the plugin, of which to copy the <replaceable>label</replaceable>-attribute.</para></listitem> + </varlistentry> + </variablelist></para></listitem> +</varlistentry> +<varlistentry> <term><various html tags></term> <listitem><para>Most basic html tags are allowed within the sections. Please keep manual formatting to a minimum, however.</para></listitem> </varlistentry> diff --git a/rkward/plugin/rkcomponentproperties.cpp b/rkward/plugin/rkcomponentproperties.cpp index 5807e76..4f10ba7 100644 --- a/rkward/plugin/rkcomponentproperties.cpp +++ b/rkward/plugin/rkcomponentproperties.cpp @@ -2,7 +2,7 @@ rkcomponentproperties - description ------------------- begin : Fri Nov 25 2005 - copyright : (C) 2005, 2006, 2007, 2008, 2009, 2011, 2012, 2014 by Thomas Friedrichsmeier + copyright : (C) 2005, 2006, 2007, 2008, 2009, 2011, 2012, 2014, 2015 by Thomas Friedrichsmeier email : tf...@us... ***************************************************************************/ @@ -113,11 +113,11 @@ RKComponentPropertyBase::~RKComponentPropertyBase () { QVariant RKComponentPropertyBase::value (const QString &modifier) { RK_TRACE (PLUGIN); - if (!modifier.isEmpty ()) { - warnModifierNotRecognized (modifier); - return QString (); - } - return _value; + if (modifier.isEmpty ()) return _value; + if (modifier == "quoted") return RObject::rQuote (_value); + // else + warnModifierNotRecognized (modifier); + return QString (); } bool RKComponentPropertyBase::setValue (const QString &string) { diff --git a/rkward/plugin/rkstandardcomponent.cpp b/rkward/plugin/rkstandardcomponent.cpp index 5f48925..41120ad 100644 --- a/rkward/plugin/rkstandardcomponent.cpp +++ b/rkward/plugin/rkstandardcomponent.cpp @@ -740,6 +740,16 @@ void RKComponentBuilder::parseLogic (const QDomElement &element, XMLHelper &xml, initial_values.insert (xml.getStringAttribute (*it, "id", "#noid#", DL_WARNING), xml.getStringAttribute (*it, "to", "false", DL_WARNING)); } + // i18n'ed strings + children = xml.getChildElements (element, "i18n", DL_INFO); + for (it = children.constBegin (); it != children.constEnd (); ++it) { + QString id = xml.getStringAttribute (*it, "id", "#noid#", DL_WARNING); + RKComponentPropertyBase *prop = new RKComponentPropertyBase (component (), false); + component ()->addChild (id, prop); + prop->setInternal (true); + initial_values.insert (id, xml.i18nStringAttribute (*it, "label", QString (), DL_WARNING)); + } + // find convert elements QMap<RKComponentPropertyBase*, QStringList> switch_convert_sources; children = xml.getChildElements (element, "convert", DL_INFO); diff --git a/rkward/windows/rkhtmlwindow.cpp b/rkward/windows/rkhtmlwindow.cpp index cea48e0..84d2ece 100644 --- a/rkward/windows/rkhtmlwindow.cpp +++ b/rkward/windows/rkhtmlwindow.cpp @@ -2,7 +2,7 @@ rkhtmlwindow - description ------------------- begin : Wed Oct 12 2005 - copyright : (C) 2005-2014 by Thomas Friedrichsmeier + copyright : (C) 2005-2015 by Thomas Friedrichsmeier email : tf...@us... ***************************************************************************/ @@ -508,6 +508,7 @@ bool RKHTMLWindow::renderRKHelp (const KUrl &url) { chandle = componentPathToHandle (url.path ()); if (!chandle) return false; } + XMLHelper component_xml (for_component ? chandle->getFilename () : QString (), for_component ? chandle->messageCatalog () : 0); QString help_file_name; QDomElement element; @@ -536,6 +537,12 @@ bool RKHTMLWindow::renderRKHelp (const KUrl &url) { QDomElement help_doc_element = help_xml.openXMLFile (DL_ERROR); if (help_doc_element.isNull () && (!for_component)) return false; + HTMLRendererState state; + state.component_xml = &component_xml; + state.help_xml = &help_xml; + state.component_doc_element = component_doc_element; + state.help_doc_element = help_doc_element; + // initialize output, and set title beginWritingHTML (url); QString page_title (i18n ("No Title")); @@ -572,13 +579,13 @@ bool RKHTMLWindow::renderRKHelp (const KUrl &url) { element = help_xml.getChildElement (help_doc_element, "summary", DL_INFO); if (!element.isNull ()) { writeHTML (startSection ("summary", i18n ("Summary"), QString (), &anchors, &anchornames)); - writeHTML (renderHelpFragment (element, &help_xml)); + writeHTML (renderHelpFragment (element, state)); } element = help_xml.getChildElement (help_doc_element, "usage", DL_INFO); if (!element.isNull ()) { writeHTML (startSection ("usage", i18n ("Usage"), QString (), &anchors, &anchornames)); - writeHTML (renderHelpFragment (element, &help_xml)); + writeHTML (renderHelpFragment (element, state)); } XMLChildList section_elements = help_xml.getChildElements (help_doc_element, "section", DL_INFO); @@ -587,7 +594,7 @@ bool RKHTMLWindow::renderRKHelp (const KUrl &url) { QString shorttitle = help_xml.i18nStringAttribute (*it, "shorttitle", QString (), DL_DEBUG); QString id = help_xml.getStringAttribute (*it, "id", QString (), DL_WARNING); writeHTML (startSection (id, title, shorttitle, &anchors, &anchornames)); - writeHTML (renderHelpFragment (*it, &help_xml)); + writeHTML (renderHelpFragment (*it, state)); } // the section "settings" is the most complicated, as the labels of the individual GUI items has to be fetched from the component description. Of course it is only meaningful for component help, and not rendered for top level help pages. @@ -600,19 +607,13 @@ bool RKHTMLWindow::renderRKHelp (const KUrl &url) { if ((*it).tagName () == "setting") { QString id = help_xml.getStringAttribute (*it, "id", QString (), DL_WARNING); QString title = help_xml.i18nStringAttribute (*it, "title", QString (), DL_INFO); - if (title.isEmpty ()) { - QDomElement source_element = component_xml.findElementWithAttribute (component_doc_element, "id", id, true, DL_WARNING); - if (source_element.isNull ()) RK_DEBUG (PLUGIN, DL_ERROR, "No such UI element: %s", qPrintable (id)); - title = component_xml.i18nStringAttribute (source_element, "label", i18n ("Unnamed GUI element"), DL_WARNING); - } + if (title.isEmpty ()) title = resolveLabel (id, state); writeHTML ("<h4>" + title + "</h4>"); - writeHTML (renderHelpFragment (*it, &help_xml)); + writeHTML (renderHelpFragment (*it, state)); } else if ((*it).tagName () == "caption") { QString id = help_xml.getStringAttribute (*it, "id", QString (), DL_WARNING); QString title = help_xml.i18nStringAttribute (*it, "title", QString (), DL_INFO); - QDomElement source_element = component_xml.findElementWithAttribute (component_doc_element, "id", id, true, DL_WARNING); - if (source_element.isNull ()) RK_DEBUG (PLUGIN, DL_ERROR, "No such UI element: %s", qPrintable (id)); - title = component_xml.i18nStringAttribute (source_element, "label", title, DL_WARNING); + if (title.isEmpty ()) title = resolveLabel (id, state); writeHTML ("<h3>" + title + "</h3>"); } else { help_xml.displayError (&(*it), "Tag not allowed, here", DL_WARNING); @@ -625,14 +626,14 @@ bool RKHTMLWindow::renderRKHelp (const KUrl &url) { element = help_xml.getChildElement (help_doc_element, "related", DL_INFO); if (!element.isNull ()) { writeHTML (startSection ("related", i18n ("Related functions and pages"), QString (), &anchors, &anchornames)); - writeHTML (renderHelpFragment (element, &help_xml)); + writeHTML (renderHelpFragment (element, state)); } // "technical" section element = help_xml.getChildElement (help_doc_element, "technical", DL_INFO); if (!element.isNull ()) { writeHTML (startSection ("technical", i18n ("Technical details"), QString (), &anchors, &anchornames)); - writeHTML (renderHelpFragment (element, &help_xml)); + writeHTML (renderHelpFragment (element, state)); } if (for_component) { @@ -680,12 +681,22 @@ bool RKHTMLWindow::renderRKHelp (const KUrl &url) { return (true); } -QString RKHTMLWindow::renderHelpFragment (QDomElement &fragment, const XMLHelper *xml) { +QString RKHTMLWindow::resolveLabel (const QString& id, const RKHTMLWindow::HTMLRendererState& state) const { RK_TRACE (APP); - QString text = xml->i18nElementText (fragment, true, DL_WARNING); + QDomElement source_element = state.component_xml->findElementWithAttribute (state.component_doc_element, "id", id, true, DL_WARNING); + if (source_element.isNull ()) { + RK_DEBUG (PLUGIN, DL_ERROR, "No such UI element: %s", qPrintable (id)); + } + return (state.component_xml->i18nStringAttribute (source_element, "label", i18n ("Unnamed GUI element"), DL_WARNING)); +} + +QString RKHTMLWindow::renderHelpFragment (QDomElement &fragment, const HTMLRendererState &state) { + RK_TRACE (APP); - // Can't resolve links based on the already parsed dom-tree, because they can be inside string to be translated. + QString text = state.help_xml->i18nElementText (fragment, true, DL_WARNING); + + // Can't resolve links and references based on the already parsed dom-tree, because they can be inside string to be translated. // I.e. resolving links before doing i18n will cause i18n-lookup to fail int pos = 0; int npos; @@ -713,6 +724,26 @@ QString RKHTMLWindow::renderHelpFragment (QDomElement &fragment, const XMLHelper } ret += text.mid (pos); + if (state.component_xml) { + text = ret; + ret.clear (); + pos = 0; + while ((npos = text.indexOf ("<label ", pos)) >= 0) { + ret += text.mid (pos, npos - pos); + + QString id; + int id_start = text.indexOf ("id=\"", npos + 6); + if (id_start >= 0) { + id_start += 4; + int id_end = text.indexOf ("\"", id_start); + id = text.mid (id_start, id_end - id_start); + pos = text.indexOf ("/>", id_end) + 2; + } + ret += resolveLabel (id, state); + } + ret += text.mid (pos); + } + RK_DEBUG (APP, DL_DEBUG, "%s", qPrintable (ret)); return ret; } diff --git a/rkward/windows/rkhtmlwindow.h b/rkward/windows/rkhtmlwindow.h index 35e8697..d78ffa3 100644 --- a/rkward/windows/rkhtmlwindow.h +++ b/rkward/windows/rkhtmlwindow.h @@ -2,7 +2,7 @@ rkhtmlwindow - description ------------------- begin : Wed Oct 12 2005 - copyright : (C) 2005, 2006, 2007, 2009, 2011, 2014 by Thomas Friedrichsmeier + copyright : (C) 2005, 2006, 2007, 2009, 2011, 2014, 2015 by Thomas Friedrichsmeier email : tf...@us... ***************************************************************************/ @@ -137,7 +137,14 @@ private: // for dealing with rkward://[page|component]-pages bool renderRKHelp (const KUrl &url); - QString renderHelpFragment (QDomElement &fragment, const XMLHelper *xml); + struct HTMLRendererState { + XMLHelper *help_xml; + XMLHelper *component_xml; + QDomElement help_doc_element; + QDomElement component_doc_element; + }; + QString renderHelpFragment (QDomElement &fragment, const HTMLRendererState &state); + QString resolveLabel (const QString &id, const HTMLRendererState &state) const; QString prepareHelpLink (const QString &href, const QString &text); QString componentPathToId (QString path); RKComponentHandle *componentPathToHandle (QString path); |
From: Thomas F. <tho...@ru...> - 2015-01-30 17:12:58
|
Git commit 71aa8f36e7b6f908e23bdb7a39c72860290a3bd1 by Thomas Friedrichsmeier. Committed on 30/01/2015 at 12:42. Pushed by tfry into branch 'master'. Add i18n to CLT-plugins (rather easy, as these do not come with a header, thus far). M +3 -1 rkward/plugins/distributions/clt/plot_beta_clt.xml M +3 -1 rkward/plugins/distributions/clt/plot_binomial_clt.xml M +3 -1 rkward/plugins/distributions/clt/plot_chi_squared_clt.xml M +7 -7 rkward/plugins/distributions/clt/plot_clt_common.js M +3 -1 rkward/plugins/distributions/clt/plot_exponential_clt.xml M +3 -1 rkward/plugins/distributions/clt/plot_f_clt.xml M +3 -1 rkward/plugins/distributions/clt/plot_gamma_clt.xml M +3 -1 rkward/plugins/distributions/clt/plot_geometric_clt.xml M +3 -1 rkward/plugins/distributions/clt/plot_hypergeometric_clt.xml M +3 -1 rkward/plugins/distributions/clt/plot_logistic_clt.xml M +3 -1 rkward/plugins/distributions/clt/plot_lognormal_clt.xml M +3 -1 rkward/plugins/distributions/clt/plot_negbinomial_clt.xml M +3 -1 rkward/plugins/distributions/clt/plot_normal_clt.xml M +3 -1 rkward/plugins/distributions/clt/plot_poisson_clt.xml M +3 -1 rkward/plugins/distributions/clt/plot_t_clt.xml M +3 -1 rkward/plugins/distributions/clt/plot_uniform_clt.xml M +3 -1 rkward/plugins/distributions/clt/plot_weibull_clt.xml M +3 -1 rkward/plugins/distributions/clt/plot_wilcoxon_clt.xml http://commits.kde.org/rkward/71aa8f36e7b6f908e23bdb7a39c72860290a3bd1 diff --git a/rkward/plugins/distributions/clt/plot_beta_clt.xml b/rkward/plugins/distributions/clt/plot_beta_clt.xml index f620e8c..5f8f41e 100644 --- a/rkward/plugins/distributions/clt/plot_beta_clt.xml +++ b/rkward/plugins/distributions/clt/plot_beta_clt.xml @@ -14,7 +14,9 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_dopoints" to="false" /> - <set id="plotoptions.default_main" to=""Beta""/> + <script><![CDATA[ + gui.setValue ("plotoptions.default_main", i18n ("Beta")); + ]]></script> </logic> <dialog label="Central Limit Theorem: Beta to Normal" > <insert snippet="clt_layout"/> diff --git a/rkward/plugins/distributions/clt/plot_binomial_clt.xml b/rkward/plugins/distributions/clt/plot_binomial_clt.xml index 508f282..9ebff82 100644 --- a/rkward/plugins/distributions/clt/plot_binomial_clt.xml +++ b/rkward/plugins/distributions/clt/plot_binomial_clt.xml @@ -14,7 +14,9 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_verticals" to="false" /> - <set id="plotoptions.default_main" to=""Binomial""/> + <script><![CDATA[ + gui.setValue ("plotoptions.default_main", i18n ("Binomial")); + ]]></script> </logic> <dialog label="Central Limit Theorem: Binomial to Normal" > <insert snippet="clt_layout"/> diff --git a/rkward/plugins/distributions/clt/plot_chi_squared_clt.xml b/rkward/plugins/distributions/clt/plot_chi_squared_clt.xml index cd747a3..e76f909 100644 --- a/rkward/plugins/distributions/clt/plot_chi_squared_clt.xml +++ b/rkward/plugins/distributions/clt/plot_chi_squared_clt.xml @@ -14,7 +14,9 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_dopoints" to="false" /> - <set id="plotoptions.default_main" to=""Chi-Squared""/> + <script><![CDATA[ + gui.setValue ("plotoptions.default_main", i18n ("Chi-Squared")); + ]]></script> </logic> <dialog label="Central Limit Theorem: Chi squared to Normal" > <insert snippet="clt_layout"/> diff --git a/rkward/plugins/distributions/clt/plot_clt_common.js b/rkward/plugins/distributions/clt/plot_clt_common.js index 904e2d0..bfe6b53 100644 --- a/rkward/plugins/distributions/clt/plot_clt_common.js +++ b/rkward/plugins/distributions/clt/plot_clt_common.js @@ -21,11 +21,11 @@ function doPrintout (full) { var drawnorm = getValue ("drawnorm"); - echo ('# parameters:\n'); + comment ('parameters:'); doParameters (); // get the parameters from xml file and store them R varaibles if (scalenorm || drawnorm) { - echo ('# mean and variances of the distribution of sample averages:\n'); + comment ('mean and variances of the distribution of sample averages:'); doExpVar (); // calculate the expectation and varaince of the distribution of smaple averages } @@ -52,26 +52,26 @@ function doPrintout (full) { var yLim = ""; // initialise the ylim option - echo ('# generate the entire data:\n'); + comment ('generate the entire data:'); doGenerateData (); // generate the random samples - echo ('# get the sample averages:\n'); + comment ('get the sample averages:'); echo ('avg <- colMeans(data);\n'); if (scalenorm) { - echo ('# normalise the variables:\n'); + comment ('normalise the variables:'); echo ('avg <- (avg - avg.exp)/sqrt(avg.var);\n'); } if (drawnorm) { - echo ('# generate random normal samples:\n'); + comment ('generate random normal samples:'); echo ('normX <- seq(from=min(avg), to=max(avg), length=' + nDist + ');\n'); echo ('normY <- ' + normFun + ' (normX' + normMuSigma_tag + ');\n'); } if (fun == "hist") { echo ('dist.hist <- hist(avg, plot=FALSE' + histcalcoptions + ');\n'); if (drawnorm) { - echo ('# calculate the ylims appropriately:\n'); + comment ('calculate the ylims appropriately:'); echo ('ylim <- c(0,max(c(dist.hist$density, normY)));\n'); yLim = ', ylim=ylim'; } diff --git a/rkward/plugins/distributions/clt/plot_exponential_clt.xml b/rkward/plugins/distributions/clt/plot_exponential_clt.xml index 5ffa890..e632a6f 100644 --- a/rkward/plugins/distributions/clt/plot_exponential_clt.xml +++ b/rkward/plugins/distributions/clt/plot_exponential_clt.xml @@ -13,7 +13,9 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_dopoints" to="false" /> - <set id="plotoptions.default_main" to=""Exponential""/> + <script><![CDATA[ + gui.setValue ("plotoptions.default_main", i18n ("Exponential")); + ]]></script> </logic> <dialog label="Central Limit Theorem: Exponential to Normal" > <insert snippet="clt_layout"/> diff --git a/rkward/plugins/distributions/clt/plot_f_clt.xml b/rkward/plugins/distributions/clt/plot_f_clt.xml index 9ce5987..0439392 100644 --- a/rkward/plugins/distributions/clt/plot_f_clt.xml +++ b/rkward/plugins/distributions/clt/plot_f_clt.xml @@ -15,7 +15,9 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_dopoints" to="false" /> - <set id="plotoptions.default_main" to=""F""/> + <script><![CDATA[ + gui.setValue ("plotoptions.default_main", i18n ("F")); + ]]></script> </logic> <dialog label="Central Limit Theorem: F to Normal" > <insert snippet="clt_layout"/> diff --git a/rkward/plugins/distributions/clt/plot_gamma_clt.xml b/rkward/plugins/distributions/clt/plot_gamma_clt.xml index 2f2762f..959a5a1 100644 --- a/rkward/plugins/distributions/clt/plot_gamma_clt.xml +++ b/rkward/plugins/distributions/clt/plot_gamma_clt.xml @@ -14,7 +14,9 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_dopoints" to="false" /> - <set id="plotoptions.default_main" to=""Gamma""/> + <script><![CDATA[ + gui.setValue ("plotoptions.default_main", i18n ("Gamma")); + ]]></script> </logic> <dialog label="Central Limit Theorem: Gamma to Normal" > <insert snippet="clt_layout"/> diff --git a/rkward/plugins/distributions/clt/plot_geometric_clt.xml b/rkward/plugins/distributions/clt/plot_geometric_clt.xml index ed8da6d..28320ad 100644 --- a/rkward/plugins/distributions/clt/plot_geometric_clt.xml +++ b/rkward/plugins/distributions/clt/plot_geometric_clt.xml @@ -13,7 +13,9 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_verticals" to="false" /> - <set id="plotoptions.default_main" to=""Geometric""/> + <script><![CDATA[ + gui.setValue ("plotoptions.default_main", i18n ("Geometric")); + ]]></script> </logic> <dialog label="Central Limit Theorem: Geometric to Normal" > <insert snippet="clt_layout"/> diff --git a/rkward/plugins/distributions/clt/plot_hypergeometric_clt.xml b/rkward/plugins/distributions/clt/plot_hypergeometric_clt.xml index 311802f..87fc1e2 100644 --- a/rkward/plugins/distributions/clt/plot_hypergeometric_clt.xml +++ b/rkward/plugins/distributions/clt/plot_hypergeometric_clt.xml @@ -15,7 +15,9 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_verticals" to="false" /> - <set id="plotoptions.default_main" to=""Hypergeometric""/> + <script><![CDATA[ + gui.setValue ("plotoptions.default_main", i18n ("Hypergeometric")); + ]]></script> </logic> <dialog label="Central Limit Theorem: Hypergeometric to Normal" > <insert snippet="clt_layout"/> diff --git a/rkward/plugins/distributions/clt/plot_logistic_clt.xml b/rkward/plugins/distributions/clt/plot_logistic_clt.xml index 294ad41..c1fd95e 100644 --- a/rkward/plugins/distributions/clt/plot_logistic_clt.xml +++ b/rkward/plugins/distributions/clt/plot_logistic_clt.xml @@ -14,7 +14,9 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_dopoints" to="false" /> - <set id="plotoptions.default_main" to=""Logistic""/> + <script><![CDATA[ + gui.setValue ("plotoptions.default_main", i18n ("Logistic")); + ]]></script> </logic> <dialog label="Central Limit Theorem: Logistic to Normal" > <insert snippet="clt_layout"/> diff --git a/rkward/plugins/distributions/clt/plot_lognormal_clt.xml b/rkward/plugins/distributions/clt/plot_lognormal_clt.xml index 9c338bf..d1e90df 100644 --- a/rkward/plugins/distributions/clt/plot_lognormal_clt.xml +++ b/rkward/plugins/distributions/clt/plot_lognormal_clt.xml @@ -14,7 +14,9 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_dopoints" to="false" /> - <set id="plotoptions.default_main" to=""Lognormal""/> + <script><![CDATA[ + gui.setValue ("plotoptions.default_main", i18n ("Lognormal")); + ]]></script> </logic> <dialog label="Central Limit Theorem: Lognormal to Normal" > <insert snippet="clt_layout"/> diff --git a/rkward/plugins/distributions/clt/plot_negbinomial_clt.xml b/rkward/plugins/distributions/clt/plot_negbinomial_clt.xml index 66b762e..f395fdb 100644 --- a/rkward/plugins/distributions/clt/plot_negbinomial_clt.xml +++ b/rkward/plugins/distributions/clt/plot_negbinomial_clt.xml @@ -26,7 +26,9 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_verticals" to="false" /> - <set id="plotoptions.default_main" to=""Negative Binomial""/> + <script><![CDATA[ + gui.setValue ("plotoptions.default_main", i18n ("Negative Binomial")); + ]]></script> <convert id="useprob" mode="equals" sources="param.string" standard="pprob" /> <connect client="prob.enabled" governor="useprob" /> diff --git a/rkward/plugins/distributions/clt/plot_normal_clt.xml b/rkward/plugins/distributions/clt/plot_normal_clt.xml index f605fe4..3c25a2c 100644 --- a/rkward/plugins/distributions/clt/plot_normal_clt.xml +++ b/rkward/plugins/distributions/clt/plot_normal_clt.xml @@ -14,7 +14,9 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_dopoints" to="false" /> - <set id="plotoptions.default_main" to=""Normal""/> + <script><![CDATA[ + gui.setValue ("plotoptions.default_main", i18n ("Normal")); + ]]></script> </logic> <dialog label="Central Limit Theorem: Normal to Normal" > <insert snippet="clt_layout"/> diff --git a/rkward/plugins/distributions/clt/plot_poisson_clt.xml b/rkward/plugins/distributions/clt/plot_poisson_clt.xml index 4d288cf..9b56c6a 100644 --- a/rkward/plugins/distributions/clt/plot_poisson_clt.xml +++ b/rkward/plugins/distributions/clt/plot_poisson_clt.xml @@ -13,7 +13,9 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_verticals" to="false" /> - <set id="plotoptions.default_main" to=""Poisson""/> + <script><![CDATA[ + gui.setValue ("plotoptions.default_main", i18n ("Poisson")); + ]]></script> </logic> <dialog label="Central Limit Theorem: Poisson to Normal" > <insert snippet="clt_layout"/> diff --git a/rkward/plugins/distributions/clt/plot_t_clt.xml b/rkward/plugins/distributions/clt/plot_t_clt.xml index 3956179..f2224be 100644 --- a/rkward/plugins/distributions/clt/plot_t_clt.xml +++ b/rkward/plugins/distributions/clt/plot_t_clt.xml @@ -14,7 +14,9 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_dopoints" to="false" /> - <set id="plotoptions.default_main" to=""t""/> + <script><![CDATA[ + gui.setValue ("plotoptions.default_main", i18n ("t")); + ]]></script> </logic> <dialog label="Central Limit Theorem: t to Normal" > <insert snippet="clt_layout"/> diff --git a/rkward/plugins/distributions/clt/plot_uniform_clt.xml b/rkward/plugins/distributions/clt/plot_uniform_clt.xml index 70a95ab..fc4f98f 100644 --- a/rkward/plugins/distributions/clt/plot_uniform_clt.xml +++ b/rkward/plugins/distributions/clt/plot_uniform_clt.xml @@ -14,7 +14,9 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_dopoints" to="false" /> - <set id="plotoptions.default_main" to=""Uniform""/> + <script><![CDATA[ + gui.setValue ("plotoptions.default_main", i18n ("Uniform")); + ]]></script> </logic> <dialog label="Central Limit Theorem: Uniform to Normal" > <insert snippet="clt_layout"/> diff --git a/rkward/plugins/distributions/clt/plot_weibull_clt.xml b/rkward/plugins/distributions/clt/plot_weibull_clt.xml index 644bb54..1c9ab77 100644 --- a/rkward/plugins/distributions/clt/plot_weibull_clt.xml +++ b/rkward/plugins/distributions/clt/plot_weibull_clt.xml @@ -14,7 +14,9 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_dopoints" to="false" /> - <set id="plotoptions.default_main" to=""Weibull""/> + <script><![CDATA[ + gui.setValue ("plotoptions.default_main", i18n ("Weibull")); + ]]></script> </logic> <dialog label="Central Limit Theorem: Weibull to Normal" > <insert snippet="clt_layout"/> diff --git a/rkward/plugins/distributions/clt/plot_wilcoxon_clt.xml b/rkward/plugins/distributions/clt/plot_wilcoxon_clt.xml index acf4fe5..a3715f4 100644 --- a/rkward/plugins/distributions/clt/plot_wilcoxon_clt.xml +++ b/rkward/plugins/distributions/clt/plot_wilcoxon_clt.xml @@ -14,7 +14,9 @@ <logic> <insert snippet="clt_logic"/> <set id="dist_stepfun.default_verticals" to="false" /> - <set id="plotoptions.default_main" to=""Wilcoxon""/> + <script><![CDATA[ + gui.setValue ("plotoptions.default_main", i18n ("Wilcoxon")); + ]]></script> </logic> <dialog label="Central Limit Theorem: Wilcoxon to Normal" > <insert snippet="clt_layout"/> |
From: Thomas F. <tho...@ru...> - 2015-01-30 17:12:57
|
Git commit ab00912206543c498a78b908c935a9d2783c3183 by Thomas Friedrichsmeier. Committed on 30/01/2015 at 17:11. Pushed by tfry into branch 'master'. Work around some encoding problems while extracting messages. Give distributions.pluginmap a po_id. Do _not_ extract it, yet, as there are some problems remaining. M +1 -1 rkward/plugins/distributions.pluginmap M +5 -1 scripts/update_plugin_messages.py http://commits.kde.org/rkward/ab00912206543c498a78b908c935a9d2783c3183 diff --git a/rkward/plugins/distributions.pluginmap b/rkward/plugins/distributions.pluginmap index 4a19ead..f0b1fc7 100644 --- a/rkward/plugins/distributions.pluginmap +++ b/rkward/plugins/distributions.pluginmap @@ -1,6 +1,6 @@ <!DOCTYPE rkpluginmap> -<document base_prefix="distributions/" namespace="rkward" id="distributions"> +<document base_prefix="distributions/" namespace="rkward" id="distributions" po_id="distributions"> <include file="pluginmap_meta.inc"/> <about name="Distributions" diff --git a/scripts/update_plugin_messages.py b/scripts/update_plugin_messages.py index 01d8abb..8440893 100755 --- a/scripts/update_plugin_messages.py +++ b/scripts/update_plugin_messages.py @@ -100,7 +100,7 @@ def parseFile (filename): f.close () try: - return minidom.parseString (content) + return minidom.parseString (content.encode ('utf-8')) except: sys.stderr.write ("ERROR: Failed to parse file " + filename + "\n") raise @@ -145,6 +145,10 @@ def writeouti18n (call): outfile.write (call + "\n") def quote (text): + try: + text = text.decode ('utf-8', 'ignore') + except: + print ("Python has trouble decoding this text: " + text) text = HTMLParser.HTMLParser ().unescape (text) # unescape character entities, Qt does so while parsing the xml return "\"" + text.replace ("\\", "\\\\").replace ("\"", "\\\"") + "\"" |
From: Thomas F. <tho...@ru...> - 2015-01-30 12:28:06
|
Git commit 9f440e0a863ddf442f9ad60394e50c721872b6c8 by Thomas Friedrichsmeier. Committed on 30/01/2015 at 12:26. Pushed by tfry into branch 'master'. Add i18n to distribution plots. Also refactor some of the underlying code. M +7 -10 rkward/plugins/distributions/plot_beta_distribution.js M +6 -9 rkward/plugins/distributions/plot_binomial_distribution.js M +6 -9 rkward/plugins/distributions/plot_cauchy_distribution.js M +6 -9 rkward/plugins/distributions/plot_chi_squared_distribution.js M +23 -29 rkward/plugins/distributions/plot_dist_common.js M +5 -8 rkward/plugins/distributions/plot_exponential_distribution.js M +7 -10 rkward/plugins/distributions/plot_f_distribution.js M +6 -9 rkward/plugins/distributions/plot_gamma_distribution.js M +5 -8 rkward/plugins/distributions/plot_geometric_distribution.js M +7 -10 rkward/plugins/distributions/plot_hypergeometric_distribution.js M +6 -9 rkward/plugins/distributions/plot_logistic_distribution.js M +6 -9 rkward/plugins/distributions/plot_lognormal_distribution.js M +10 -29 rkward/plugins/distributions/plot_negbinomial_distribution.js M +6 -9 rkward/plugins/distributions/plot_normal_distribution.js M +5 -8 rkward/plugins/distributions/plot_poisson_distribution.js M +6 -9 rkward/plugins/distributions/plot_t_distribution.js M +6 -10 rkward/plugins/distributions/plot_tukey_distribution.js M +2 -3 rkward/plugins/distributions/plot_tukey_distribution.rkh M +2 -3 rkward/plugins/distributions/plot_tukey_distribution.xml M +6 -9 rkward/plugins/distributions/plot_uniform_distribution.js M +6 -9 rkward/plugins/distributions/plot_weibull_distribution.js M +6 -9 rkward/plugins/distributions/plot_wilcoxon_distribution.js M +1 -1 tests/distributions.R M +10 -2 tests/distributions/plot_beta_distribution.rkcommands.R M +5 -5 tests/distributions/plot_beta_distribution.rkout M +6 -1 tests/distributions/plot_binomial_distribution.rkcommands.R M +1 -1 tests/distributions/plot_binomial_distribution.rkout M +7 -1 tests/distributions/plot_cauchy_distribution.rkcommands.R M +1 -1 tests/distributions/plot_cauchy_distribution.rkout M +7 -1 tests/distributions/plot_chi_squared_distribution.rkcommands.R M +2 -2 tests/distributions/plot_chi_squared_distribution.rkout M +7 -1 tests/distributions/plot_exponential_distribution.rkcommands.R M +2 -2 tests/distributions/plot_exponential_distribution.rkout M +8 -1 tests/distributions/plot_f_distribution.rkcommands.R M +2 -2 tests/distributions/plot_f_distribution.rkout M +7 -1 tests/distributions/plot_gamma_distribution.rkcommands.R M +2 -2 tests/distributions/plot_gamma_distribution.rkout M +5 -1 tests/distributions/plot_geometric_distribution.rkcommands.R M +1 -1 tests/distributions/plot_geometric_distribution.rkout M +8 -1 tests/distributions/plot_hypergeometric_distribution.rkcommands.R M +6 -6 tests/distributions/plot_hypergeometric_distribution.rkout M +8 -1 tests/distributions/plot_log_normal_distribution.rkcommands.R M +3 -3 tests/distributions/plot_log_normal_distribution.rkout M +7 -1 tests/distributions/plot_logistic_distribution.rkcommands.R M +1 -1 tests/distributions/plot_logistic_distribution.rkout M +6 -1 tests/distributions/plot_negbinomial_distribution.rkcommands.R M +3 -3 tests/distributions/plot_negbinomial_distribution.rkout M +7 -1 tests/distributions/plot_normal_distribution.rkcommands.R M +2 -2 tests/distributions/plot_normal_distribution.rkout M +5 -1 tests/distributions/plot_poisson_distribution.rkcommands.R M +1 -1 tests/distributions/plot_poisson_distribution.rkout M +8 -1 tests/distributions/plot_t_distribution.rkcommands.R M +5 -5 tests/distributions/plot_t_distribution.rkout M +9 -2 tests/distributions/plot_tukey_distribution.rkcommands.R M +5 -6 tests/distributions/plot_tukey_distribution.rkout M +7 -1 tests/distributions/plot_uniform_distribution.rkcommands.R M +1 -1 tests/distributions/plot_uniform_distribution.rkout M +7 -1 tests/distributions/plot_weibull_distribution.rkcommands.R M +1 -1 tests/distributions/plot_weibull_distribution.rkout M +6 -1 tests/distributions/plot_wilcoxon_distribution.rkcommands.R M +5 -5 tests/distributions/plot_wilcoxon_distribution.rkout http://commits.kde.org/rkward/9f440e0a863ddf442f9ad60394e50c721872b6c8 diff --git a/rkward/plugins/distributions/plot_beta_distribution.js b/rkward/plugins/distributions/plot_beta_distribution.js index 2c8907d..62379d9 100644 --- a/rkward/plugins/distributions/plot_beta_distribution.js +++ b/rkward/plugins/distributions/plot_beta_distribution.js @@ -4,11 +4,10 @@ var options; include ('plot_dist_common.js'); function getParameters () { - options['a'] = getValue ("a"); - options['b'] = getValue ("b"); - options['ncp'] = getValue ("ncp"); + options['args'] = ', shape1=' + getString ('a') + ', shape2=' + getString ('b') + ', ncp=' + getString ('ncp'); getContRangeParameters (); + options['distname'] = i18nc ("Beta distribution", noquote ("Beta")); if (options['is_density']) { options['fun'] = "dbeta"; } else { @@ -16,11 +15,9 @@ function getParameters () { } } -function doHeader () { - echo ('rk.header ("Beta ' + options['label'] + ' function", list ("Number of Observations", "' + options['n'] + '", "Lower quantile", "' + options['min'] + '", "Upper quantile", "' + options['max'] + '", "Shape1", "' + options['a'] + '", "Shape2", "' + options['b'] + '", "Non-centrality parameter", "' + options['ncp'] + '"' + options['log_label'] + options['tail_label'] + ', "Function", "' + options['fun'] + '"));' + "\n"); +function addParamsToHeader (header) { + header.addFromUI ("a"); + header.addFromUI ("b"); + header.addFromUI ("ncp"); + return header; } - -function doFunCall () { - echo (options['fun'] + '(x, shape1=' + options['a'] + ', shape2=' + options['b'] + ', ncp=' + options['ncp'] + options['log_option'] + options['tail_option'] + ')'); -} - diff --git a/rkward/plugins/distributions/plot_binomial_distribution.js b/rkward/plugins/distributions/plot_binomial_distribution.js index af367a5..e8edf42 100644 --- a/rkward/plugins/distributions/plot_binomial_distribution.js +++ b/rkward/plugins/distributions/plot_binomial_distribution.js @@ -4,10 +4,10 @@ var options; include ('plot_dist_common.js'); function getParameters () { - options['size'] = getValue ("size"); - options['prob'] = getValue ("prob"); + options['args'] = ', size=' + getString ('size') + ', prob=' + getString ('prob'); getDiscontRangeParameters(); + options['distname'] = i18nc ("Binomial distribution", noquote ("Binomial")); if (options['is_density']) { options['fun'] = "dbinom"; } else { @@ -15,11 +15,8 @@ function getParameters () { } } -function doHeader () { - echo ('rk.header ("Binomial ' + options['label'] + ' function", list ("Lower quantile", "' + options['min'] + '", "Upper quantile", "' + options['max'] + '", "Number of trials", "' + options['size'] + '", "Probability of success on each trial", "' + options['prob'] + '"' + options['log_label'] + options['tail_label'] + ', "Function", "' + options['fun'] + '"));' + "\n"); +function addParamsToHeader (header) { + header.addFromUI ("size"); + header.addFromUI ("prob"); + return header; } - -function doFunCall () { - echo (options['fun'] + '(x, size=' + options['size'] + ', prob=' + options['prob'] + options['log_option'] + options['tail_option'] + ')'); -} - diff --git a/rkward/plugins/distributions/plot_cauchy_distribution.js b/rkward/plugins/distributions/plot_cauchy_distribution.js index b823dbb..3241ed0 100644 --- a/rkward/plugins/distributions/plot_cauchy_distribution.js +++ b/rkward/plugins/distributions/plot_cauchy_distribution.js @@ -4,10 +4,10 @@ var options; include ('plot_dist_common.js'); function getParameters () { - options['loc'] = getValue ("loc"); - options['scale'] = getValue ("scale"); + options['args'] = ', location=' + getString ("loc") + ', scale=' + getString ("scale"); getContRangeParameters (); + options['distname'] = i18nc ("Cauchy distribution", noquote ("Cauchy")); if (options['is_density']) { options['fun'] = "dcauchy"; } else { @@ -15,11 +15,8 @@ function getParameters () { } } -function doHeader () { - echo ('rk.header ("Cauchy ' + options['label'] + ' function", list ("Number of Observations", "' + options['n'] + '", "Lower quantile", "' + options['min'] + '", "Upper quantile", "' + options['max'] + '", "Location", "' + options['loc'] + '", "Scale", "' + options['scale'] + '"' + options['log_label'] + options['tail_label'] + ', "Function", "' + options['fun'] + '"));' + "\n"); +function addParamsToHeader (header) { + header.addFromUI ("loc"); + header.addFromUI ("scale"); + return header; } - -function doFunCall () { - echo (options['fun'] + '(x, location=' + options['loc'] + ', scale=' + options['scale'] + options['log_option'] + options['tail_option'] + ')'); -} - diff --git a/rkward/plugins/distributions/plot_chi_squared_distribution.js b/rkward/plugins/distributions/plot_chi_squared_distribution.js index 38297ad..fd72d05 100644 --- a/rkward/plugins/distributions/plot_chi_squared_distribution.js +++ b/rkward/plugins/distributions/plot_chi_squared_distribution.js @@ -4,10 +4,10 @@ var options; include ('plot_dist_common.js'); function getParameters () { - options['df'] = getValue ("df"); - options['ncp'] = getValue ("ncp"); + options['args'] = ', df=' + getString ("df") + ', ncp=' + getString ("ncp"); getContRangeParameters (); + options['distname'] = i18nc ("Chi-square distribution", noquote ("Chi-square")); if (options['is_density']) { options['fun'] = "dchisq"; } else { @@ -15,11 +15,8 @@ function getParameters () { } } -function doHeader () { - echo ('rk.header ("Chisquare ' + options['label'] + ' function", list ("Number of Observations", "' + options['n'] + '", "Lower quantile", "' + options['min'] + '", "Upper quantile", "' + options['max'] + '", "Degrees of freedom", "' + options['df'] + '", "Non-centrality parameter", "' + options['ncp'] + '"' + options['log_label'] + options['tail_label'] + ', "Function", "' + options['fun'] + '"));' + "\n"); +function addParamsToHeader (header) { + header.addFromUI ("df"); + header.addFromUI ("ncp"); + return header; } - -function doFunCall () { - echo (options['fun'] + '(x, df=' + options['df'] + ', ncp=' + options['ncp'] + options['log_option'] + options['tail_option'] + ')'); -} - diff --git a/rkward/plugins/distributions/plot_dist_common.js b/rkward/plugins/distributions/plot_dist_common.js index 9d7c2fd..d8c0245 100644 --- a/rkward/plugins/distributions/plot_dist_common.js +++ b/rkward/plugins/distributions/plot_dist_common.js @@ -16,6 +16,7 @@ function getContRangeParameters () { options['n'] = getValue ("n"); options['min'] = getValue ("min"); options['max'] = getValue ("max"); + options['cont'] = true; } // get the range parameters for the discontinuous distributions (it's all the same for these) @@ -23,51 +24,45 @@ function getDiscontRangeParameters () { options['min'] = getValue ("min"); options['max'] = getValue ("max"); options['n'] = options['max'] - options['min'] + 1; + options['cont'] = false; } function doPrintout (full) { - var fun = getValue ("function"); - var _log = (getValue ("log") == 1); + var fun = getString ("function"); + var _log = getBoolean ("log.state"); - var is_density = ""; - var label = ""; - var tail_option = ""; - var tail_label = ""; - var log_option = ""; + var is_density = false; + var params = ""; if (fun == "d") { is_density = true; - label = "density"; - tail_option = ""; - tail_label = ""; - if (_log) log_option = ", log=TRUE"; + if (_log) params += ", log=TRUE"; } else { - is_density = false; label = "distribution"; - if (getValue("lower") == "1") { - tail_option = ", lower.tail = TRUE"; - tail_label = ", \"Tail\",\"Lower\""; + if (getBoolean ("lower.state")) { + params += ", lower.tail = TRUE"; } else { - tail_option = ", lower.tail = FALSE"; - tail_label = ", \"Tail\",\"Upper\""; + params += ", lower.tail = FALSE"; } - if (_log) log_option = ", log.p=TRUE"; + if (_log) params += ", log.p=TRUE"; } - var log_label = ', "Scale", "normal"'; - if (_log) log_label = ', "Scale", "logarithmic"'; - options = new Array(); options['is_density'] = is_density; - options['label'] = label; - options['tail_option'] = tail_option; - options['tail_label'] = tail_label; - options['log_option'] = log_option; - options['log_label'] = log_label; getParameters (); if (full) { - doHeader (); + var header = new Header (options['is_density'] ? i18nc ("[Some distribution] density function", "%1 density function", options['distname']) : i18nc ("[Some distribution] distribution function", "%1 distribution function", options['distname'])); + if (options['cont']) header.addFromUI ('n'); + header.addFromUI ('min'); + header.addFromUI ('max'); + header = addParamsToHeader (header); + if (!options['is_density']) { + header.add (i18nc ("Tail of distribution function: lower / upper", 'Tail'), getBoolean ("lower.state") ? i18n ('Lower tail: P[X ≤ x]') : i18n ('Upper tail: P[X > x]')) + } + header.addFromUI ("log"); + header.add (i18n ("Function"), options['fun']); + header.print (); echo ('\n'); echo ('rk.graph.on ()\n'); } @@ -76,7 +71,7 @@ function doPrintout (full) { printIndentedUnlessEmpty ("\t", getValue ("plotoptions.code.preprocess"), '', '\n'); echo (' curve ('); - doFunCall (); + echo (options['fun'] + '(x' + options['args'] + params + ')'); echo (', from=' + options['min'] + ', to=' + options['max'] + ', n=' + options['n'] + getValue ("plotoptions.code.printout") + ')\n'); printIndentedUnlessEmpty ("\t", getValue ("plotoptions.code.calculate"), '\n', ''); @@ -85,4 +80,3 @@ function doPrintout (full) { echo ('rk.graph.off ()\n'); } } - diff --git a/rkward/plugins/distributions/plot_exponential_distribution.js b/rkward/plugins/distributions/plot_exponential_distribution.js index 02c30a0..8db2217 100644 --- a/rkward/plugins/distributions/plot_exponential_distribution.js +++ b/rkward/plugins/distributions/plot_exponential_distribution.js @@ -4,9 +4,10 @@ var options; include ('plot_dist_common.js'); function getParameters () { - options['rate'] = getValue ("rate"); + options['args'] = ', rate=' + getString ("rate"); getContRangeParameters (); + options['distname'] = i18nc ("Exponential distribution", noquote ("Exponential")); if (options['is_density']) { options['fun'] = "dexp"; } else { @@ -14,11 +15,7 @@ function getParameters () { } } -function doHeader () { - echo ('rk.header ("Exponential ' + options['label'] + ' function", list ("Number of Observations", "' + options['n'] + '", "Lower quantile", "' + options['min'] + '", "Upper quantile", "' + options['max'] + '", "Rate", "' + options['rate'] + '"' + options['log_label'] + options['tail_label'] + ', "Function", "' + options['fun'] + '"));' + "\n"); +function addParamsToHeader (header) { + header.addFromUI ("rate"); + return header; } - -function doFunCall () { - echo (options['fun'] + '(x, rate=' + options['rate'] + options['log_option'] + options['tail_option'] + ')'); -} - diff --git a/rkward/plugins/distributions/plot_f_distribution.js b/rkward/plugins/distributions/plot_f_distribution.js index fc1c055..69e98a3 100644 --- a/rkward/plugins/distributions/plot_f_distribution.js +++ b/rkward/plugins/distributions/plot_f_distribution.js @@ -4,11 +4,10 @@ var options; include ('plot_dist_common.js'); function getParameters () { - options['df1'] = getValue ("df1"); - options['df2'] = getValue ("df2"); - options['ncp'] = getValue ("ncp"); + options['args'] = ', df1=' + getString ("df1") + ', df2=' + getString ("df2") + ', ncp=' + getString ("ncp"); getContRangeParameters (); + options['distname'] = i18nc ("F distribution", noquote ("F")); if (options['is_density']) { options['fun'] = "df"; } else { @@ -16,11 +15,9 @@ function getParameters () { } } -function doHeader () { - echo ('rk.header ("F ' + options['label'] + ' function", list ("Number of Observations", "' + options['n'] + '", "Lower quantile", "' + options['min'] + '", "Upper quantile", "' + options['max'] + '", "Numerator degrees of freedom", "' + options['df1'] + '", "Denominator degrees of freedom", "' + options['df2'] + '", "Non-centrality", "' + options['ncp'] + '"' + options['log_label'] + options['tail_label'] + ', "Function", "' + options['fun'] + '"));' + "\n"); +function addParamsToHeader (header) { + header.addFromUI ("df1"); + header.addFromUI ("df2"); + header.addFromUI ("ncp"); + return header; } - -function doFunCall () { - echo (options['fun'] + '(x, df1=' + options['df1'] + ', df2=' + options['df2'] + ', ncp=' + options['ncp'] + options['log_option'] + options['tail_option'] + ')'); -} - diff --git a/rkward/plugins/distributions/plot_gamma_distribution.js b/rkward/plugins/distributions/plot_gamma_distribution.js index 43e7cc7..a233aaa 100644 --- a/rkward/plugins/distributions/plot_gamma_distribution.js +++ b/rkward/plugins/distributions/plot_gamma_distribution.js @@ -4,10 +4,10 @@ var options; include ('plot_dist_common.js'); function getParameters () { - options['shape'] = getValue ("shape"); - options['rate'] = getValue ("rate"); + options['args'] = ', shape=' + getString ("shape") + ', rate=' + getString ("rate"); getContRangeParameters (); + options['distname'] = i18nc ("Gamma distribution", noquote ("Gamma")); if (options['is_density']) { options['fun'] = "dgamma"; } else { @@ -15,11 +15,8 @@ function getParameters () { } } -function doHeader () { - echo ('rk.header ("Gamma ' + options['label'] + ' function", list ("Number of Observations", "' + options['n'] + '", "Lower quantile", "' + options['min'] + '", "Upper quantile", "' + options['max'] + '", "Shape", "' + options['shape'] + '", "Rate", "' + options['rate'] + '"' + options['log_label'] + options['tail_label'] + ', "Function", "' + options['fun'] + '"));' + "\n"); +function addParamsToHeader (header) { + header.addFromUI ("shape"); + header.addFromUI ("rate"); + return header; } - -function doFunCall () { - echo (options['fun'] + '(x, shape=' + options['shape'] + ', rate=' + options['rate'] + options['log_option'] + options['tail_option'] + ')'); -} - diff --git a/rkward/plugins/distributions/plot_geometric_distribution.js b/rkward/plugins/distributions/plot_geometric_distribution.js index d95088e..d9587ac 100644 --- a/rkward/plugins/distributions/plot_geometric_distribution.js +++ b/rkward/plugins/distributions/plot_geometric_distribution.js @@ -4,9 +4,10 @@ var options; include ('plot_dist_common.js'); function getParameters () { - options['prob'] = getValue ("prob"); + options['args'] = ', prob=' + getString ("prob"); getDiscontRangeParameters(); + options['distname'] = i18nc ("Geometric distribution", noquote ("Geometric")); if (options['is_density']) { options['fun'] = "dgeom"; } else { @@ -14,11 +15,7 @@ function getParameters () { } } -function doHeader () { - echo ('rk.header ("Geometric ' + options['label'] + ' function", list ("Lower quantile", "' + options['min'] + '", "Upper quantile", "' + options['max'] + '", "Probability of success on each trial", "' + options['prob'] + '"' + options['log_label'] + options['tail_label'] + ', "Function", "' + options['fun'] + '"));' + "\n"); +function addParamsToHeader (header) { + header.addFromUI ("prob"); + return header; } - -function doFunCall () { - echo (options['fun'] + '(x, prob=' + options['prob'] + options['log_option'] + options['tail_option'] + ')'); -} - diff --git a/rkward/plugins/distributions/plot_hypergeometric_distribution.js b/rkward/plugins/distributions/plot_hypergeometric_distribution.js index 215242e..d1bd4d5 100644 --- a/rkward/plugins/distributions/plot_hypergeometric_distribution.js +++ b/rkward/plugins/distributions/plot_hypergeometric_distribution.js @@ -4,11 +4,10 @@ var options; include ('plot_dist_common.js'); function getParameters () { - options['n_val'] = getValue ("n_val"); - options['m'] = getValue ("m"); - options['k'] = getValue ("k"); + options['args'] = ', m=' + getString ("m") + ', n=' + getString ("n_val") + ', k=' + getString ("k"); getDiscontRangeParameters(); + options['distname'] = i18nc ("Hypergeometric distribution", noquote ("Hypergeometric")); if (options['is_density']) { options['fun'] = "dhyper"; } else { @@ -16,11 +15,9 @@ function getParameters () { } } -function doHeader () { - echo ('rk.header ("Hypergeometric ' + options['label'] + ' function", list ("Lower quantile", "' + options['min'] + '", "Upper quantile", "' + options['max'] + '", "Number of white balls", "' + options['m'] + '", "Number of black balls", "' + options['n_val'] + '", "Number of balls drawn", "' + options['k'] + '"' + options['log_label'] + options['tail_label'] + ', "Function", "' + options['fun'] + '"));' + "\n"); +function addParamsToHeader (header) { + header.addFromUI ("m"); + header.addFromUI ("n_val"); + header.addFromUI ("k"); + return header; } - -function doFunCall () { - echo (options['fun'] + '(x, m=' + options['m'] + ', n=' + options['n_val'] + ', k=' + options['k'] + options['log_option'] + options['tail_option'] + ')'); -} - diff --git a/rkward/plugins/distributions/plot_logistic_distribution.js b/rkward/plugins/distributions/plot_logistic_distribution.js index 5e932c1..dae57b4 100644 --- a/rkward/plugins/distributions/plot_logistic_distribution.js +++ b/rkward/plugins/distributions/plot_logistic_distribution.js @@ -4,10 +4,10 @@ var options; include ('plot_dist_common.js'); function getParameters () { - options['loc'] = getValue ("loc"); - options['scale'] = getValue ("scale"); + options['args'] = ', location=' + getString ("loc") + ', scale=' + getString ("scale"); getContRangeParameters (); + options['distname'] = i18nc ("Logistic distribution", noquote ("Logistic")); if (options['is_density']) { options['fun'] = "dlogis"; } else { @@ -15,11 +15,8 @@ function getParameters () { } } -function doHeader () { - echo ('rk.header ("Logistic ' + options['label'] + ' function", list ("Number of Observations", "' + options['n'] + '", "Lower quantile", "' + options['min'] + '", "Upper quantile", "' + options['max'] + '", "Location", "' + options['loc'] + '", "Scale", "' + options['scale'] + '"' + options['log_label'] + options['tail_label'] + ', "Function", "' + options['fun'] + '"));' + "\n"); +function addParamsToHeader (header) { + header.addFromUI ("loc"); + header.addFromUI ("scale"); + return header; } - -function doFunCall () { - echo (options['fun'] + '(x, location=' + options['loc'] + ', scale=' + options['scale'] + options['log_option'] + options['tail_option'] + ')'); -} - diff --git a/rkward/plugins/distributions/plot_lognormal_distribution.js b/rkward/plugins/distributions/plot_lognormal_distribution.js index 63eebee..fe9496f 100644 --- a/rkward/plugins/distributions/plot_lognormal_distribution.js +++ b/rkward/plugins/distributions/plot_lognormal_distribution.js @@ -4,10 +4,10 @@ var options; include ('plot_dist_common.js'); function getParameters () { - options['sd'] = getValue ("sd"); - options['mean'] = getValue ("mean"); + options['args'] = ', meanlog=' + getString ("mean") + ', sdlog=' + getString ("sd"); getContRangeParameters (); + options['distname'] = i18nc ("Log-Normal distribution", noquote ("Log-Normal")); if (options['is_density']) { options['fun'] = "dlnorm"; } else { @@ -15,11 +15,8 @@ function getParameters () { } } -function doHeader () { - echo ('rk.header ("Lognormal ' + options['label'] + ' function", list ("Number of Observations", "' + options['n'] + '", "Lower quantile", "' + options['min'] + '", "Upper quantile", "' + options['max'] + '", "Mean", "' + options['mean'] + '", "Standard deviation", "' + options['sd'] + '"' + options['log_label'] + options['tail_label'] + ', "Function", "' + options['fun'] + '"));' + "\n"); +function addParamsToHeader (header) { + header.addFromUI ("mean"); + header.addFromUI ("sd"); + return header; } - -function doFunCall () { - echo (options['fun'] + '(x, meanlog=' + options['mean'] + ', sdlog=' + options['sd'] + options['log_option'] + options['tail_option'] + ')'); -} - diff --git a/rkward/plugins/distributions/plot_negbinomial_distribution.js b/rkward/plugins/distributions/plot_negbinomial_distribution.js index d4f9670..9919b3a 100644 --- a/rkward/plugins/distributions/plot_negbinomial_distribution.js +++ b/rkward/plugins/distributions/plot_negbinomial_distribution.js @@ -4,33 +4,16 @@ var options; include ('plot_dist_common.js'); function getParameters () { - var size = ""; - var size_label = ""; - var paramTag = ""; - var paramVal = ""; - var paramLabel = ""; if (getValue ("param") == "pprob") { - size = getValue ("size_trial"); - size_label = "Target for number of successful trials"; - paramTag = ", prob="; - paramVal = getValue ("prob"); - paramLabel = "Probability of success in each trial"; + options['args'] = ', size=' + getString ("size_trial") + ', prob=' + getString ("prob"); + options['header_adds'] = ["size_trial", "prob"]; } else { - size = getValue ("size_disp"); - size_label = "Dispersion (size)"; - paramTag = ", mu="; - paramVal = getValue ("mu"); - paramLabel = "Alternative parameter, mu"; + options['args'] = ', size=' + getString ("size_disp") + ', mu=' + getString ("mu"); + options['header_adds'] = ["size_disp", "mu"]; } - - options['size'] = size; - options['size_label'] = size_label; - options['param_tag'] = paramTag; - options['param_val'] = paramVal; - options['param_label'] = paramLabel; - options['prob'] = getValue ("prob"); getDiscontRangeParameters(); + options['distname'] = i18nc ("Negative Binomial distribution", noquote ("Negative Binomial")); if (options['is_density']) { options['fun'] = "dnbinom"; } else { @@ -38,11 +21,9 @@ function getParameters () { } } -function doHeader () { - echo ('rk.header ("Negative Binomial ' + options['label'] + ' function", list ("Lower quantile", "' + options['min'] + '", "Upper quantile", "' + options['max'] + '", "' + options['size_label'] + '", "' + options['size'] + '", "' + options['param_label'] + '", "' + options['param_val'] + '"' + options['log_label'] + options['tail_label'] + ', "Function", "' + options['fun'] + '"));' + "\n"); -} - -function doFunCall () { - echo (options['fun'] + '(x, size=' + options['size'] + options['param_tag'] + options['param_val'] + options['log_option'] + options['tail_option'] + ')'); +function addParamsToHeader (header) { + for (var i = 0; i < options['header_adds'].length; ++i) { + header.addFromUI (options['header_adds'][i]); + } + return header; } - diff --git a/rkward/plugins/distributions/plot_normal_distribution.js b/rkward/plugins/distributions/plot_normal_distribution.js index 0f59628..d6f0baf 100644 --- a/rkward/plugins/distributions/plot_normal_distribution.js +++ b/rkward/plugins/distributions/plot_normal_distribution.js @@ -4,10 +4,10 @@ var options; include ('plot_dist_common.js'); function getParameters () { - options['mean'] = getValue ("mean"); - options['sd'] = getValue ("sd"); + options['args'] = ', mean=' + getString ("mean") + ', sd=' + getString ("sd"); getContRangeParameters (); + options['distname'] = i18nc ("Normal distribution", noquote ("Normal")); if (options['is_density']) { options['fun'] = "dnorm"; } else { @@ -15,11 +15,8 @@ function getParameters () { } } -function doHeader () { - echo ('rk.header ("Normal ' + options['label'] + ' function", list ("Number of Observations", "' + options['n'] + '", "Lower quantile", "' + options['min'] + '", "Upper quantile", "' + options['max'] + '", "Mean", "' + options['mean'] + '", "Standard Deviation", "' + options['sd'] + '"' + options['log_label'] + options['tail_label'] + ', "Function", "' + options['fun'] + '"));' + "\n"); +function addParamsToHeader (header) { + header.addFromUI ("mean"); + header.addFromUI ("sd"); + return header; } - -function doFunCall () { - echo (options['fun'] + '(x, mean=' + options['mean'] + ', sd=' + options['sd'] + options['log_option'] + options['tail_option'] + ')'); -} - diff --git a/rkward/plugins/distributions/plot_poisson_distribution.js b/rkward/plugins/distributions/plot_poisson_distribution.js index 846be62..a7efb18 100644 --- a/rkward/plugins/distributions/plot_poisson_distribution.js +++ b/rkward/plugins/distributions/plot_poisson_distribution.js @@ -4,9 +4,10 @@ var options; include ('plot_dist_common.js'); function getParameters () { - options['mean'] = getValue ("mean"); + options['args'] = ', lambda=' + getString ("mean"); getDiscontRangeParameters(); + options['distname'] = i18nc ("Poisson distribution", noquote ("Poisson")); if (options['is_density']) { options['fun'] = "dpois"; } else { @@ -14,11 +15,7 @@ function getParameters () { } } -function doHeader () { - echo ('rk.header ("Poisson ' + options['label'] + ' function", list ("Lower quantile", "' + options['min'] + '", "Upper quantile", "' + options['max'] + '", "Mean", "' + options['mean'] + '"' + options['log_label'] + options['tail_label'] + ', "Function", "' + options['fun'] + '"));' + "\n"); +function addParamsToHeader (header) { + header.addFromUI ("mean"); + return header; } - -function doFunCall () { - echo (options['fun'] + '(x, lambda=' + options['mean'] + options['log_option'] + options['tail_option'] + ')'); -} - diff --git a/rkward/plugins/distributions/plot_t_distribution.js b/rkward/plugins/distributions/plot_t_distribution.js index 9756cdd..e16ddac 100644 --- a/rkward/plugins/distributions/plot_t_distribution.js +++ b/rkward/plugins/distributions/plot_t_distribution.js @@ -4,10 +4,10 @@ var options; include ('plot_dist_common.js'); function getParameters () { - options['ncp'] = getValue ("ncp"); - options['df'] = getValue ("df"); + options['args'] = ', df=' + getString ("df") + ', ncp=' + getString ("ncp"); getContRangeParameters (); + options['distname'] = i18nc ("t distribution", noquote ("Student t")); if (options['is_density']) { options['fun'] = "dt"; } else { @@ -15,11 +15,8 @@ function getParameters () { } } -function doHeader () { - echo ('rk.header ("Student t ' + options['label'] + ' function", list ("Number of Observations", "' + options['n'] + '", "Minimum", "' + options['min'] + '", "Maximum", "' + options['max'] + '", "Degrees of freedom", "' + options['df'] + '", "Non-centrality", "' + options['ncp'] + '"' + options['log_label'] + options['tail_label'] + ', "Function", "' + options['fun'] + '"));' + "\n"); +function addParamsToHeader (header) { + header.addFromUI ("df"); + header.addFromUI ("ncp"); + return header; } - -function doFunCall () { - echo (options['fun'] + '(x, df=' + options['df'] + ', ncp=' + options['ncp'] + options['log_option'] + options['tail_option'] + ')'); -} - diff --git a/rkward/plugins/distributions/plot_tukey_distribution.js b/rkward/plugins/distributions/plot_tukey_distribution.js index 4063eba..9a2abe6 100644 --- a/rkward/plugins/distributions/plot_tukey_distribution.js +++ b/rkward/plugins/distributions/plot_tukey_distribution.js @@ -4,11 +4,10 @@ var options; include ('plot_dist_common.js'); function getParameters () { - options['df'] = getValue ("df"); - options['nmeans'] = getValue ("nmeans"); - options['nranges'] = getValue ("nranges"); + options['args'] = ', nmeans=' + getString ("nmeans") + ', df=' + getString ("df"); getContRangeParameters (); + options['distname'] = i18nc ("Tukey distribution", noquote ("Studentized Range (Tukey)")); if (options['is_density']) { // actually, this can never happen in this case, but we add it here, for consistency with the other plugins options['fun'] = "dtukey"; @@ -17,11 +16,8 @@ function getParameters () { } } -function doHeader () { - echo ('rk.header ("Tukey ' + options['label'] + ' function", list ("Number of Observations", "' + options['n'] + '", "Lower quantile", "' + options['min'] + '", "Upper quantile", "' + options['max'] + '", "Sample size for range", "' + options['nmeans'] + '", "Degreed of freedom for s", "' + options['df'] + '", "Number of groups", "' + options['nranges'] + '"' + options['log_label'] + options['tail_label'] + ', "Function", "' + options['fun'] + '"));' + "\n"); +function addParamsToHeader (header) { + header.addFromUI ("nmeans"); + header.addFromUI ("df"); + return header; } - -function doFunCall () { - echo (options['fun'] + '(x, nmeans=' + options['nmeans'] + ', df=' + options['df'] + ', nranges=' + options['nranges'] + options['log_option'] + options['tail_option'] + ')'); -} - diff --git a/rkward/plugins/distributions/plot_tukey_distribution.rkh b/rkward/plugins/distributions/plot_tukey_distribution.rkh index 6c58dbd..e1ec55c 100644 --- a/rkward/plugins/distributions/plot_tukey_distribution.rkh +++ b/rkward/plugins/distributions/plot_tukey_distribution.rkh @@ -13,9 +13,8 @@ Distribution function plot for the Studentized Range (Tukey) distribution. <settings> <setting id="function">Only the distribution function can be plotted for the Tukey distribution.</setting> <insert snippet="cont_range_help"/> - <setting id="nmeans">See R reference on Tukey distribution.</setting> - <setting id="df">See R reference on Tukey distribution.</setting> - <setting id="nranges">See R reference on Tukey distribution.</setting> + <setting id="nmeans">Number of independent observations whose range to consider.</setting> + <setting id="df">Degrees of freedom for the (independent sample) estimate of standard deviation.</setting> <insert snippet="common_options_help"/> </settings> diff --git a/rkward/plugins/distributions/plot_tukey_distribution.xml b/rkward/plugins/distributions/plot_tukey_distribution.xml index 13dd945..cdad417 100644 --- a/rkward/plugins/distributions/plot_tukey_distribution.xml +++ b/rkward/plugins/distributions/plot_tukey_distribution.xml @@ -18,9 +18,8 @@ </snippet> <snippet id="dist_options"> <frame label="Parameters"> - <spinbox type="integer" id="nmeans" min="1" initial="6" label="Sample size for range (same for each group)" /> - <spinbox default_precision="2" type="real" id="df" initial="5" min="0" label="Degrees of freedom for s" /> - <spinbox type="integer" id="nranges" min="1" initial="1" label="Number of groups whose maximum range is considered" /> + <spinbox type="integer" id="nmeans" min="1" initial="6" label="Number of observations" /> + <spinbox default_precision="1" type="real" id="df" initial="5" min="0" label="Degrees of freedom for standard deviation estimate" /> </frame> </snippet> <include file="plot_dist_common_snippets.xml"/> diff --git a/rkward/plugins/distributions/plot_uniform_distribution.js b/rkward/plugins/distributions/plot_uniform_distribution.js index 29f5a4d..3ce4226 100644 --- a/rkward/plugins/distributions/plot_uniform_distribution.js +++ b/rkward/plugins/distributions/plot_uniform_distribution.js @@ -4,10 +4,10 @@ var options; include ('plot_dist_common.js'); function getParameters () { - options['llim'] = getValue ("llim"); - options['ulim'] = getValue ("ulim"); + options['args'] = ', min=' + getString ("llim") + ', max=' + getString ("ulim"); getContRangeParameters (); + options['distname'] = i18nc ("Uniform distribution", noquote ("Uniform")); if (options['is_density']) { options['fun'] = "dunif"; } else { @@ -15,11 +15,8 @@ function getParameters () { } } -function doHeader () { - echo ('rk.header ("Uniform ' + options['label'] + ' function", list ("Number of Observations", "' + options['n'] + '", "Lower quantile", "' + options['min'] + '", "Upper quantile", "' + options['max'] + '", "Minimum", "' + options['llim'] + '", "Maximum", "' + options['ulim'] + '"' + options['log_label'] + options['tail_label'] + ', "Function", "' + options['fun'] + '"));' + "\n"); +function addParamsToHeader (header) { + header.addFromUI ("llim"); + header.addFromUI ("ulim"); + return header; } - -function doFunCall () { - echo (options['fun'] + '(x, min=' + options['llim'] + ', max=' + options['ulim'] + options['log_option'] + options['tail_option'] + ')'); -} - diff --git a/rkward/plugins/distributions/plot_weibull_distribution.js b/rkward/plugins/distributions/plot_weibull_distribution.js index 2e2fa71..5eec1cc 100644 --- a/rkward/plugins/distributions/plot_weibull_distribution.js +++ b/rkward/plugins/distributions/plot_weibull_distribution.js @@ -4,10 +4,10 @@ var options; include ('plot_dist_common.js'); function getParameters () { - options['scale'] = getValue ("scale"); - options['shape'] = getValue ("shape"); + options['args'] = ', shape=' + getString ("shape") + ', scale=' + getString ("scale"); getContRangeParameters (); + options['distname'] = i18nc ("Weibull distribution", noquote ("Weibull")); if (options['is_density']) { options['fun'] = "dweibull"; } else { @@ -15,11 +15,8 @@ function getParameters () { } } -function doHeader () { - echo ('rk.header ("Weibull ' + options['label'] + ' function", list ("Number of Observations", "' + options['n'] + '", "Lower quantile", "' + options['min'] + '", "Upper quantile", "' + options['max'] + '", "Shape", "' + options['shape'] + '", "Scale", "' + options['scale'] + '"' + options['log_label'] + options['tail_label'] + ', "Function", "' + options['fun'] + '"));' + "\n"); +function addParamsToHeader (header) { + header.addFromUI ("shape"); + header.addFromUI ("scale"); + return header; } - -function doFunCall () { - echo (options['fun'] + '(x, shape=' + options['shape'] + ', scale=' + options['scale'] + options['log_option'] + options['tail_option'] + ')'); -} - diff --git a/rkward/plugins/distributions/plot_wilcoxon_distribution.js b/rkward/plugins/distributions/plot_wilcoxon_distribution.js index 725acc8..64d70d5 100644 --- a/rkward/plugins/distributions/plot_wilcoxon_distribution.js +++ b/rkward/plugins/distributions/plot_wilcoxon_distribution.js @@ -4,10 +4,10 @@ var options; include ('plot_dist_common.js'); function getParameters () { - options['nm'] = getValue ("nm"); - options['nn'] = getValue ("nn"); + options['args'] = ', m=' + getString ("nm") + ', n=' + getString ("nn"); getDiscontRangeParameters(); + options['distname'] = i18nc ("Wilcoxon Rank Sum distribution", noquote ("Wilcoxon Rank Sum")); if (options['is_density']) { options['fun'] = "dwilcox"; } else { @@ -15,11 +15,8 @@ function getParameters () { } } -function doHeader () { - echo ('rk.header ("Binomial ' + options['label'] + ' function", list ("Lower quantile", "' + options['min'] + '", "Upper quantile", "' + options['max'] + '", "First sample size", "' + options['nm'] + '", "Second sample size", "' + options['nn'] + '"' + options['log_label'] + options['tail_label'] + ', "Function", "' + options['fun'] + '"));' + "\n"); +function addParamsToHeader (header) { + header.addFromUI ("nm"); + header.addFromUI ("nn"); + return header; } - -function doFunCall () { - echo (options['fun'] + '(x, m=' + options['nm'] + ', n=' + options['nn'] + options['log_option'] + options['tail_option'] + ')'); -} - diff --git a/tests/distributions.R b/tests/distributions.R index 2ea6537..29b3cd5 100644 --- a/tests/distributions.R +++ b/tests/distributions.R @@ -135,7 +135,7 @@ suite <- new ("RKTestSuite", id="distributions", rk.call.plugin ("rkward::tukey_probabilities", df.real="5.0", logp.state="0", lower.state="1", mode.string="p", nmeans.real="5.00", q.tsv="", submit.mode="submit") }), new ("RKTest", id="plot_tukey_distribution", call=function () { - rk.call.plugin ("rkward::plot_tukey_distribution", df.real="5.00", log.state="0", lower.state="1", max.real="8.00", min.real="-1.00", n.real="101.00", nmeans.real="6.00", nranges.real="1.00", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", submit.mode="submit") + rk.call.plugin ("rkward::plot_tukey_distribution", df.real="5.00", log.state="0", lower.state="1", max.real="8.00", min.real="-1.00", n.real="101.00", nmeans.real="6.00", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", submit.mode="submit") }), new ("RKTest", id="uniform_probabilities", call=function () { rk.call.plugin ("rkward::uniform_probabilities", logp.state="0", lower.state="1", max.real="1.00", min.real="0.00", mode.string="p", q.tsv="", submit.mode="submit") diff --git a/tests/distributions/plot_beta_distribution.rkcommands.R b/tests/distributions/plot_beta_distribution.rkcommands.R index 511df35..5479d42 100644 --- a/tests/distributions/plot_beta_distribution.rkcommands.R +++ b/tests/distributions/plot_beta_distribution.rkcommands.R @@ -1,10 +1,18 @@ local({ ## Print result -rk.header ("Beta distribution function", list ("Number of Observations", "100", "Lower quantile", "0.00", "Upper quantile", "1.00", "Shape1", "2.00", "Shape2", "2.00", "Non-centrality parameter", "0.00", "Scale", "logarithmic", "Tail","Lower", "Function", "pbeta")); +rk.header ("Beta distribution function", parameters=list("Number of Observations"="100", + "Lower quantile"="0.00", + "Upper quantile"="1.00", + "Shape1 (a)"="2.00", + "Shape2 (b)"="2.00", + "Non-centrality parameter (ncp)"="0.00", + "Tail"="Lower tail: P[X ≤ x]", + "Logarithmic"="yes", + "Function"="pbeta")) rk.graph.on () try ({ - curve (pbeta(x, shape1=2.00, shape2=2.00, ncp=0.00, log.p=TRUE, lower.tail = TRUE), from=0.00, to=1.00, n=100) + curve (pbeta(x, shape1=2.00, shape2=2.00, ncp=0.00, lower.tail = TRUE, log.p=TRUE), from=0.00, to=1.00, n=100) }) rk.graph.off () }) diff --git a/tests/distributions/plot_beta_distribution.rkout b/tests/distributions/plot_beta_distribution.rkout index 3c72f18..2b8d154 100644 --- a/tests/distributions/plot_beta_distribution.rkout +++ b/tests/distributions/plot_beta_distribution.rkout @@ -3,11 +3,11 @@ <ul><li>Number of Observations: 100</li> <li>Lower quantile: 0.00</li> <li>Upper quantile: 1.00</li> -<li>Shape1: 2.00</li> -<li>Shape2: 2.00</li> -<li>Non-centrality parameter: 0.00</li> -<li>Scale: logarithmic</li> -<li>Tail: Lower</li> +<li>Shape1 (a): 2.00</li> +<li>Shape2 (b): 2.00</li> +<li>Non-centrality parameter (ncp): 0.00</li> +<li>Tail: Lower tail: P[X ≤ x]</li> +<li>Logarithmic: yes</li> <li>Function: pbeta</li> </ul> DATE<br /> diff --git a/tests/distributions/plot_binomial_distribution.rkcommands.R b/tests/distributions/plot_binomial_distribution.rkcommands.R index 29f91ce..61f7797 100644 --- a/tests/distributions/plot_binomial_distribution.rkcommands.R +++ b/tests/distributions/plot_binomial_distribution.rkcommands.R @@ -1,6 +1,11 @@ local({ ## Print result -rk.header ("Binomial density function", list ("Lower quantile", "0", "Upper quantile", "12", "Number of trials", "12", "Probability of success on each trial", "0.50", "Scale", "normal", "Function", "dbinom")); +rk.header ("Binomial density function", parameters=list("Lower quantile"="0", + "Upper quantile"="12", + "Number of trials"="12", + "Probability of success on each trial"="0.50", + "Logarithmic"="no", + "Function"="dbinom")) rk.graph.on () try ({ diff --git a/tests/distributions/plot_binomial_distribution.rkout b/tests/distributions/plot_binomial_distribution.rkout index 2eca2ba..55e8eb2 100644 --- a/tests/distributions/plot_binomial_distribution.rkout +++ b/tests/distributions/plot_binomial_distribution.rkout @@ -4,7 +4,7 @@ <li>Upper quantile: 12</li> <li>Number of trials: 12</li> <li>Probability of success on each trial: 0.50</li> -<li>Scale: normal</li> +<li>Logarithmic: no</li> <li>Function: dbinom</li> </ul> DATE<br /> diff --git a/tests/distributions/plot_cauchy_distribution.rkcommands.R b/tests/distributions/plot_cauchy_distribution.rkcommands.R index 23f9cc0..8533e5b 100644 --- a/tests/distributions/plot_cauchy_distribution.rkcommands.R +++ b/tests/distributions/plot_cauchy_distribution.rkcommands.R @@ -1,6 +1,12 @@ local({ ## Print result -rk.header ("Cauchy density function", list ("Number of Observations", "100", "Lower quantile", "-3.29", "Upper quantile", "3.29", "Location", "0.00", "Scale", "1.00", "Scale", "normal", "Function", "dcauchy")); +rk.header ("Cauchy density function", parameters=list("Number of Observations"="100", + "Lower quantile"="-3.29", + "Upper quantile"="3.29", + "Location"="0.00", + "Scale"="1.00", + "Logarithmic"="no", + "Function"="dcauchy")) rk.graph.on () try ({ diff --git a/tests/distributions/plot_cauchy_distribution.rkout b/tests/distributions/plot_cauchy_distribution.rkout index a175489..6df3d52 100644 --- a/tests/distributions/plot_cauchy_distribution.rkout +++ b/tests/distributions/plot_cauchy_distribution.rkout @@ -5,7 +5,7 @@ <li>Upper quantile: 3.29</li> <li>Location: 0.00</li> <li>Scale: 1.00</li> -<li>Scale: normal</li> +<li>Logarithmic: no</li> <li>Function: dcauchy</li> </ul> DATE<br /> diff --git a/tests/distributions/plot_chi_squared_distribution.rkcommands.R b/tests/distributions/plot_chi_squared_distribution.rkcommands.R index a6ee07b..9136a6f 100644 --- a/tests/distributions/plot_chi_squared_distribution.rkcommands.R +++ b/tests/distributions/plot_chi_squared_distribution.rkcommands.R @@ -1,6 +1,12 @@ local({ ## Print result -rk.header ("Chisquare density function", list ("Number of Observations", "100", "Lower quantile", "0.30", "Upper quantile", "24.10", "Degrees of freedom", "4.00", "Non-centrality parameter", "0.00", "Scale", "normal", "Function", "dchisq")); +rk.header ("Chi-square density function", parameters=list("Number of Observations"="100", + "Lower quantile"="0.30", + "Upper quantile"="24.10", + "Degrees of freedom"="4.00", + "Non-centrality parameter"="0.00", + "Logarithmic"="no", + "Function"="dchisq")) rk.graph.on () try ({ diff --git a/tests/distributions/plot_chi_squared_distribution.rkout b/tests/distributions/plot_chi_squared_distribution.rkout index e11d575..cc56d83 100644 --- a/tests/distributions/plot_chi_squared_distribution.rkout +++ b/tests/distributions/plot_chi_squared_distribution.rkout @@ -1,11 +1,11 @@ -<h1>Chisquare density function</h1> +<h1>Chi-square density function</h1> <h2>Parameters</h2> <ul><li>Number of Observations: 100</li> <li>Lower quantile: 0.30</li> <li>Upper quantile: 24.10</li> <li>Degrees of freedom: 4.00</li> <li>Non-centrality parameter: 0.00</li> -<li>Scale: normal</li> +<li>Logarithmic: no</li> <li>Function: dchisq</li> </ul> DATE<br /> diff --git a/tests/distributions/plot_exponential_distribution.rkcommands.R b/tests/distributions/plot_exponential_distribution.rkcommands.R index 9430537..b362a89 100644 --- a/tests/distributions/plot_exponential_distribution.rkcommands.R +++ b/tests/distributions/plot_exponential_distribution.rkcommands.R @@ -1,6 +1,12 @@ local({ ## Print result -rk.header ("Exponential distribution function", list ("Number of Observations", "100", "Lower quantile", "0.00", "Upper quantile", "10.00", "Rate", "1.00", "Scale", "normal", "Tail","Upper", "Function", "pexp")); +rk.header ("Exponential distribution function", parameters=list("Number of Observations"="100", + "Lower quantile"="0.00", + "Upper quantile"="10.00", + "Rate"="1.00", + "Tail"="Upper tail: P[X > x]", + "Logarithmic"="no", + "Function"="pexp")) rk.graph.on () try ({ diff --git a/tests/distributions/plot_exponential_distribution.rkout b/tests/distributions/plot_exponential_distribution.rkout index 064329a..2829e5f 100644 --- a/tests/distributions/plot_exponential_distribution.rkout +++ b/tests/distributions/plot_exponential_distribution.rkout @@ -4,8 +4,8 @@ <li>Lower quantile: 0.00</li> <li>Upper quantile: 10.00</li> <li>Rate: 1.00</li> -<li>Scale: normal</li> -<li>Tail: Upper</li> +<li>Tail: Upper tail: P[X > x]</li> +<li>Logarithmic: no</li> <li>Function: pexp</li> </ul> DATE<br /> diff --git a/tests/distributions/plot_f_distribution.rkcommands.R b/tests/distributions/plot_f_distribution.rkcommands.R index f5f2a96..42f3d1f 100644 --- a/tests/distributions/plot_f_distribution.rkcommands.R +++ b/tests/distributions/plot_f_distribution.rkcommands.R @@ -1,6 +1,13 @@ local({ ## Print result -rk.header ("F density function", list ("Number of Observations", "100", "Lower quantile", "0.001", "Upper quantile", "25.00", "Numerator degrees of freedom", "5.00", "Denominator degrees of freedom", "5.00", "Non-centrality", "0", "Scale", "logarithmic", "Function", "df")); +rk.header ("F density function", parameters=list("Number of Observations"="100", + "Lower quantile"="0.001", + "Upper quantile"="25.00", + "Numerator degrees of freedom"="5.00", + "Denominator degrees of freedom"="5.00", + "Non-centrality parameter"="0", + "Logarithmic"="yes", + "Function"="df")) rk.graph.on () try ({ diff --git a/tests/distributions/plot_f_distribution.rkout b/tests/distributions/plot_f_distribution.rkout index 01fd75b..089b02a 100644 --- a/tests/distributions/plot_f_distribution.rkout +++ b/tests/distributions/plot_f_distribution.rkout @@ -5,8 +5,8 @@ <li>Upper quantile: 25.00</li> <li>Numerator degrees of freedom: 5.00</li> <li>Denominator degrees of freedom: 5.00</li> -<li>Non-centrality: 0</li> -<li>Scale: logarithmic</li> +<li>Non-centrality parameter: 0</li> +<li>Logarithmic: yes</li> <li>Function: df</li> </ul> DATE<br /> diff --git a/tests/distributions/plot_gamma_distribution.rkcommands.R b/tests/distributions/plot_gamma_distribution.rkcommands.R index 1f466bd..f069ee7 100644 --- a/tests/distributions/plot_gamma_distribution.rkcommands.R +++ b/tests/distributions/plot_gamma_distribution.rkcommands.R @@ -1,6 +1,12 @@ local({ ## Print result -rk.header ("Gamma density function", list ("Number of Observations", "100", "Lower quantile", "0.01", "Upper quantile", "4.60", "Shape", "1.61", "Rate", "0.87", "Scale", "normal", "Function", "dgamma")); +rk.header ("Gamma density function", parameters=list("Number of Observations"="100", + "Lower quantile"="0.01", + "Upper quantile"="4.60", + "Shape"="1.61", + "Rate (lambda) or 1/Scale"="0.87", + "Logarithmic"="no", + "Function"="dgamma")) rk.graph.on () try ({ diff --git a/tests/distributions/plot_gamma_distribution.rkout b/tests/distributions/plot_gamma_distribution.rkout index 135e9eb..9b64387 100644 --- a/tests/distributions/plot_gamma_distribution.rkout +++ b/tests/distributions/plot_gamma_distribution.rkout @@ -4,8 +4,8 @@ <li>Lower quantile: 0.01</li> <li>Upper quantile: 4.60</li> <li>Shape: 1.61</li> -<li>Rate: 0.87</li> -<li>Scale: normal</li> +<li>Rate (lambda) or 1/Scale: 0.87</li> +<li>Logarithmic: no</li> <li>Function: dgamma</li> </ul> DATE<br /> diff --git a/tests/distributions/plot_geometric_distribution.rkcommands.R b/tests/distributions/plot_geometric_distribution.rkcommands.R index 4d5865a..aa9fb68 100644 --- a/tests/distributions/plot_geometric_distribution.rkcommands.R +++ b/tests/distributions/plot_geometric_distribution.rkcommands.R @@ -1,6 +1,10 @@ local({ ## Print result -rk.header ("Geometric density function", list ("Lower quantile", "0", "Upper quantile", "12", "Probability of success on each trial", "0.50", "Scale", "normal", "Function", "dgeom")); +rk.header ("Geometric density function", parameters=list("Lower quantile"="0", + "Upper quantile"="12", + "Probability of success on each trial"="0.50", + "Logarithmic"="no", + "Function"="dgeom")) rk.graph.on () try ({ diff --git a/tests/distributions/plot_geometric_distribution.rkout b/tests/distributions/plot_geometric_distribution.rkout index 7d32f2f..21c91cf 100644 --- a/tests/distributions/plot_geometric_distribution.rkout +++ b/tests/distributions/plot_geometric_distribution.rkout @@ -3,7 +3,7 @@ <ul><li>Lower quantile: 0</li> <li>Upper quantile: 12</li> <li>Probability of success on each trial: 0.50</li> -<li>Scale: normal</li> +<li>Logarithmic: no</li> <li>Function: dgeom</li> </ul> DATE<br /> diff --git a/tests/distributions/plot_hypergeometric_distribution.rkcommands.R b/tests/distributions/plot_hypergeometric_distribution.rkcommands.R index fde8219..83a50ca 100644 --- a/tests/distributions/plot_hypergeometric_distribution.rkcommands.R +++ b/tests/distributions/plot_hypergeometric_distribution.rkcommands.R @@ -1,6 +1,13 @@ local({ ## Print result -rk.header ("Hypergeometric distribution function", list ("Lower quantile", "0", "Upper quantile", "12", "Number of white balls", "12", "Number of black balls", "12", "Number of balls drawn", "15", "Scale", "normal", "Tail","Lower", "Function", "phyper")); +rk.header ("Hypergeometric distribution function", parameters=list("Lower quantile"="0", + "Upper quantile (at most k)"="12", + "Number of white balls (m)"="12", + "Number of black balls (n)"="12", + "Number of balls drawn (k)"="15", + "Tail"="Lower tail: P[X ≤ x]", + "Logarithmic"="no", + "Function"="phyper")) rk.graph.on () try ({ diff --git a/tests/distributions/plot_hypergeometric_distribution.rkout b/tests/distributions/plot_hypergeometric_distribution.rkout index 3a2d7bb..c038cda 100644 --- a/tests/distributions/plot_hypergeometric_distribution.rkout +++ b/tests/distributions/plot_hypergeometric_distribution.rkout @@ -1,12 +1,12 @@ <h1>Hypergeometric distribution function</h1> <h2>Parameters</h2> <ul><li>Lower quantile: 0</li> -<li>Upper quantile: 12</li> -<li>Number of white balls: 12</li> -<li>Number of black balls: 12</li> -<li>Number of balls drawn: 15</li> -<li>Scale: normal</li> -<li>Tail: Lower</li> +<li>Upper quantile (at most k): 12</li> +<li>Number of white balls (m): 12</li> +<li>Number of black balls (n): 12</li> +<li>Number of balls drawn (k): 15</li> +<li>Tail: Lower tail: P[X ≤ x]</li> +<li>Logarithmic: no</li> <li>Function: phyper</li> </ul> DATE<br /> diff --git a/tests/distributions/plot_log_normal_distribution.rkcommands.R b/tests/distributions/plot_log_normal_distribution.rkcommands.R index d88d901..849ce1f 100644 --- a/tests/distributions/plot_log_normal_distribution.rkcommands.R +++ b/tests/distributions/plot_log_normal_distribution.rkcommands.R @@ -1,6 +1,13 @@ local({ ## Print result -rk.header ("Lognormal distribution function", list ("Number of Observations", "100", "Lower quantile", "0.01", "Upper quantile", "3.29", "Mean", "4.00", "Standard deviation", "1.00", "Scale", "normal", "Tail","Lower", "Function", "plnorm")); +rk.header ("Log-Normal distribution function", parameters=list("Number of Observations"="100", + "Lower quantile"="0.01", + "Upper quantile"="3.29", + "Mean"="4.00", + "Standard deviation"="1.00", + "Tail"="Lower tail: P[X ≤ x]", + "Logarithmic"="no", + "Function"="plnorm")) rk.graph.on () try ({ diff --git a/tests/distributions/plot_log_normal_distribution.rkout b/tests/distributions/plot_log_normal_distribution.rkout index fc558b0..3cc4882 100644 --- a/tests/distributions/plot_log_normal_distribution.rkout +++ b/tests/distributions/plot_log_normal_distribution.rkout @@ -1,12 +1,12 @@ -<h1>Lognormal distribution function</h1> +<h1>Log-Normal distribution function</h1> <h2>Parameters</h2> <ul><li>Number of Observations: 100</li> <li>Lower quantile: 0.01</li> <li>Upper quantile: 3.29</li> <li>Mean: 4.00</li> <li>Standard deviation: 1.00</li> -<li>Scale: normal</li> -<li>Tail: Lower</li> +<li>Tail: Lower tail: P[X ≤ x]</li> +<li>Logarithmic: no</li> <li>Function: plnorm</li> </ul> DATE<br /> diff --git a/tests/distributions/plot_logistic_distribution.rkcommands.R b/tests/distributions/plot_logistic_distribution.rkcommands.R index 2d0100e..a3b870f 100644 --- a/tests/distributions/plot_logistic_distribution.rkcommands.R +++ b/tests/distributions/plot_logistic_distribution.rkcommands.R @@ -1,6 +1,12 @@ local({ ## Print result -rk.header ("Logistic density function", list ("Number of Observations", "100", "Lower quantile", "-3.29", "Upper quantile", "3.29", "Location", "0.00", "Scale", "1.00", "Scale", "normal", "Function", "dlogis")); +rk.header ("Logistic density function", parameters=list("Number of Observations"="100", + "Lower quantile"="-3.29", + "Upper quantile"="3.29", + "Location"="0.00", + "Scale"="1.00", + "Logarithmic"="no", + "Function"="dlogis")) rk.graph.on () try ({ diff --git a/tests/distributions/plot_logistic_distribution.rkout b/tests/distributions/plot_logistic_distribution.rkout index 75f0151..22e3906 100644 --- a/tests/distributions/plot_logistic_distribution.rkout +++ b/tests/distributions/plot_logistic_distribution.rkout @@ -5,7 +5,7 @@ <li>Upper quantile: 3.29</li> <li>Location: 0.00</li> <li>Scale: 1.00</li> -<li>Scale: normal</li> +<li>Logarithmic: no</li> <li>Function: dlogis</li> </ul> DATE<br /> diff --git a/tests/distributions/plot_negbinomial_distribution.rkcommands.R b/tests/distributions/plot_negbinomial_distribution.rkcommands.R index 8b979fc..a9ac343 100644 --- a/tests/distributions/plot_negbinomial_distribution.rkcommands.R +++ b/tests/distributions/plot_negbinomial_distribution.rkcommands.R @@ -1,6 +1,11 @@ local({ ## Print result -rk.header ("Negative Binomial density function", list ("Lower quantile", "0", "Upper quantile", "24", "Target for number of successful trials", "12", "Probability of success in each trial", "0.75", "Scale", "normal", "Function", "dnbinom")); +rk.header ("Negative Binomial density function", parameters=list("Lower quantile"="0", + "Upper quantile"="24", + "Target number of successful trials"="12", + "Probability of success on each trial"="0.75", + "Logarithmic"="no", + "Function"="dnbinom")) rk.graph.on () try ({ diff --git a/tests/distributions/plot_negbinomial_distribution.rkout b/tests/distributions/plot_negbinomial_distribution.rkout index 3637865..4aa462b 100644 --- a/tests/distributions/plot_negbinomial_distribution.rkout +++ b/tests/distributions/plot_negbinomial_distribution.rkout @@ -2,9 +2,9 @@ <h2>Parameters</h2> <ul><li>Lower quantile: 0</li> <li>Upper quantile: 24</li> -<li>Target for number of successful trials: 12</li> -<li>Probability of success in each trial: 0.75</li> -<li>Scale: normal</li> +<li>Target number of successful trials: 12</li> +<li>Probability of success on each trial: 0.75</li> +<li>Logarithmic: no</li> <li>Function: dnbinom</li> </ul> DATE<br /> diff --git a/tests/distributions/plot_normal_distribution.rkcommands.R b/tests/distributions/plot_normal_distribution.rkcommands.R index f6dcd03..a71f64c 100644 --- a/tests/distributions/plot_normal_distribution.rkcommands.R +++ b/tests/distributions/plot_normal_distribution.rkcommands.R @@ -1,6 +1,12 @@ local({ ## Print result -rk.header ("Normal density function", list ("Number of Observations", "100", "Lower quantile", "-3.29", "Upper quantile", "3.29", "Mean", "0.00", "Standard Deviation", "1.00", "Scale", "normal", "Function", "dnorm")); +rk.header ("Normal density function", parameters=list("Number of Observations"="100", + "Lower quantile"="-3.29", + "Upper quantile"="3.29", + "Mean"="0.00", + "Standard deviation"="1.00", + "Logarithmic"="no", + "Function"="dnorm")) rk.graph.on () try ({ diff --git a/tests/distributions/plot_normal_distribution.rkout b/tests/distributions/plot_normal_distribution.rkout index 50bd839..2cd6aa5 100644 --- a/tests/distributions/plot_normal_distribution.rkout +++ b/tests/distributions/plot_normal_distribution.rkout @@ -4,8 +4,8 @@ <li>Lower quantile: -3.29</li> <li>Upper quantile: 3.29</li> <li>Mean: 0.00</li> -<li>Standard Deviation: 1.00</li> -<li>Scale: normal</li> +<li>Standard deviation: 1.00</li> +<li>Logarithmic: no</li> <li>Function: dnorm</li> </ul> DATE<br /> diff --git a/tests/distributions/plot_poisson_distribution.rkcommands.R b/tests/distributions/plot_poisson_distribution.rkcommands.R index 6f6ae9f..0c0a7c6 100644 --- a/tests/dist... [truncated message content] |
From: Thomas F. <tho...@ru...> - 2015-01-30 12:28:01
|
Git commit e25f617c5691304a7b690e856100d2a5c1180e3c by Thomas Friedrichsmeier. Committed on 30/01/2015 at 12:12. Pushed by tfry into branch 'master'. Adjust test standards to change in rk.results()-formatting. M +2 -2 tests/distributions/ad_test.rkout M +2 -2 tests/distributions/cvm_test.rkout M +2 -2 tests/distributions/lillie_test.rkout M +4 -4 tests/distributions/pearson_test.rkout M +2 -2 tests/distributions/sf_test.rkout M +2 -2 tests/distributions/shapiro_wilk_test.rkout http://commits.kde.org/rkward/e25f617c5691304a7b690e856100d2a5c1180e3c diff --git a/tests/distributions/ad_test.rkout b/tests/distributions/ad_test.rkout index 942d730..dd7070f 100644 --- a/tests/distributions/ad_test.rkout +++ b/tests/distributions/ad_test.rkout @@ -2,6 +2,6 @@ DATE<br /> <table border="1"> <tr><td>Variable Name</td><td>Length</td><td>NAs</td><td>Statistic</td><td>p-value</td></tr> -<tr><td>shape</td><td>48</td><td>0</td><td>A = 1.4137</td><td>0.0010355</td></tr> -<tr><td>perm</td><td>48</td><td>0</td><td>A = 3.9918</td><td>4.2977e-10</td></tr> +<tr><td>shape</td><td>48</td><td>0</td><td>A = 1.4137</td><td>1.0355e-03</td></tr> +<tr><td>perm </td><td>48</td><td>0</td><td>A = 3.9918</td><td>4.2977e-10</td></tr> </table> diff --git a/tests/distributions/cvm_test.rkout b/tests/distributions/cvm_test.rkout index f795cb3..7a2e3e1 100644 --- a/tests/distributions/cvm_test.rkout +++ b/tests/distributions/cvm_test.rkout @@ -2,6 +2,6 @@ DATE<br /> <table border="1"> <tr><td>Variable Name</td><td>Length</td><td>NAs</td><td>Statistic</td><td>p-value</td></tr> -<tr><td>shape</td><td>48</td><td>0</td><td>W = 0.23264</td><td>0.0019712</td></tr> -<tr><td>perm</td><td>48</td><td>0</td><td>W = 0.72562</td><td>3.7586e-08</td></tr> +<tr><td>shape</td><td>48</td><td>0</td><td>W = 0.23264</td><td>1.9712e-03</td></tr> +<tr><td>perm </td><td>48</td><td>0</td><td>W = 0.72562</td><td>3.7586e-08</td></tr> </table> diff --git a/tests/distributions/lillie_test.rkout b/tests/distributions/lillie_test.rkout index 88fff54..916216c 100644 --- a/tests/distributions/lillie_test.rkout +++ b/tests/distributions/lillie_test.rkout @@ -2,6 +2,6 @@ DATE<br /> <table border="1"> <tr><td>Variable Name</td><td>Length</td><td>NAs</td><td>Statistic</td><td>p-value</td></tr> -<tr><td>shape</td><td>48</td><td>0</td><td>D = 0.16979</td><td>0.0013779</td></tr> -<tr><td>perm</td><td>48</td><td>0</td><td>D = 0.31721</td><td>2.5296e-13</td></tr> +<tr><td>shape</td><td>48</td><td>0</td><td>D = 0.16979</td><td>1.3779e-03</td></tr> +<tr><td>perm </td><td>48</td><td>0</td><td>D = 0.31721</td><td>2.5296e-13</td></tr> </table> diff --git a/tests/distributions/pearson_test.rkout b/tests/distributions/pearson_test.rkout index 7e2bef2..752c6f6 100644 --- a/tests/distributions/pearson_test.rkout +++ b/tests/distributions/pearson_test.rkout @@ -5,8 +5,8 @@ DATE<br /> <table border="1"> <tr><td>Variable Name</td><td>Length</td><td>NAs</td><td>Statistic</td><td>number of classes</td><td>degrees of freedom</td><td>p-value</td></tr> -<tr><td>shape</td><td>48</td><td>0</td><td>P = 15.333</td><td>10</td><td>7</td><td>0.031956</td></tr> -<tr><td>perm</td><td>48</td><td>0</td><td>P = 72</td><td>10</td><td>7</td><td>5.82e-13</td></tr> +<tr><td>shape</td><td>48</td><td>0</td><td>P = 15.333</td><td>10</td><td>7</td><td>3.1956e-02</td></tr> +<tr><td>perm </td><td>48</td><td>0</td><td>P = 72 </td><td>10</td><td>7</td><td>5.8200e-13</td></tr> </table> <h1>Pearson chi-square Normality Test</h1> <h2>Parameters</h2> @@ -15,6 +15,6 @@ DATE<br /> DATE<br /> <table border="1"> <tr><td>Variable Name</td><td>Length</td><td>NAs</td><td>Statistic</td><td>number of classes</td><td>degrees of freedom</td><td>p-value</td></tr> -<tr><td>shape</td><td>48</td><td>0</td><td>P = 15.333</td><td>10</td><td>9</td><td>0.082177</td></tr> -<tr><td>perm</td><td>48</td><td>0</td><td>P = 72</td><td>10</td><td>9</td><td>6.1643e-12</td></tr> +<tr><td>shape</td><td>48</td><td>0</td><td>P = 15.333</td><td>10</td><td>9</td><td>8.2177e-02</td></tr> +<tr><td>perm </td><td>48</td><td>0</td><td>P = 72 </td><td>10</td><td>9</td><td>6.1643e-12</td></tr> </table> diff --git a/tests/distributions/sf_test.rkout b/tests/distributions/sf_test.rkout index b997e3d..b1f2d3e 100644 --- a/tests/distributions/sf_test.rkout +++ b/tests/distributions/sf_test.rkout @@ -2,6 +2,6 @@ DATE<br /> <table border="1"> <tr><td>Variable Name</td><td>Length</td><td>NAs</td><td>Statistic</td><td>p-value</td></tr> -<tr><td>shape</td><td>48</td><td>0</td><td>W = 0.90372</td><td>0.0014382</td></tr> -<tr><td>perm</td><td>48</td><td>0</td><td>W = 0.81467</td><td>1.2468e-05</td></tr> +<tr><td>shape</td><td>48</td><td>0</td><td>W = 0.90372</td><td>1.4382e-03</td></tr> +<tr><td>perm </td><td>48</td><td>0</td><td>W = 0.81467</td><td>1.2468e-05</td></tr> </table> diff --git a/tests/distributions/shapiro_wilk_test.rkout b/tests/distributions/shapiro_wilk_test.rkout index 497bc64..ac5fca3 100644 --- a/tests/distributions/shapiro_wilk_test.rkout +++ b/tests/distributions/shapiro_wilk_test.rkout @@ -2,6 +2,6 @@ DATE<br /> <table border="1"> <tr><td>Variable Name</td><td>Length</td><td>NAs</td><td>Statistic</td><td>p-value</td></tr> -<tr><td>shape</td><td>48</td><td>0</td><td>W = 0.90407</td><td>0.00085307</td></tr> -<tr><td>perm</td><td>48</td><td>0</td><td>W = 0.80326</td><td>1.5418e-06</td></tr> +<tr><td>shape</td><td>48</td><td>0</td><td>W = 0.90407</td><td>8.5307e-04</td></tr> +<tr><td>perm </td><td>48</td><td>0</td><td>W = 0.80326</td><td>1.5418e-06</td></tr> </table> |
From: Thomas F. <tho...@ru...> - 2015-01-30 12:27:58
|
Git commit 72db1807892b6923f9843883bed69c0b36b815b8 by Thomas Friedrichsmeier. Committed on 29/01/2015 at 19:15. Pushed by tfry into branch 'master'. Fix instructions M +1 -1 i18n/CMakeLists.txt http://commits.kde.org/rkward/72db1807892b6923f9843883bed69c0b36b815b8 diff --git a/i18n/CMakeLists.txt b/i18n/CMakeLists.txt index 23e507a..6ba8112 100644 --- a/i18n/CMakeLists.txt +++ b/i18n/CMakeLists.txt @@ -51,7 +51,7 @@ ELSE(NOT GETTEXT_MSGFMT_EXECUTABLE) ${CMAKE_CURRENT_SOURCE_DIR}/po/ was not found. This probably means that you are building from the development repository, and have not fetched translations. This is ok, if you want to run RKWard in English, only. Otherwise, to fetch translations, either scripts/import_translations.py XX where (XX is your language code, such as \"de\"; optionally specify several codes separated by spaces). In some cases (esp., if you want to build all existing translations), it is much faster to use: - git clone git://anongit.kde.org/scratch/tfry/rkward-po-export + git clone git://anongit.kde.org/scratch/tfry/rkward-po-export i18n/po ------") ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/po/") ENDIF(NOT GETTEXT_MSGFMT_EXECUTABLE) |
From: Thomas F. <tho...@ru...> - 2015-01-28 19:34:35
|
Git commit 3cab609de6fbf691a202693a8144367b040454ff by Thomas Friedrichsmeier. Committed on 28/01/2015 at 19:33. Pushed by tfry into branch 'master'. Simplify id of menu.pluginmap. M +2 -1 ChangeLog M +1 -1 rkward/plugins/menu.pluginmap http://commits.kde.org/rkward/3cab609de6fbf691a202693a8144367b040454ff diff --git a/ChangeLog b/ChangeLog index 885895b..8409cd7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ - Reworked distribution calculator plugins -- Added power analysis plugin (already existed as separate plugin) - TODO: add automated tests +- Added power analysis plugin (already existed as separate plugin) + - TODO: add automated tests - Assume plugin .js files to be in utf-8 encoding; this allows using non-ascii characters in the generated code - <matrix> element gains options min_rows and min_columns, and the details of fixed_width="true" have been improved - Fixed: <valueslot>s were quirky with respect to showing as invalid diff --git a/rkward/plugins/menu.pluginmap b/rkward/plugins/menu.pluginmap index 5b23ee5..b8cb17b 100644 --- a/rkward/plugins/menu.pluginmap +++ b/rkward/plugins/menu.pluginmap @@ -1,6 +1,6 @@ <!DOCTYPE rkpluginmap> <!-- The point of this pluginmap is to pre-define the layout (and labels) of some menus --> -<document base_prefix="" namespace="rkward" id="rkward_menu_hierarchy" priority="hidden" po_id="embedded"> +<document base_prefix="" namespace="rkward" id="menu" priority="hidden" po_id="embedded"> <include file="pluginmap_meta.inc"/> <about name="Menu structure definition" |
From: m.eik m. <mei...@un...> - 2015-01-28 15:51:46
|
Git commit b237898fb8bd5076bdfbcca4ed820dfa7ac9f4a7 by m.eik michalke. Committed on 28/01/2015 at 15:52. Pushed by meikm into branch 'master'. quick fix for bundle script M +1 -0 macports/update_bundle.sh http://commits.kde.org/rkward/b237898fb8bd5076bdfbcca4ed820dfa7ac9f4a7 diff --git a/macports/update_bundle.sh b/macports/update_bundle.sh index 057126f..9e934d5 100755 --- a/macports/update_bundle.sh +++ b/macports/update_bundle.sh @@ -144,6 +144,7 @@ if [[ $WIPEINST ]] ; then sudo rm "${libsymlink}" fi done + exit 0 fi # prepare for a clean installation, remove all cached sources |
From: m.eik m. <mei...@un...> - 2015-01-28 15:25:26
|
Git commit 5ffdd72475caec5bee1a4197af8a78dd97e2885b by m.eik michalke. Committed on 28/01/2015 at 15:24. Pushed by meikm into branch 'master'. started adjusting the portfiles for MacPorts to respect the move from svn to git M +5 -5 macports/kde/rkward-devel/Portfile M +6 -2 macports/kde/rkward/Portfile M +5 -2 macports/update_bundle.sh http://commits.kde.org/rkward/5ffdd72475caec5bee1a4197af8a78dd97e2885b diff --git a/macports/kde/rkward-devel/Portfile b/macports/kde/rkward-devel/Portfile index 1cbde7f..81e7443 100644 --- a/macports/kde/rkward-devel/Portfile +++ b/macports/kde/rkward-devel/Portfile @@ -3,12 +3,12 @@ PortSystem 1.0 PortGroup kde4 1.1 -fetch.type svn +fetch.type git name rkward-devel -version 0.6.2-svn -svn.url http://svn.code.sf.net/p/rkward/code/trunk +version 0.6.3-git +git.url http://anongit.kde.org/rkward.git #svn.revision 4494 -worksrcdir trunk/rkward +worksrcdir rkward conflicts rkward categories kde kde4 math science @@ -22,7 +22,7 @@ long_description RKWard aims to become an easy to use, transparent frontend t for statistical computation and graphics. Besides a convenient GUI for the most important \ statistical functions, future versions will also provide seamless integration with an office-suite. -homepage http://rkward.kde.org +homepage https://rkward.kde.org depends_lib port:kdelibs4 \ port:kate \ diff --git a/macports/kde/rkward/Portfile b/macports/kde/rkward/Portfile index d88a53d..87d2a90 100644 --- a/macports/kde/rkward/Portfile +++ b/macports/kde/rkward/Portfile @@ -4,7 +4,7 @@ PortSystem 1.0 PortGroup kde4 1.1 name rkward -version 0.6.2 +version 0.6.3 #patchfiles patch-rkward-rbackend-rkstructuregetter.cpp.diff worksrcdir ${name}-${version} @@ -22,13 +22,15 @@ long_description RKWard aims to become an easy to use, transparent frontend t homepage http://rkward.kde.org -master_sites sourceforge:rkward +# FIXME: +master_sites kde:rkward depends_lib port:kdelibs4 \ port:kate \ port:okular \ port:R +# FIXME: checksums rmd160 a15116209a28676db4ce1bd1f9a4b31f5be345c8 \ sha256 3534e58a6246f2be18e6158cf486ecfef6531fee4f0060d7ea1955a823b5add6 @@ -52,7 +54,9 @@ configure.post_args .. build.dir ${worksrcpath}/build livecheck.type regex +# FIXME: livecheck.url http://sourceforge.net/projects/${name}/files/Current_Stable_Releases/ +# FIXME: livecheck.regex "${name}-(\\d+\\.\\d+\\.\\d+)\\.tar" pre-pkg { diff --git a/macports/update_bundle.sh b/macports/update_bundle.sh index 62d059a..057126f 100755 --- a/macports/update_bundle.sh +++ b/macports/update_bundle.sh @@ -43,7 +43,8 @@ declare -a EXCLPKG=(audio_lame audio_libmodplug audio_libopus \ # to see the dependency tree of ports, run # sudo port rdeps rkward-devel -SVNREPO=http://svn.code.sf.net/p/rkward/code/trunk +#SVNREPO=http://svn.code.sf.net/p/rkward/code/trunk +GITREPO=http://anongit.kde.org/rkward.git OLDWD=$(pwd) if [[ $1 == "" ]] ; then @@ -231,7 +232,9 @@ if [[ $COPYMDMD ]] ; then # get version information of installed ports PORTVERS=$(port list $PTARGET | sed -e "s/.*@//;s/[[:space:]].*//") if [[ $DEVEL ]] ; then - TARGETVERS=${PORTVERS}$(svn info "$SVNREPO" | grep "^Revision:" | sed "s/[^[:digit:]]*//") + # we moved to git + # TARGETVERS=${PORTVERS}$(svn info "$SVNREPO" | grep "^Revision:" | sed "s/[^[:digit:]]*//") + TARGETVERS=${PORTVERS}$(git ls-remote http://anongit.kde.org/rkward | grep HEAD$ | cut -c 1-7) else TARGETVERS=$PORTVERS fi |
From: Thomas F. <tho...@ru...> - 2015-01-28 15:02:01
|
Git commit 136f7a073a1ac4db32d198a5d0a3db3f80958ea2 by Thomas Friedrichsmeier. Committed on 28/01/2015 at 15:00. Pushed by tfry into branch 'master'. Merge branch 'work/distributions' M +3 -2 ChangeLog http://commits.kde.org/rkward/136f7a073a1ac4db32d198a5d0a3db3f80958ea2 diff --cc ChangeLog index 5666a56,bf56c95..885895b --- a/ChangeLog +++ b/ChangeLog @@@ -1,5 -1,4 +1,6 @@@ - - Added power analysis plugin (already existed as separate plugin) - - TODO: add automated tests ++- Reworked distribution calculator plugins ++- Added power analysis plugin (already existed as separate plugin) - TODO: add automated tests + - Assume plugin .js files to be in utf-8 encoding; this allows using non-ascii characters in the generated code - <matrix> element gains options min_rows and min_columns, and the details of fixed_width="true" have been improved - Fixed: <valueslot>s were quirky with respect to showing as invalid - Fix a hang-on-exit issue |
From: Thomas F. <tho...@ru...> - 2015-01-28 14:57:53
|
Git commit e44a0cdb950ef2778e7353021ceb8c2a9f751caa by Thomas Friedrichsmeier. Committed on 28/01/2015 at 14:56. Pushed by tfry into branch 'work/distributions'. Adjust tests for reworked distributions plugins, and fix some small issues that turned up in the process. M +1 -0 rkward/plugins/distributions/binomial.rkh M +1 -1 rkward/plugins/distributions/chi_squared.js M +1 -1 rkward/plugins/distributions/dist_snippets.xml M +1 -1 rkward/plugins/distributions/exponential.xml M +1 -1 rkward/plugins/distributions/geom.rkh M +2 -2 rkward/plugins/distributions/gumbel.rkh M +1 -1 rkward/plugins/distributions/hypergeometric.rkh M +2 -2 rkward/plugins/distributions/log_normal.xml M +1 -1 rkward/plugins/distributions/plot_geometric_distribution.rkh M +1 -1 rkward/plugins/distributions/plot_lognormal_distribution.rkh M +1 -1 rkward/plugins/distributions/t.rkh M +1 -1 rkward/plugins/distributions/tukey.rkh M +1 -0 rkward/plugins/distributions/tukey.xml M +2 -2 rkward/plugins/distributions/wilcoxon.xml M +29 -92 tests/distributions.R M +78 -6 tests/distributions/beta_probabilities.rkcommands.R M +207 -15 tests/distributions/beta_probabilities.rkout D +0 -14 tests/distributions/beta_quantiles.rkcommands.R D +0 -21 tests/distributions/beta_quantiles.rkout M +6 -3 tests/distributions/binomial_probabilities.rkcommands.R M +17 -6 tests/distributions/binomial_probabilities.rkout D +0 -7 tests/distributions/binomial_quantiles.rkcommands.R D +0 -10 tests/distributions/binomial_quantiles.rkout M +6 -10 tests/distributions/cauchy_probabilities.rkcommands.R M +27 -16 tests/distributions/cauchy_probabilities.rkout D +0 -14 tests/distributions/cauchy_quantiles.rkcommands.R D +0 -19 tests/distributions/cauchy_quantiles.rkout M +6 -10 tests/distributions/chi_squared_probabilities.rkcommands.R M +27 -16 tests/distributions/chi_squared_probabilities.rkout D +0 -14 tests/distributions/chi_squared_quantiles.rkcommands.R D +0 -19 tests/distributions/chi_squared_quantiles.rkout M +5 -3 tests/distributions/exponential_probabilities.rkcommands.R M +26 -6 tests/distributions/exponential_probabilities.rkout D +0 -7 tests/distributions/exponential_quantiles.rkcommands.R D +0 -9 tests/distributions/exponential_quantiles.rkout M +7 -3 tests/distributions/f_probabilities.rkcommands.R M +28 -8 tests/distributions/f_probabilities.rkout D +0 -7 tests/distributions/f_quantiles.rkcommands.R D +0 -11 tests/distributions/f_quantiles.rkout M +6 -3 tests/distributions/gamma_probabilities.rkcommands.R M +27 -7 tests/distributions/gamma_probabilities.rkout D +0 -8 tests/distributions/gamma_quantiles.rkcommands.R D +0 -10 tests/distributions/gamma_quantiles.rkout M +5 -3 tests/distributions/geom_probabilities.rkcommands.R M +17 -6 tests/distributions/geom_probabilities.rkout D +0 -7 tests/distributions/geom_quantiles.rkcommands.R D +0 -9 tests/distributions/geom_quantiles.rkout M +8 -3 tests/distributions/gumbel_probabilities.rkcommands.R M +27 -7 tests/distributions/gumbel_probabilities.rkout D +0 -7 tests/distributions/gumbel_quantiles.rkcommands.R D +0 -10 tests/distributions/gumbel_quantiles.rkout M +7 -3 tests/distributions/hypergeometric_probabilities.rkcommands.R M +19 -8 tests/distributions/hypergeometric_probabilities.rkout D +0 -7 tests/distributions/hypergeometric_quantiles.rkcommands.R D +0 -11 tests/distributions/hypergeometric_quantiles.rkout M +6 -3 tests/distributions/log_normal_probabilities.rkcommands.R M +27 -7 tests/distributions/log_normal_probabilities.rkout D +0 -7 tests/distributions/log_normal_quantiles.rkcommands.R D +0 -10 tests/distributions/log_normal_quantiles.rkout M +6 -3 tests/distributions/logistic_probabilities.rkcommands.R M +27 -7 tests/distributions/logistic_probabilities.rkout D +0 -7 tests/distributions/logistic_quantiles.rkcommands.R D +0 -10 tests/distributions/logistic_quantiles.rkout M +6 -3 tests/distributions/negative_binomial_probabilities.rkcommands.R M +23 -7 tests/distributions/negative_binomial_probabilities.rkout D +0 -7 tests/distributions/negative_binomial_quantiles.rkcommands.R D +0 -10 tests/distributions/negative_binomial_quantiles.rkout M +6 -3 tests/distributions/normal_probabilities.rkcommands.R M +27 -7 tests/distributions/normal_probabilities.rkout D +0 -7 tests/distributions/normal_quantiles.rkcommands.R D +0 -10 tests/distributions/normal_quantiles.rkout M +5 -3 tests/distributions/poisson_probabilities.rkcommands.R M +12 -6 tests/distributions/poisson_probabilities.rkout D +0 -7 tests/distributions/poisson_quantiles.rkcommands.R D +0 -9 tests/distributions/poisson_quantiles.rkout M +6 -3 tests/distributions/t_probabilities.rkcommands.R M +27 -7 tests/distributions/t_probabilities.rkout D +0 -7 tests/distributions/t_quantiles.rkcommands.R D +0 -10 tests/distributions/t_quantiles.rkout M +6 -3 tests/distributions/tukey_probabilities.rkcommands.R M +27 -8 tests/distributions/tukey_probabilities.rkout D +0 -7 tests/distributions/tukey_quantiles.rkcommands.R D +0 -11 tests/distributions/tukey_quantiles.rkout M +6 -3 tests/distributions/uniform_probabilities.rkcommands.R M +27 -7 tests/distributions/uniform_probabilities.rkout D +0 -7 tests/distributions/uniform_quantiles.rkcommands.R D +0 -10 tests/distributions/uniform_quantiles.rkout M +6 -3 tests/distributions/weibull_probabilities.rkcommands.R M +27 -7 tests/distributions/weibull_probabilities.rkout D +0 -7 tests/distributions/weibull_quantiles.rkcommands.R D +0 -10 tests/distributions/weibull_quantiles.rkout M +6 -3 tests/distributions/wilcoxon_probabilities.rkcommands.R M +20 -7 tests/distributions/wilcoxon_probabilities.rkout D +0 -7 tests/distributions/wilcoxon_quantiles.rkcommands.R D +0 -10 tests/distributions/wilcoxon_quantiles.rkout http://commits.kde.org/rkward/e44a0cdb950ef2778e7353021ceb8c2a9f751caa diff --git a/rkward/plugins/distributions/binomial.rkh b/rkward/plugins/distributions/binomial.rkh index 0b3d8ef..0a72d8f 100644 --- a/rkward/plugins/distributions/binomial.rkh +++ b/rkward/plugins/distributions/binomial.rkh @@ -17,6 +17,7 @@ <related> <ul> <li><link href="rkward://rhelp/Binomial"/></li> + <li><link href="rkward://component/rkward/plot_binomial_distribution"/></li> </ul> </related> </document> diff --git a/rkward/plugins/distributions/chi_squared.js b/rkward/plugins/distributions/chi_squared.js index 71631e4..777b899 100644 --- a/rkward/plugins/distributions/chi_squared.js +++ b/rkward/plugins/distributions/chi_squared.js @@ -4,5 +4,5 @@ function getDistSpecifics () { var df = Number (getString ("df")); return initDistSpecifics (i18n ('Chi-squared distribution'), 'chisq', ["df", "ncp"], [Math.max (0, Math.floor (df * .6 - 4)), Math.floor (df * 1.4 + 4)], // NOTE: crude self-made heuristic for covering the likely range of interest for auto-quantiles - continuos); + continuous); } diff --git a/rkward/plugins/distributions/dist_snippets.xml b/rkward/plugins/distributions/dist_snippets.xml index 25c5b21..d7d817b 100644 --- a/rkward/plugins/distributions/dist_snippets.xml +++ b/rkward/plugins/distributions/dist_snippets.xml @@ -16,7 +16,7 @@ <snippet id="dialog_layout"> <dropdown id="mode" label="Mode"> <option value="p" label="Calculate probabilities for given quantiles"/> - <option value="d" label="Calculate densities at given quantiles"/> + <option value="d" id="d" label="Calculate densities at given quantiles"/> <option value="q" label="Calculate quantiles for given probabilities"/> </dropdown> <row> diff --git a/rkward/plugins/distributions/exponential.xml b/rkward/plugins/distributions/exponential.xml index 339a809..bd5cd85 100755 --- a/rkward/plugins/distributions/exponential.xml +++ b/rkward/plugins/distributions/exponential.xml @@ -7,7 +7,7 @@ </logic> <snippets> <snippet id="dist_options"> - <spinbox default_precision="1" type="real" min="0" initial="1" id="rate" label="Rates"/> + <spinbox default_precision="1" type="real" min="0" initial="1" id="rate" label="Rate"/> </snippet> <include file="dist_snippets.xml"/> </snippets> diff --git a/rkward/plugins/distributions/geom.rkh b/rkward/plugins/distributions/geom.rkh index 64e4c80..e9a06e7 100644 --- a/rkward/plugins/distributions/geom.rkh +++ b/rkward/plugins/distributions/geom.rkh @@ -16,7 +16,7 @@ <related> <ul> <li><link href="rkward://rhelp/Geometric"/></li> - <li><link href="rkward://component/rkward/plot_geom_distribution"/></li> + <li><link href="rkward://component/rkward/plot_geometric_distribution"/></li> </ul> </related> </document> diff --git a/rkward/plugins/distributions/gumbel.rkh b/rkward/plugins/distributions/gumbel.rkh index 9555fd4..5f59b0e 100644 --- a/rkward/plugins/distributions/gumbel.rkh +++ b/rkward/plugins/distributions/gumbel.rkh @@ -14,8 +14,8 @@ </settings> <related> <ul> - <li><link href="rkward://rhelp/pgumgel">R help on the gumbel distribution functions from package FAdist</li> - <li><link href="rkward://component/rkward/plot_gumbel_distribution"/></li> + <li><link href="rkward://rhelp/pgumgel">R help on the gumbel distribution functions from package FAdist</link></li> + <!-- <li><link href="rkward://component/rkward/plot_gumbel_distribution"/></li> --> </ul> </related> </document> diff --git a/rkward/plugins/distributions/hypergeometric.rkh b/rkward/plugins/distributions/hypergeometric.rkh index 24358c8..6e4c17c 100644 --- a/rkward/plugins/distributions/hypergeometric.rkh +++ b/rkward/plugins/distributions/hypergeometric.rkh @@ -18,7 +18,7 @@ <related> <ul> <li><link href="rkward://rhelp/Hypergeometric"/></li> - <li><link href="rkward://component/rkward/plot_hypergeom_distribution"/></li> + <li><link href="rkward://component/rkward/plot_hypergeometric_distribution"/></li> </ul> </related> </document> diff --git a/rkward/plugins/distributions/log_normal.xml b/rkward/plugins/distributions/log_normal.xml index 24d3164..86710c8 100644 --- a/rkward/plugins/distributions/log_normal.xml +++ b/rkward/plugins/distributions/log_normal.xml @@ -7,8 +7,8 @@ </logic> <snippets> <snippet id="dist_options"> - <spinbox default_precision="1" type="real" initial="0" id="meanlog" label="meanlog (mean of the distribution on the log scale)"/> - <spinbox default_precision="1" type="real" min="0.000001" initial="1" id="sdlog" label="sdlog (standard deviation of the distribution on the log scale)"/> + <spinbox default_precision="1" type="real" initial="0" id="meanlog" label="meanlog (mean on log scale)"/> + <spinbox default_precision="1" type="real" min="0.000001" initial="1" id="sdlog" label="sdlog (standard deviation on log scale)"/> </snippet> <include file="dist_snippets.xml"/> </snippets> diff --git a/rkward/plugins/distributions/plot_geometric_distribution.rkh b/rkward/plugins/distributions/plot_geometric_distribution.rkh index eb40014..2e595c6 100644 --- a/rkward/plugins/distributions/plot_geometric_distribution.rkh +++ b/rkward/plugins/distributions/plot_geometric_distribution.rkh @@ -19,7 +19,7 @@ Density and distribution function plots for the Geometric distribution. <related> <ul> - <li><link href="rkward://component/geometric_probabilities"/></li> + <li><link href="rkward://component/geom_probabilities"/></li> <li><link href="rkward://rhelp/Geometric"/></li> <li><link href="rkward://component/plot_options"/></li> <li><link href="rkward://rhelp/curve"/></li> diff --git a/rkward/plugins/distributions/plot_lognormal_distribution.rkh b/rkward/plugins/distributions/plot_lognormal_distribution.rkh index 97ea5d4..4f2395f 100644 --- a/rkward/plugins/distributions/plot_lognormal_distribution.rkh +++ b/rkward/plugins/distributions/plot_lognormal_distribution.rkh @@ -20,7 +20,7 @@ Density and distribution function plots for the Lognormal distribution. <related> <ul> - <li><link href="rkward://component/lognormal_probabilities"/></li> + <li><link href="rkward://component/log_normal_probabilities"/></li> <li><link href="rkward://rhelp/Lognormal"/></li> <li><link href="rkward://component/plot_options"/></li> <li><link href="rkward://rhelp/curve"/></li> diff --git a/rkward/plugins/distributions/t.rkh b/rkward/plugins/distributions/t.rkh index 61a5ac2..bf9c97b 100644 --- a/rkward/plugins/distributions/t.rkh +++ b/rkward/plugins/distributions/t.rkh @@ -4,7 +4,7 @@ <include file="dist_help_snippets.xml"/> </snippets> <summary> - Provides a calculator for probabilities, quantiles, and densities in the Studentized Range (Tukey) distribution. + Provides a calculator for probabilities, quantiles, and densities in the <i>t</i> distribution. </summary> <insert snippet="dialog_usage"/> <settings> diff --git a/rkward/plugins/distributions/tukey.rkh b/rkward/plugins/distributions/tukey.rkh index 459b524..ed9ece8 100644 --- a/rkward/plugins/distributions/tukey.rkh +++ b/rkward/plugins/distributions/tukey.rkh @@ -4,7 +4,7 @@ <include file="dist_help_snippets.xml"/> </snippets> <summary> - Provides a calculator for probabilities, quantiles, and densities in the Standardized Range (Tukey) distribution. + Provides a calculator for probabilities, quantiles in the Standardized Range (Tukey) distribution. Calculating densities is not supported by this plugin. Quantiles are the ratio between the observed range in the given number of observations, and the standard deviation estimate (based on given number of degrees of freedom) of an independent sample. </summary> diff --git a/rkward/plugins/distributions/tukey.xml b/rkward/plugins/distributions/tukey.xml index b82c52b..943813b 100644 --- a/rkward/plugins/distributions/tukey.xml +++ b/rkward/plugins/distributions/tukey.xml @@ -4,6 +4,7 @@ <help file="tukey.rkh" /> <logic> <insert snippet="dialog_logic"/> + <set id="mode.d.enabled" to="false"/> </logic> <snippets> <snippet id="dist_options"> diff --git a/rkward/plugins/distributions/wilcoxon.xml b/rkward/plugins/distributions/wilcoxon.xml index f45a16c..6d698d4 100755 --- a/rkward/plugins/distributions/wilcoxon.xml +++ b/rkward/plugins/distributions/wilcoxon.xml @@ -10,8 +10,8 @@ </logic> <snippets> <snippet id="dist_options"> - <spinbox type="integer" min="1" initial="1" id="m" label="m (Numbers of observations in the first sample)"/> - <spinbox type="integer" min="1" initial="1" id="n" label="n (Numbers of observations in the second sample)"/> + <spinbox type="integer" min="1" initial="5" id="m" label="m (Numbers of observations in the first sample)"/> + <spinbox type="integer" min="1" initial="5" id="n" label="n (Numbers of observations in the second sample)"/> </snippet> <include file="dist_snippets.xml"/> </snippets> diff --git a/tests/distributions.R b/tests/distributions.R index 3e05988..2ea6537 100644 --- a/tests/distributions.R +++ b/tests/distributions.R @@ -33,14 +33,16 @@ suite <- new ("RKTestSuite", id="distributions", rk.call.plugin ("rkward::jb_test", excludenas.state="1", length.state="1", x.available="rock[[\"shape\"]]\nrock[[\"perm\"]]", submit.mode="submit") }, libraries=c("tseries")), new ("RKTest", id="beta_probabilities", call=function () { - rk.call.plugin ("rkward::beta_probabilities", logp.string="log.p = FALSE", ncp.real="0.00", q.text="0.95", shape1.real="1.00", shape2.real="1.00", tail.string="lower.tail=TRUE", submit.mode="submit") - - rk.call.plugin ("rkward::beta_probabilities", logp.string="log.p = TRUE", ncp.real="0.02", q.text="0.96", shape1.real="1.01", shape2.real="1.01", tail.string="lower.tail=FALSE", submit.mode="submit") - }), - new ("RKTest", id="beta_quantiles", call=function () { - rk.call.plugin ("rkward::beta_quantiles", logp.string="log.p = FALSE", ncp.real="0.00", p.text="0.95", shape1.real="1.00", shape2.real="1.00", tail.string="lower.tail=TRUE", submit.mode="submit") - - rk.call.plugin ("rkward::beta_quantiles", logp.string="log.p = TRUE", ncp.real="0.08", p.text="-1", shape1.real="1.04", shape2.real="1.03", tail.string="lower.tail=FALSE", submit.mode="submit") + # NOTE: The XYZ_probabilities plugins are all based on common code. We test this one, extensively, while for the other plugins we'll only test the case of + # calculating probabilities for automatic quantiles, which is the trickiest operation. + rk.call.plugin ("rkward::beta_probabilities", logp.state="0", lower.state="1", mode.string="p", ncp.real="0.0", q.tsv="", shape1.real="1.0", shape2.real="1.0", submit.mode="submit") + rk.call.plugin ("rkward::beta_probabilities", logp.state="1", lower.state="0", mode.string="p", ncp.real="0.0", q.tsv="", shape1.real="1.0", shape2.real="1.0", submit.mode="submit") + rk.call.plugin ("rkward::beta_probabilities", logd.state="1", mode.string="d", ncp.real="0.0", q.tsv="", shape1.real="2.0", shape2.real="1.0", submit.mode="submit") + rk.call.plugin ("rkward::beta_probabilities", logd.state="0", mode.string="d", ncp.real="0.0", q.tsv="", shape1.real="1.0", shape2.real="2.0", submit.mode="submit") + rk.call.plugin ("rkward::beta_probabilities", logp.state="1", lower.state="1", mode.string="q", ncp.real="0.0", p.tsv="", shape1.real="1.0", shape2.real="2.0", submit.mode="submit") + rk.call.plugin ("rkward::beta_probabilities", logp.state="0", lower.state="1", mode.string="q", ncp.real="0.0", p.tsv="", shape1.real="1.0", shape2.real="2.0", submit.mode="submit") + rk.call.plugin ("rkward::beta_probabilities", logp.state="0", lower.state="1", mode.string="q", ncp.real="0.0", p.tsv=".1\t.2\t.3", shape1.real="1.0", shape2.real="2.0", submit.mode="submit") + rk.call.plugin ("rkward::beta_probabilities", logp.state="0", lower.state="1", mode.string="p", ncp.real="0.0", q.tsv="1", shape1.real="1.0", shape2.real="2.0", submit.mode="submit") }), new ("RKTest", id="beta_clt", call=function () { rk.call.plugin ("rkward::plot_beta_clt", a.real="2.00", b.real="2.00", drawnorm.state="1", function.string="hist", histogram_opt.addtoplot.state="", histogram_opt.barlabels.state="1", histogram_opt.density.real="-1.00", histogram_opt.doborder.state="1", histogram_opt.freq.state="0", histogram_opt.histbordercol.color.string="", histogram_opt.histbreaksFunction.string="Sturges", histogram_opt.histfillcol.color.string="azure", histogram_opt.histlinetype.string="solid", histogram_opt.rightclosed.state="1", histogram_opt.usefillcol.state="1", nAvg.real="10.00", nDist.real="1000.00", normlinecol.color.string="red", normpointtype.string="l", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", scalenorm.state="0", submit.mode="submit") @@ -49,27 +51,13 @@ suite <- new ("RKTestSuite", id="distributions", rk.call.plugin ("rkward::plot_beta_distribution", a.real="2.00", b.real="2.00", function.string="p", log.state="1", lower.state="1", max.real="1.00", min.real="0.00", n.real="100.00", ncp.real="0.00", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", submit.mode="submit") }), new ("RKTest", id="cauchy_probabilities", call=function () { - rk.call.plugin ("rkward::cauchy_probabilities", location.real="0.03", logp.string="log.p = FALSE", q.text="0.95", scale.real="1.02", tail.string="lower.tail=TRUE", submit.mode="submit") - - rk.call.plugin ("rkward::cauchy_probabilities", location.real="-0.02", logp.string="log.p = TRUE", q.text="0.95", scale.real="1.03", tail.string="lower.tail=FALSE", submit.mode="submit") - }), - new ("RKTest", id="cauchy_quantiles", call=function () { - rk.call.plugin ("rkward::cauchy_quantiles", location.real="-0.03", logp.string="log.p = FALSE", p.text="0.95", scale.real="1.03", tail.string="lower.tail=TRUE", submit.mode="submit") - - rk.call.plugin ("rkward::cauchy_quantiles", location.real="0.02", logp.string="log.p = TRUE", p.text="-1 -2", scale.real="0.98", tail.string="lower.tail=FALSE", submit.mode="submit") + rk.call.plugin ("rkward::cauchy_probabilities", location.real="0.00", logp.state="0", lower.state="1", mode.string="p", q.tsv="", scale.real="1.00", submit.mode="submit") }), new ("RKTest", id="plot_cauchy_distribution", call=function () { rk.call.plugin ("rkward::plot_cauchy_distribution", function.string="d", loc.real="0.00", log.state="0", max.real="3.29", min.real="-3.29", n.real="100.00", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", scale.real="1.00", submit.mode="submit") }), new ("RKTest", id="chi_squared_probabilities", call=function () { - rk.call.plugin ("rkward::chi_squared_probabilities", df.real="3.00", logp.string="log.p = FALSE", ncp.real="0.05", q.text="0.97 0.65", tail.string="lower.tail=TRUE", submit.mode="submit") - - rk.call.plugin ("rkward::chi_squared_probabilities", df.real="1.01", logp.string="log.p = TRUE", ncp.real="0.02", q.text="1", tail.string="lower.tail=FALSE", submit.mode="submit") - }), - new ("RKTest", id="chi_squared_quantiles", call=function () { - rk.call.plugin ("rkward::chi_squared_quantiles", df.real="1.00", logp.string="log.p = FALSE", ncp.real="0.00", p.text="0.95", tail.string="lower.tail=TRUE", submit.mode="submit") - - rk.call.plugin ("rkward::chi_squared_quantiles", df.real="1.02", logp.string="log.p = TRUE", ncp.real="3.00", p.text="-1 -2", tail.string="lower.tail=FALSE", submit.mode="submit") + rk.call.plugin ("rkward::chi_squared_probabilities", df.real="1.00", logp.state="0", lower.state="1", mode.string="p", ncp.real="0.00", q.tsv="", submit.mode="submit") }), new ("RKTest", id="chi_squared_clt", call=function () { rk.call.plugin ("rkward::plot_chi_squared_clt", df.real="4.00", dist_stepfun.addtoplot.state="", dist_stepfun.col_hor.color.string="", dist_stepfun.col_vert.color.string="", dist_stepfun.col_y0.color.string="", dist_stepfun.col_y1.color.string="", dist_stepfun.do_points.state="", dist_stepfun.linetype.string="", dist_stepfun.verticals.state="1", drawnorm.state="1", function.string="dist", nAvg.real="12.00", nDist.real="1000.00", ncp.real="0.6", normlinecol.color.string="red", normpointtype.string="l", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", scalenorm.state="1", submit.mode="submit") @@ -78,10 +66,7 @@ suite <- new ("RKTestSuite", id="distributions", rk.call.plugin ("rkward::plot_chi_squared_distribution", df.real="4.00", function.string="d", log.state="0", max.real="24.10", min.real="0.30", n.real="100.00", ncp.real="0.00", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", submit.mode="submit") }), new ("RKTest", id="exponential_probabilities", call=function () { - rk.call.plugin ("rkward::exponential_probabilities", logp.string="log.p = FALSE", q.text="0.96", rate.real="1.07", tail.string="lower.tail=TRUE", submit.mode="submit") - }), - new ("RKTest", id="exponential_quantiles", call=function () { - rk.call.plugin ("rkward::exponential_quantiles", logp.string="log.p = TRUE", p.text="-1.1", rate.real="1.05", tail.string="lower.tail=FALSE", submit.mode="submit") + rk.call.plugin ("rkward::exponential_probabilities", logp.state="0", lower.state="1", mode.string="p", q.tsv="", rate.real="1.0", submit.mode="submit") }), new ("RKTest", id="exponential_clt", call=function () { rk.call.plugin ("rkward::plot_exponential_clt", drawnorm.state="1", function.string="hist", histogram_opt.addtoplot.state="", histogram_opt.barlabels.state="", histogram_opt.density.real="-1.00", histogram_opt.doborder.state="1", histogram_opt.freq.state="0", histogram_opt.histbordercol.color.string="", histogram_opt.histbreaksFunction.string="Sturges", histogram_opt.histlinetype.string="solid", histogram_opt.rightclosed.state="1", histogram_opt.usefillcol.state="", nAvg.real="10.00", nDist.real="1000.00", normlinecol.color.string="grey4", normpointtype.string="h", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", rate.real="1.00", scalenorm.state="1", submit.mode="submit") @@ -90,10 +75,7 @@ suite <- new ("RKTestSuite", id="distributions", rk.call.plugin ("rkward::plot_exponential_distribution", function.string="p", log.state="0", lower.state="0", max.real="10.00", min.real="0.00", n.real="100.00", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", rate.real="1.00", submit.mode="submit") }), new ("RKTest", id="f_probabilities", call=function () { - rk.call.plugin ("rkward::f_probabilities", df1.real="1.02", df2.real="1.11", logp.string="log.p = FALSE", ncp.real="0.02", q.text=".1, .2", tail.string="lower.tail=TRUE", submit.mode="submit") - }), - new ("RKTest", id="f_quantiles", call=function () { - rk.call.plugin ("rkward::f_quantiles", df1.real="1.00", df2.real="1.00", logp.string="log.p = FALSE", ncp.real="0.00", p.text="0.95", tail.string="lower.tail=FALSE", submit.mode="submit") + rk.call.plugin ("rkward::f_probabilities", df1.real="1.0", df2.real="10.0", logp.state="0", lower.state="1", mode.string="p", ncp.real="0.0", q.tsv="", submit.mode="submit") }), new ("RKTest", id="f_clt", call=function () { rk.call.plugin ("rkward::plot_f_clt", df1.real="5.00", df2.real="5.00", drawnorm.state="0", function.string="hist", histogram_opt.addtoplot.state="", histogram_opt.barlabels.state="", histogram_opt.density.real="-1.00", histogram_opt.doborder.state="1", histogram_opt.freq.state="0", histogram_opt.histbordercol.color.string="", histogram_opt.histbreaksFunction.string="Sturges", histogram_opt.histlinetype.string="solid", histogram_opt.rightclosed.state="1", histogram_opt.usefillcol.state="", nAvg.real="10.00", nDist.real="1000.00", ncp.real="0.00", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", scalenorm.state="0", submit.mode="submit") @@ -102,10 +84,7 @@ suite <- new ("RKTestSuite", id="distributions", rk.call.plugin ("rkward::plot_f_distribution", df1.real="5.00", df2.real="5.00", function.string="d", log.state="1", max.real="25.00", min.real="0.001", n.real="100.00", ncp.real="0.00", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", submit.mode="submit") }), new ("RKTest", id="gamma_probabilities", call=function () { - rk.call.plugin ("rkward::gamma_probabilities", logp.string="log.p = FALSE", q.text="0.95", rate.real="1.00", shape.real="1.00", tail.string="lower.tail=TRUE", submit.mode="submit") - }), - new ("RKTest", id="gamma_quantiles", call=function () { - rk.call.plugin ("rkward::gamma_quantiles", logp.string="log.p = TRUE", p.text="-5", rate.real="1.00", shape.real="1.00", tail.string="lower.tail=TRUE", submit.mode="submit") + rk.call.plugin ("rkward::gamma_probabilities", logp.state="0", lower.state="1", mode.string="p", q.tsv="", rate.real="1.0", shape.real="1.0", submit.mode="submit") }), new ("RKTest", id="gamma_clt", call=function () { rk.call.plugin ("rkward::plot_gamma_clt", drawnorm.state="1", function.string="hist", histogram_opt.addtoplot.state="", histogram_opt.barlabels.state="", histogram_opt.density.real="-1.00", histogram_opt.doborder.state="1", histogram_opt.freq.state="0", histogram_opt.histbordercol.color.string="", histogram_opt.histbreaksFunction.string="Sturges", histogram_opt.histlinetype.string="solid", histogram_opt.rightclosed.state="1", histogram_opt.usefillcol.state="", nAvg.real="10.00", nDist.real="1000.00", normlinecol.color.string="red", normpointtype.string="l", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", rate.real="0.3", scalenorm.state="0", shape.real="5.9", submit.mode="submit") @@ -114,16 +93,10 @@ suite <- new ("RKTestSuite", id="distributions", rk.call.plugin ("rkward::plot_gamma_distribution", function.string="d", log.state="0", max.real="4.60", min.real="0.01", n.real="100.00", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", rate.real="0.87", shape.real="1.61", submit.mode="submit") }), new ("RKTest", id="gumbel_probabilities", call=function () { - rk.call.plugin ("rkward::gumbel_probabilities", logp.string="log.p = FALSE", q.text="0.95", scale.real="1.04", shape.real="1.03", tail.string="lower.tail=TRUE", submit.mode="submit") - }), - new ("RKTest", id="gumbel_quantiles", call=function () { - rk.call.plugin ("rkward::gumbel_quantiles", logp.string="log.p = FALSE", p.text="0.95", scale.real="1.00", shape.real="1.00", tail.string="lower.tail=FALSE", submit.mode="submit") + rk.call.plugin ("rkward::gumbel_probabilities", location.real="0.0", logp.state="0", lower.state="1", mode.string="p", q.tsv="", scale.real="1.0", submit.mode="submit") }), new ("RKTest", id="logistic_probabilities", call=function () { - rk.call.plugin ("rkward::logistic_probabilities", location.real="1.04", logp.string="log.p = TRUE", q.text="0.95", scale.real="1.00", tail.string="lower.tail=TRUE", submit.mode="submit") - }), - new ("RKTest", id="logistic_quantiles", call=function () { - rk.call.plugin ("rkward::logistic_quantiles", location.real="1.00", logp.string="log.p = FALSE", p.text="0.95", scale.real="1.00", tail.string="lower.tail=TRUE", submit.mode="submit") + rk.call.plugin ("rkward::logistic_probabilities", location.real="0.0", logp.state="0", lower.state="1", mode.string="p", q.tsv="", scale.real="1.0", submit.mode="submit") }), new ("RKTest", id="logistic_clt", call=function () { rk.call.plugin ("rkward::plot_logistic_clt", drawnorm.state="1", function.string="hist", histogram_opt.addtoplot.state="", histogram_opt.barlabels.state="1", histogram_opt.density.real="-1.00", histogram_opt.doborder.state="1", histogram_opt.freq.state="0", histogram_opt.histbordercol.color.string="", histogram_opt.histbreaksFunction.string="int", histogram_opt.histlinetype.string="solid", histogram_opt.include_lowest.state="1", histogram_opt.rightclosed.state="", histogram_opt.usefillcol.state="", loc.real="0.00", nAvg.real="10.00", nDist.real="1000.00", normlinecol.color.string="red", normpointtype.string="l", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", scale.real="3.00", scalenorm.state="0", submit.mode="submit") @@ -132,10 +105,7 @@ suite <- new ("RKTestSuite", id="distributions", rk.call.plugin ("rkward::plot_logistic_distribution", function.string="d", loc.real="0.00", log.state="0", max.real="3.29", min.real="-3.29", n.real="100.00", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", scale.real="1.00", submit.mode="submit") }), new ("RKTest", id="log_normal_probabilities", call=function () { - rk.call.plugin ("rkward::log_normal_probabilities", logp.string="log.p = FALSE", meanlog.real="0.00", q.text="0.95", sdlog.real="1.00", tail.string="lower.tail=TRUE", submit.mode="submit") - }), - new ("RKTest", id="log_normal_quantiles", call=function () { - rk.call.plugin ("rkward::log_normal_quantiles", logp.string="log.p = FALSE", meanlog.real="0.00", p.text="0.95", sdlog.real="1.00", tail.string="lower.tail=FALSE", submit.mode="submit") + rk.call.plugin ("rkward::log_normal_probabilities", logp.state="0", lower.state="1", meanlog.real="0.0", mode.string="p", q.tsv="", sdlog.real="1.0", submit.mode="submit") }), new ("RKTest", id="log_normal_clt", call=function () { rk.call.plugin ("rkward::plot_log_normal_clt", drawnorm.state="1", function.string="hist", histogram_opt.addtoplot.state="", histogram_opt.angle.real="45.00", histogram_opt.barlabels.state="", histogram_opt.density.real="7.00", histogram_opt.doborder.state="", histogram_opt.freq.state="0", histogram_opt.histbreaksFunction.string="Scott", histogram_opt.histlinetype.string="solid", histogram_opt.rightclosed.state="1", histogram_opt.usefillcol.state="", mean.real="0.00", nAvg.real="10.00", nDist.real="1000.00", normlinecol.color.string="red", normpointtype.string="l", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", scalenorm.state="0", sd.real="1.00", submit.mode="submit") @@ -144,10 +114,7 @@ suite <- new ("RKTestSuite", id="distributions", rk.call.plugin ("rkward::plot_lognormal_distribution", function.string="p", log.state="0", lower.state="1", max.real="3.29", mean.real="4.00", min.real="0.01", n.real="100.00", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", sd.real="1.00", submit.mode="submit") }), new ("RKTest", id="normal_probabilities", call=function () { - rk.call.plugin ("rkward::normal_probabilities", logp.string="log.p = FALSE", mean.real="0.00", q.text="0.95", sd.real="1.00", tail.string="lower.tail=TRUE", submit.mode="submit") - }), - new ("RKTest", id="normal_quantiles", call=function () { - rk.call.plugin ("rkward::normal_quantiles", logp.string="log.p = FALSE", mean.real="0.00", p.text="0.95", sd.real="1.00", tail.string="lower.tail=TRUE", submit.mode="submit") + rk.call.plugin ("rkward::normal_probabilities", logp.state="0", lower.state="1", mean.real="0.00", mode.string="p", q.tsv="", sd.real="1.00", submit.mode="submit") }), new ("RKTest", id="normal_clt", call=function () { rk.call.plugin ("rkward::plot_normal_clt", dist_stepfun.addtoplot.state="", dist_stepfun.col_hor.color.string="blue", dist_stepfun.col_vert.color.string="blue", dist_stepfun.col_y0.color.string="gold", dist_stepfun.col_y1.color.string="cyan", dist_stepfun.do_points.state="", dist_stepfun.linetype.string="", dist_stepfun.verticals.state="1", drawnorm.state="1", function.string="dist", mean.real="0.00", nAvg.real="10.00", nDist.real="1000.00", normlinecol.color.string="red", normpointtype.string="l", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", scalenorm.state="0", sd.real="1.00", submit.mode="submit") @@ -156,10 +123,7 @@ suite <- new ("RKTestSuite", id="distributions", rk.call.plugin ("rkward::plot_normal_distribution", function.string="d", log.state="0", max.real="3.29", mean.real="0.00", min.real="-3.29", n.real="100.00", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", sd.real="1.00", submit.mode="submit") }), new ("RKTest", id="t_probabilities", call=function () { - rk.call.plugin ("rkward::t_probabilities", df.real="1.00", logp.string="log.p = FALSE", ncp.real="0.00", q.text="0.95", tail.string="lower.tail=TRUE", submit.mode="submit") - }), - new ("RKTest", id="t_quantiles", call=function () { - rk.call.plugin ("rkward::t_quantiles", df.real="1.00", logp.string="log.p = FALSE", ncp.real="0.00", p.text="0.95", tail.string="lower.tail=TRUE", submit.mode="submit") + rk.call.plugin ("rkward::t_probabilities", df.real="10.0", logp.state="0", lower.state="1", mode.string="p", ncp.real="0.0", q.tsv="", submit.mode="submit") }), new ("RKTest", id="t_clt", call=function () { rk.call.plugin ("rkward::plot_t_clt", df.real="3.00", drawnorm.state="1", function.string="hist", histogram_opt.addtoplot.state="", histogram_opt.barlabels.state="", histogram_opt.density.real="-1.00", histogram_opt.doborder.state="1", histogram_opt.freq.state="0", histogram_opt.histbordercol.color.string="", histogram_opt.histbreaksFunction.string="Sturges", histogram_opt.histlinetype.string="solid", histogram_opt.rightclosed.state="1", histogram_opt.usefillcol.state="", nAvg.real="10.00", nDist.real="1000.00", ncp.real="0.00", normlinecol.color.string="red", normpointtype.string="l", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", scalenorm.state="0", submit.mode="submit") @@ -168,19 +132,13 @@ suite <- new ("RKTestSuite", id="distributions", rk.call.plugin ("rkward::plot_t_distribution", df.real="1.00", function.string="p", log.state="0", lower.state="1", max.real="12.924", min.real="-12.924", n.real="100.00", ncp.real="0.00", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", submit.mode="submit") }), new ("RKTest", id="tukey_probabilities", call=function () { - rk.call.plugin ("rkward::tukey_probabilities", df.text="5", logp.string="log.p = FALSE", nmeans.real="2.00", nranges.real="1.00", q.text="0.95", tail.string="lower.tail=TRUE", submit.mode="submit") - }), - new ("RKTest", id="tukey_quantiles", call=function () { - rk.call.plugin ("rkward::tukey_quantiles", df.text="2:11", logp.string="log.p = FALSE", nmeans.real="2.00", nranges.real="1.00", p.text="0.95", tail.string="lower.tail=TRUE", submit.mode="submit") + rk.call.plugin ("rkward::tukey_probabilities", df.real="5.0", logp.state="0", lower.state="1", mode.string="p", nmeans.real="5.00", q.tsv="", submit.mode="submit") }), new ("RKTest", id="plot_tukey_distribution", call=function () { rk.call.plugin ("rkward::plot_tukey_distribution", df.real="5.00", log.state="0", lower.state="1", max.real="8.00", min.real="-1.00", n.real="101.00", nmeans.real="6.00", nranges.real="1.00", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", submit.mode="submit") }), new ("RKTest", id="uniform_probabilities", call=function () { - rk.call.plugin ("rkward::uniform_probabilities", logp.string="log.p = FALSE", max.real="1.00", min.real="0.00", q.text="0.95", tail.string="lower.tail=TRUE", submit.mode="submit") - }), - new ("RKTest", id="uniform_quantiles", call=function () { - rk.call.plugin ("rkward::uniform_quantiles", logp.string="log.p = FALSE", max.real="1.00", min.real="0.00", p.text="0.95", tail.string="lower.tail=TRUE", submit.mode="submit") + rk.call.plugin ("rkward::uniform_probabilities", logp.state="0", lower.state="1", max.real="1.00", min.real="0.00", mode.string="p", q.tsv="", submit.mode="submit") }), new ("RKTest", id="uniform_clt", call=function () { rk.call.plugin ("rkward::plot_uniform_clt", drawnorm.state="1", function.string="hist", histogram_opt.addtoplot.state="", histogram_opt.barlabels.state="", histogram_opt.density.real="-1.00", histogram_opt.doborder.state="1", histogram_opt.freq.state="0", histogram_opt.histbordercol.color.string="", histogram_opt.histbreaksFunction.string="Sturges", histogram_opt.histlinetype.string="solid", histogram_opt.rightclosed.state="1", histogram_opt.usefillcol.state="", llim.real="0.00", nAvg.real="10.00", nDist.real="1000.00", normlinecol.color.string="red", normpointtype.string="l", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", scalenorm.state="0", ulim.real="1.00", submit.mode="submit") @@ -189,10 +147,7 @@ suite <- new ("RKTestSuite", id="distributions", rk.call.plugin ("rkward::plot_uniform_distribution", function.string="d", llim.real="0.00", log.state="0", max.real="2.00", min.real="-1.00", n.real="100.00", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", ulim.real="1.00", submit.mode="submit") }), new ("RKTest", id="weibull_probabilities", call=function () { - rk.call.plugin ("rkward::weibull_probabilities", logp.string="log.p = FALSE", q.text="0.95", scale.real="1.00", shape.real="1.00", tail.string="lower.tail=TRUE", submit.mode="submit") - }), - new ("RKTest", id="weibull_quantiles", call=function () { - rk.call.plugin ("rkward::weibull_quantiles", logp.string="log.p = FALSE", p.text="0.95", scale.real="1.00", shape.real="1.00", tail.string="lower.tail=TRUE", submit.mode="submit") + rk.call.plugin ("rkward::weibull_probabilities", logp.state="0", lower.state="1", mode.string="p", q.tsv="", scale.real="1.0", shape.real="1.0", submit.mode="submit") }), new ("RKTest", id="weibull_clt", call=function () { rk.call.plugin ("rkward::plot_weibull_clt", drawnorm.state="1", function.string="hist", histogram_opt.addtoplot.state="", histogram_opt.barlabels.state="", histogram_opt.density.real="-1.00", histogram_opt.doborder.state="1", histogram_opt.freq.state="0", histogram_opt.histbordercol.color.string="", histogram_opt.histbreaksFunction.string="Sturges", histogram_opt.histlinetype.string="solid", histogram_opt.rightclosed.state="1", histogram_opt.usefillcol.state="", nAvg.real="10.00", nDist.real="1000.00", normlinecol.color.string="red", normpointtype.string="l", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", scale.real="1.00", scalenorm.state="0", shape.real="2.00", submit.mode="submit") @@ -201,10 +156,7 @@ suite <- new ("RKTestSuite", id="distributions", rk.call.plugin ("rkward::plot_weibull_distribution", function.string="d", log.state="0", max.real="5.00", min.real="0.00", n.real="100.00", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", scale.real="1.00", shape.real="2.00", submit.mode="submit") }), new ("RKTest", id="binomial_probabilities", call=function () { - rk.call.plugin ("rkward::binomial_tail_probabilities", logp.string="log.p = FALSE", prob.real="0.50", q.text="0.95 2", size.real="3.00", tail.string="lower.tail=TRUE", submit.mode="submit") - }), - new ("RKTest", id="binomial_quantiles", call=function () { - rk.call.plugin ("rkward::binomial_quantiles", logp.string="log.p = FALSE", p.text="0.95 .5", prob.real="0.50", size.real="3.00", tail.string="lower.tail=TRUE", submit.mode="submit") + rk.call.plugin ("rkward::binomial_probabilities", logp.state="0", lower.state="1", mode.string="p", prob.real="0.50", q.tsv="", size.real="10.00", submit.mode="submit") }), new ("RKTest", id="binomial_clt", call=function () { rk.call.plugin ("rkward::plot_binomial_clt", drawnorm.state="1", function.string="hist", histogram_opt.addtoplot.state="", histogram_opt.barlabels.state="", histogram_opt.density.real="-1.00", histogram_opt.doborder.state="1", histogram_opt.freq.state="0", histogram_opt.histbordercol.color.string="", histogram_opt.histbreaksFunction.string="int", histogram_opt.histlinetype.string="solid", histogram_opt.include_lowest.state="1", histogram_opt.rightclosed.state="1", histogram_opt.usefillcol.state="", nAvg.real="1.00", nDist.real="1000.00", normlinecol.color.string="red", normpointtype.string="l", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", prob.real="0.50", scalenorm.state="0", size.real="11.00", submit.mode="submit") @@ -213,10 +165,7 @@ suite <- new ("RKTestSuite", id="distributions", rk.call.plugin ("rkward::plot_binomial_distribution", function.string="d", log.state="0", max.real="12.00", min.real="0.00", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="p", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", prob.real="0.50", size.real="12.00", submit.mode="submit") }), new ("RKTest", id="geom_probabilities", call=function () { - rk.call.plugin ("rkward::geom_probabilities", logp.string="log.p = FALSE", prob.real="0.50", q.text="0.95", tail.string="lower.tail=TRUE", submit.mode="submit") - }), - new ("RKTest", id="geom_quantiles", call=function () { - rk.call.plugin ("rkward::geom_quantiles", logp.string="log.p = FALSE", p.text="0.95", prob.real="0.50", tail.string="lower.tail=TRUE", submit.mode="submit") + rk.call.plugin ("rkward::geom_probabilities", logp.state="0", lower.state="1", mode.string="p", prob.real="0.50", q.tsv="", submit.mode="submit") }), new ("RKTest", id="geometric_clt", call=function () { rk.call.plugin ("rkward::plot_geometric_clt", drawnorm.state="1", function.string="hist", histogram_opt.addtoplot.state="", histogram_opt.barlabels.state="", histogram_opt.density.real="-1.00", histogram_opt.doborder.state="1", histogram_opt.freq.state="0", histogram_opt.histbordercol.color.string="", histogram_opt.histbreaksFunction.string="Sturges", histogram_opt.histlinetype.string="solid", histogram_opt.rightclosed.state="1", histogram_opt.usefillcol.state="", nAvg.real="10.00", nDist.real="1000.00", normlinecol.color.string="red", normpointtype.string="l", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", prob.real="0.50", scalenorm.state="0", submit.mode="submit") @@ -225,10 +174,7 @@ suite <- new ("RKTestSuite", id="distributions", rk.call.plugin ("rkward::plot_geometric_distribution", function.string="d", log.state="0", max.real="12.00", min.real="0.00", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="p", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", prob.real="0.50", submit.mode="submit") }), new ("RKTest", id="hypergeometric_probabilities", call=function () { - rk.call.plugin ("rkward::hypergeometric_probabilities", k.real="4.00", logp.string="log.p = FALSE", m.real="5.00", n.real="4.00", q.text="0 1 2 3 4 5", tail.string="lower.tail=FALSE", submit.mode="submit") - }), - new ("RKTest", id="hypergeometric_quantiles", call=function () { - rk.call.plugin ("rkward::hypergeometric_quantiles", k.real="1.00", logp.string="log.p = FALSE", m.real="1.00", n.real="1.00", p.text="0.95", tail.string="lower.tail=TRUE", submit.mode="submit") + rk.call.plugin ("rkward::hypergeometric_probabilities", k.real="5.00", logp.state="0", lower.state="1", m.real="10.00", mode.string="p", n.real="10.00", q.tsv="", submit.mode="submit") }), new ("RKTest", id="hypergeometric_clt", call=function () { rk.call.plugin ("rkward::plot_hypergeometric_clt", drawnorm.state="1", function.string="hist", histogram_opt.addtoplot.state="", histogram_opt.barlabels.state="", histogram_opt.density.real="-1.00", histogram_opt.doborder.state="1", histogram_opt.freq.state="0", histogram_opt.histbordercol.color.string="", histogram_opt.histbreaksFunction.string="Sturges", histogram_opt.histlinetype.string="solid", histogram_opt.rightclosed.state="1", histogram_opt.usefillcol.state="", k.real="15.00", m.real="12.00", n.real="12.00", nAvg.real="10.00", nDist.real="1000.00", normlinecol.color.string="red", normpointtype.string="l", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", scalenorm.state="0", submit.mode="submit") @@ -237,10 +183,7 @@ suite <- new ("RKTestSuite", id="distributions", rk.call.plugin ("rkward::plot_hypergeometric_distribution", function.string="p", k.real="15.00", log.state="0", lower.state="1", m.real="12.00", max.real="12.00", min.real="0.00", n_val.real="12.00", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="p", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", submit.mode="submit") }), new ("RKTest", id="negative_binomial_probabilities", call=function () { - rk.call.plugin ("rkward::negative_binomial_probabilities", logp.string="log.p = TRUE", prob.real="0.50", q.text="0.95", size.real="3.00", tail.string="lower.tail=TRUE", submit.mode="submit") - }), - new ("RKTest", id="negative_binomial_quantiles", call=function () { - rk.call.plugin ("rkward::negative_binomial_quantiles", logp.string="log.p = FALSE", p.text="0.95", prob.real="0.50", size.real="4.00", tail.string="lower.tail=TRUE", submit.mode="submit") + rk.call.plugin ("rkward::negative_binomial_probabilities", logp.state="0", lower.state="1", mode.string="p", prob.real="0.5", q.tsv="", size.real="5", submit.mode="submit") }), new ("RKTest", id="negbinomial_clt", call=function () { rk.call.plugin ("rkward::plot_negbinomial_clt", drawnorm.state="1", function.string="hist", histogram_opt.addtoplot.state="", histogram_opt.barlabels.state="", histogram_opt.density.real="-1.00", histogram_opt.doborder.state="1", histogram_opt.freq.state="0", histogram_opt.histbordercol.color.string="", histogram_opt.histbreaksFunction.string="Sturges", histogram_opt.histlinetype.string="solid", histogram_opt.rightclosed.state="1", histogram_opt.usefillcol.state="", nAvg.real="10.00", nDist.real="1000.00", normlinecol.color.string="red", normpointtype.string="l", param.string="pprob", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plotoptions.pointtype.string="", plotoptions.sub.text="", plotoptions.xaxt.state="", plotoptions.xlab.text="", plotoptions.xlog.state="", plotoptions.xmaxvalue.text="", plotoptions.xminvalue.text="", plotoptions.yaxt.state="", plotoptions.ylab.text="", plotoptions.ylog.state="", plotoptions.ymaxvalue.text="", plotoptions.yminvalue.text="", prob.real="0.28", scalenorm.state="0", size_disp.real="12.00", size_trial.real="12.00", submit.mode="submit") @@ -249,10 +192,7 @@ suite <- new ("RKTestSuite", id="distributions", rk.call.plugin ("rkward::plot_negbinomial_distribution", function.string="d", log.state="0", max.real="24.00", min.real="0.00", param.string="pprob", plotoptions.add_grid.state="0", plotoptions.asp.real="0.00", plotoptions.main.text="", plotoptions.pointcolor.color.string="", plo... [truncated message content] |
From: Thomas F. <tho...@ru...> - 2015-01-27 20:13:14
|
Git commit 42773350585955559129214d5c05b0b777d83ced by Thomas Friedrichsmeier. Committed on 27/01/2015 at 20:11. Pushed by tfry into branch 'work/distributions'. Add at least a minimal help page to all distribution plugins. Some minor adjustments. Left to do: Testing, and writing automated tests. M +1 -0 rkward/plugins/distributions/dist_common.js M +21 -0 rkward/plugins/distributions/gumbel.rkh M +24 -0 rkward/plugins/distributions/hypergeometric.rkh M +21 -0 rkward/plugins/distributions/log_normal.rkh M +21 -0 rkward/plugins/distributions/logistic.rkh M +23 -0 rkward/plugins/distributions/negative_binomial.rkh M +2 -2 rkward/plugins/distributions/negative_binomial.xml M +1 -1 rkward/plugins/distributions/normal.js M +23 -0 rkward/plugins/distributions/normal.rkh M +1 -0 rkward/plugins/distributions/plot_binomial_distribution.rkh M +1 -0 rkward/plugins/distributions/plot_cauchy_distribution.rkh M +1 -0 rkward/plugins/distributions/plot_chi_squared_distribution.rkh M +1 -0 rkward/plugins/distributions/plot_exponential_distribution.rkh M +1 -0 rkward/plugins/distributions/plot_f_distribution.rkh M +1 -0 rkward/plugins/distributions/plot_gamma_distribution.rkh M +1 -0 rkward/plugins/distributions/plot_geometric_distribution.rkh M +1 -0 rkward/plugins/distributions/plot_hypergeometric_distribution.rkh M +1 -0 rkward/plugins/distributions/plot_logistic_distribution.rkh M +1 -0 rkward/plugins/distributions/plot_lognormal_distribution.rkh M +1 -0 rkward/plugins/distributions/plot_negbinomial_distribution.rkh M +1 -0 rkward/plugins/distributions/plot_normal_distribution.rkh M +1 -0 rkward/plugins/distributions/plot_poisson_distribution.rkh M +1 -0 rkward/plugins/distributions/plot_t_distribution.rkh M +1 -0 rkward/plugins/distributions/plot_tukey_distribution.rkh M +1 -0 rkward/plugins/distributions/plot_uniform_distribution.rkh M +1 -0 rkward/plugins/distributions/plot_weibull_distribution.rkh M +1 -0 rkward/plugins/distributions/plot_wilcoxon_distribution.rkh M +22 -0 rkward/plugins/distributions/poisson.rkh M +2 -3 rkward/plugins/distributions/poisson.xml M +21 -0 rkward/plugins/distributions/t.rkh M +1 -1 rkward/plugins/distributions/tukey.js M +23 -0 rkward/plugins/distributions/tukey.rkh M +2 -3 rkward/plugins/distributions/tukey.xml M +21 -0 rkward/plugins/distributions/uniform.rkh M +21 -0 rkward/plugins/distributions/weibull.rkh M +2 -2 rkward/plugins/distributions/weibull.xml M +23 -0 rkward/plugins/distributions/wilcoxon.rkh M +3 -2 rkward/plugins/distributions/wilcoxon.xml http://commits.kde.org/rkward/42773350585955559129214d5c05b0b777d83ced diff --git a/rkward/plugins/distributions/dist_common.js b/rkward/plugins/distributions/dist_common.js index de9d69e..fdfef01 100644 --- a/rkward/plugins/distributions/dist_common.js +++ b/rkward/plugins/distributions/dist_common.js @@ -67,6 +67,7 @@ function calculate () { values = 'seq (' + String (dist["min"]) + ', ' + String (dist["max"]) + ', length.out=' + String (max_auto_sequence_length) + ')'; } } else { // invar == 'p' + max_auto_sequence_length += 1; // here, an uneven number is preferrable for divisibility of steps by 2 if (logpd) { values = '-' + String (max_auto_sequence_length) + ':0'; } else { diff --git a/rkward/plugins/distributions/gumbel.rkh b/rkward/plugins/distributions/gumbel.rkh index e69de29..9555fd4 100644 --- a/rkward/plugins/distributions/gumbel.rkh +++ b/rkward/plugins/distributions/gumbel.rkh @@ -0,0 +1,21 @@ +<!DOCTYPE rkhelp> +<document> + <snippets> + <include file="dist_help_snippets.xml"/> + </snippets> + <summary> + Provides a calculator for probabilities, quantiles, and densities in the Gumbel distribution. + </summary> + <insert snippet="dialog_usage"/> + <settings> + <insert snippet="dialog_settings"/> + <setting id="location">Location parameter.</setting> + <setting id="scale">Scale parameter.</setting> + </settings> + <related> + <ul> + <li><link href="rkward://rhelp/pgumgel">R help on the gumbel distribution functions from package FAdist</li> + <li><link href="rkward://component/rkward/plot_gumbel_distribution"/></li> + </ul> + </related> +</document> diff --git a/rkward/plugins/distributions/hypergeometric.rkh b/rkward/plugins/distributions/hypergeometric.rkh index e69de29..24358c8 100644 --- a/rkward/plugins/distributions/hypergeometric.rkh +++ b/rkward/plugins/distributions/hypergeometric.rkh @@ -0,0 +1,24 @@ +<!DOCTYPE rkhelp> +<document> + <snippets> + <include file="dist_help_snippets.xml"/> + </snippets> + <summary> + Provides a calculator for probabilities, quantiles, and densities in the Hypergeometric distribution. + + Quantiles represent the number of white balls drawn in k draws without replacement from an urn containing m white and n black balls. + </summary> + <insert snippet="dialog_usage"/> + <settings> + <insert snippet="dialog_settings"/> + <setting id="m">m (Number of white balls in the urn)</setting> + <setting id="n">n (Number of black balls in the urn)</setting> + <setting id="k">k (Number of draws from the urn)</setting> + </settings> + <related> + <ul> + <li><link href="rkward://rhelp/Hypergeometric"/></li> + <li><link href="rkward://component/rkward/plot_hypergeom_distribution"/></li> + </ul> + </related> +</document> diff --git a/rkward/plugins/distributions/log_normal.rkh b/rkward/plugins/distributions/log_normal.rkh index e69de29..3b9009a 100644 --- a/rkward/plugins/distributions/log_normal.rkh +++ b/rkward/plugins/distributions/log_normal.rkh @@ -0,0 +1,21 @@ +<!DOCTYPE rkhelp> +<document> + <snippets> + <include file="dist_help_snippets.xml"/> + </snippets> + <summary> + Provides a calculator for probabilities, quantiles, and densities in the Log-Normal distribution. + </summary> + <insert snippet="dialog_usage"/> + <settings> + <insert snippet="dialog_settings"/> + <setting id="meanlog">meanlog (mean of the distribution on the log scale)</setting> + <setting id="sdlog">sdlog (standard deviation of the distribution on the log scale)</setting> + </settings> + <related> + <ul> + <li><link href="rkward://rhelp/Lognormal"/></li> + <li><link href="rkward://component/rkward/plot_lognormal_distribution"/></li> + </ul> + </related> +</document> diff --git a/rkward/plugins/distributions/logistic.rkh b/rkward/plugins/distributions/logistic.rkh index e69de29..0439336 100644 --- a/rkward/plugins/distributions/logistic.rkh +++ b/rkward/plugins/distributions/logistic.rkh @@ -0,0 +1,21 @@ +<!DOCTYPE rkhelp> +<document> + <snippets> + <include file="dist_help_snippets.xml"/> + </snippets> + <summary> + Provides a calculator for probabilities, quantiles, and densities in the logistic distribution. + </summary> + <insert snippet="dialog_usage"/> + <settings> + <insert snippet="dialog_settings"/> + <setting id="location">Location parameter μ (corresponds to the mean).</setting> + <setting id="scale">Scale parameter.</setting> + </settings> + <related> + <ul> + <li><link href="rkward://rhelp/Logistic"/></li> + <li><link href="rkward://component/rkward/plot_logistic_distribution"/></li> + </ul> + </related> +</document> diff --git a/rkward/plugins/distributions/negative_binomial.rkh b/rkward/plugins/distributions/negative_binomial.rkh index e69de29..77856d8 100644 --- a/rkward/plugins/distributions/negative_binomial.rkh +++ b/rkward/plugins/distributions/negative_binomial.rkh @@ -0,0 +1,23 @@ +<!DOCTYPE rkhelp> +<document> + <snippets> + <include file="dist_help_snippets.xml"/> + </snippets> + <summary> + Provides a calculator for probabilities, quantiles, and densities in the Negative Binomial distribution. + + Note: Quantiles represents the number of failures in a sequence of Bernoulli trials before the target number of successes is reached. + </summary> + <insert snippet="dialog_usage"/> + <settings> + <insert snippet="dialog_settings"/> + <setting id="size">Target number of successes. This need not be an integer.</setting> + <setting id="prob">Probability of success in each trial. Note that this setting is <b>not</b> affected by the "log probabilities" setting, i.e. always specify the plain probability.</setting> + </settings> + <related> + <ul> + <li><link href="rkward://rhelp/NegBinomial"/></li> + <li><link href="rkward://component/rkward/plot_negbinomial_distribution"/></li> + </ul> + </related> +</document> diff --git a/rkward/plugins/distributions/negative_binomial.xml b/rkward/plugins/distributions/negative_binomial.xml index aa8a636..27c564b 100755 --- a/rkward/plugins/distributions/negative_binomial.xml +++ b/rkward/plugins/distributions/negative_binomial.xml @@ -10,8 +10,8 @@ </logic> <snippets> <snippet id="dist_options"> - <spinbox type="integer" min="0" initial="5" id="size" label="Target for number of successful trials"/> - <spinbox default_precision="2" type="real" min="0" initial="0.5" max="1" id="prob" label="Probability of success in each trial"/> + <spinbox default_precision="0" type="real" min="0" initial="5" id="size" label="Target number of successful trials"/> + <spinbox default_precision="1" type="real" min="0" initial="0.5" max="1" id="prob" label="Probability of success in each trial"/> </snippet> <include file="dist_snippets.xml"/> </snippets> diff --git a/rkward/plugins/distributions/normal.js b/rkward/plugins/distributions/normal.js index d9e5518..2b8cc80 100644 --- a/rkward/plugins/distributions/normal.js +++ b/rkward/plugins/distributions/normal.js @@ -1,5 +1,5 @@ include ("dist_common.js"); function getDistSpecifics () { - return initDistSpecifics (i18n ('Normal distribution'), 'norm', ["mean", "sd"], [-4, 4], continous); + return initDistSpecifics (i18n ('Normal distribution'), 'norm', ["mean", "sd"], [-4, 4], continuous); } diff --git a/rkward/plugins/distributions/normal.rkh b/rkward/plugins/distributions/normal.rkh index e69de29..c41441a 100644 --- a/rkward/plugins/distributions/normal.rkh +++ b/rkward/plugins/distributions/normal.rkh @@ -0,0 +1,23 @@ +<!DOCTYPE rkhelp> +<document> + <snippets> + <include file="dist_help_snippets.xml"/> + </snippets> + <summary> + Provides a calculator for probabilities, quantiles, and densities in the Normal distribution. + </summary> + <insert snippet="dialog_usage"/> + <settings> + <insert snippet="dialog_settings"/> + <setting id="mean">Mean.</setting> + <setting id="prob">Standard deviation.</setting> + </settings> + <related> + <ul> + <li><link href="rkward://rhelp/Normal"/></li> + <li><link href="rkward://component/rkward/plot_normal_distribution"/></li> + </ul> + + Various tests for normality of observed measures are available, for instance <link href="rkward://component/rkward/jb_test"/>. + </related> +</document> diff --git a/rkward/plugins/distributions/plot_binomial_distribution.rkh b/rkward/plugins/distributions/plot_binomial_distribution.rkh index 4e28fac..2a3212a 100644 --- a/rkward/plugins/distributions/plot_binomial_distribution.rkh +++ b/rkward/plugins/distributions/plot_binomial_distribution.rkh @@ -20,6 +20,7 @@ Density and distribution function plots for the Binomial distribution. <related> <ul> + <li><link href="rkward://component/binomial_probabilities"/></li> <li><link href="rkward://rhelp/Binomial"/></li> <li><link href="rkward://component/plot_options"/></li> <li><link href="rkward://rhelp/curve"/></li> diff --git a/rkward/plugins/distributions/plot_cauchy_distribution.rkh b/rkward/plugins/distributions/plot_cauchy_distribution.rkh index 2c9a82c..d7a3837 100644 --- a/rkward/plugins/distributions/plot_cauchy_distribution.rkh +++ b/rkward/plugins/distributions/plot_cauchy_distribution.rkh @@ -19,6 +19,7 @@ Density and distribution function plots for the Cauchy distribution. </settings> <related> <ul> + <li><link href="rkward://component/cauchy_probabilities"/></li> <li><link href="rkward://rhelp/Cauchy"/></li> <li><link href="rkward://component/plot_options"/></li> <li><link href="rkward://rhelp/curve"/></li> diff --git a/rkward/plugins/distributions/plot_chi_squared_distribution.rkh b/rkward/plugins/distributions/plot_chi_squared_distribution.rkh index af2190e..c45a9d7 100644 --- a/rkward/plugins/distributions/plot_chi_squared_distribution.rkh +++ b/rkward/plugins/distributions/plot_chi_squared_distribution.rkh @@ -20,6 +20,7 @@ Density and distribution function plots for the Chi-squared distribution. <related> <ul> + <li><link href="rkward://component/chi_squared_probabilities"/></li> <li><link href="rkward://rhelp/Chisquare"/></li> <li><link href="rkward://component/plot_options"/></li> <li><link href="rkward://rhelp/curve"/></li> diff --git a/rkward/plugins/distributions/plot_exponential_distribution.rkh b/rkward/plugins/distributions/plot_exponential_distribution.rkh index 1372ac6..a2deb73 100644 --- a/rkward/plugins/distributions/plot_exponential_distribution.rkh +++ b/rkward/plugins/distributions/plot_exponential_distribution.rkh @@ -18,6 +18,7 @@ Density and distribution function plots for the Exponential distribution. </settings> <related> <ul> + <li><link href="rkward://component/exponential_probabilities"/></li> <li><link href="rkward://rhelp/Exponential"/></li> <li><link href="rkward://component/plot_options"/></li> <li><link href="rkward://rhelp/curve"/></li> diff --git a/rkward/plugins/distributions/plot_f_distribution.rkh b/rkward/plugins/distributions/plot_f_distribution.rkh index ab90b0f..8d6ce0c 100644 --- a/rkward/plugins/distributions/plot_f_distribution.rkh +++ b/rkward/plugins/distributions/plot_f_distribution.rkh @@ -21,6 +21,7 @@ Density and distribution function plots for the F distribution. <related> <ul> + <li><link href="rkward://component/f_probabilities"/></li> <li><link href="rkward://rhelp/FDist"/></li> <li><link href="rkward://component/plot_options"/></li> <li><link href="rkward://rhelp/curve"/></li> diff --git a/rkward/plugins/distributions/plot_gamma_distribution.rkh b/rkward/plugins/distributions/plot_gamma_distribution.rkh index 0fc8467..680c158 100644 --- a/rkward/plugins/distributions/plot_gamma_distribution.rkh +++ b/rkward/plugins/distributions/plot_gamma_distribution.rkh @@ -20,6 +20,7 @@ Density and distribution function plots for the Gamma distribution. <related> <ul> + <li><link href="rkward://component/gamma_probabilities"/></li> <li><link href="rkward://rhelp/GammaDist"/></li> <li><link href="rkward://component/plot_options"/></li> <li><link href="rkward://rhelp/curve"/></li> diff --git a/rkward/plugins/distributions/plot_geometric_distribution.rkh b/rkward/plugins/distributions/plot_geometric_distribution.rkh index f504683..eb40014 100644 --- a/rkward/plugins/distributions/plot_geometric_distribution.rkh +++ b/rkward/plugins/distributions/plot_geometric_distribution.rkh @@ -19,6 +19,7 @@ Density and distribution function plots for the Geometric distribution. <related> <ul> + <li><link href="rkward://component/geometric_probabilities"/></li> <li><link href="rkward://rhelp/Geometric"/></li> <li><link href="rkward://component/plot_options"/></li> <li><link href="rkward://rhelp/curve"/></li> diff --git a/rkward/plugins/distributions/plot_hypergeometric_distribution.rkh b/rkward/plugins/distributions/plot_hypergeometric_distribution.rkh index b7532bb..cca9783 100644 --- a/rkward/plugins/distributions/plot_hypergeometric_distribution.rkh +++ b/rkward/plugins/distributions/plot_hypergeometric_distribution.rkh @@ -21,6 +21,7 @@ Density and distribution function plots for the Hypergeometric distribution. <related> <ul> + <li><link href="rkward://component/hypergeometric_probabilities"/></li> <li><link href="rkward://rhelp/Hypergeometric"/></li> <li><link href="rkward://component/plot_options"/></li> <li><link href="rkward://rhelp/curve"/></li> diff --git a/rkward/plugins/distributions/plot_logistic_distribution.rkh b/rkward/plugins/distributions/plot_logistic_distribution.rkh index db70b8f..b03c032 100644 --- a/rkward/plugins/distributions/plot_logistic_distribution.rkh +++ b/rkward/plugins/distributions/plot_logistic_distribution.rkh @@ -20,6 +20,7 @@ Density and distribution function plots for the Logistic distribution. <related> <ul> + <li><link href="rkward://component/logistic_probabilities"/></li> <li><link href="rkward://rhelp/Logistic"/></li> <li><link href="rkward://component/plot_options"/></li> <li><link href="rkward://rhelp/curve"/></li> diff --git a/rkward/plugins/distributions/plot_lognormal_distribution.rkh b/rkward/plugins/distributions/plot_lognormal_distribution.rkh index a594a2a..97ea5d4 100644 --- a/rkward/plugins/distributions/plot_lognormal_distribution.rkh +++ b/rkward/plugins/distributions/plot_lognormal_distribution.rkh @@ -20,6 +20,7 @@ Density and distribution function plots for the Lognormal distribution. <related> <ul> + <li><link href="rkward://component/lognormal_probabilities"/></li> <li><link href="rkward://rhelp/Lognormal"/></li> <li><link href="rkward://component/plot_options"/></li> <li><link href="rkward://rhelp/curve"/></li> diff --git a/rkward/plugins/distributions/plot_negbinomial_distribution.rkh b/rkward/plugins/distributions/plot_negbinomial_distribution.rkh index 1af8eec..5a2542c 100644 --- a/rkward/plugins/distributions/plot_negbinomial_distribution.rkh +++ b/rkward/plugins/distributions/plot_negbinomial_distribution.rkh @@ -23,6 +23,7 @@ Density and distribution function plots for the Negative Binomial distribution. <related> <ul> + <li><link href="rkward://component/negative_binomial_probabilities"/></li> <li><link href="rkward://rhelp/NegBinomial"/></li> <li><link href="rkward://component/plot_options"/></li> <li><link href="rkward://rhelp/curve"/></li> diff --git a/rkward/plugins/distributions/plot_normal_distribution.rkh b/rkward/plugins/distributions/plot_normal_distribution.rkh index 7be81f8..13584ac 100644 --- a/rkward/plugins/distributions/plot_normal_distribution.rkh +++ b/rkward/plugins/distributions/plot_normal_distribution.rkh @@ -20,6 +20,7 @@ Density and distribution function plots for the Normal distribution. <related> <ul> + <li><link href="rkward://component/normal_probabilities"/></li> <li><link href="rkward://rhelp/Normal"/></li> <li><link href="rkward://component/plot_options"/></li> <li><link href="rkward://rhelp/curve"/></li> diff --git a/rkward/plugins/distributions/plot_poisson_distribution.rkh b/rkward/plugins/distributions/plot_poisson_distribution.rkh index 5e6456c..ef570af 100644 --- a/rkward/plugins/distributions/plot_poisson_distribution.rkh +++ b/rkward/plugins/distributions/plot_poisson_distribution.rkh @@ -19,6 +19,7 @@ Density and distribution function plots for the Poisson distribution. <related> <ul> + <li><link href="rkward://component/poisson_probabilities"/></li> <li><link href="rkward://rhelp/Poisson"/></li> <li><link href="rkward://component/plot_options"/></li> <li><link href="rkward://rhelp/curve"/></li> diff --git a/rkward/plugins/distributions/plot_t_distribution.rkh b/rkward/plugins/distributions/plot_t_distribution.rkh index b4f448f..9b3810c 100644 --- a/rkward/plugins/distributions/plot_t_distribution.rkh +++ b/rkward/plugins/distributions/plot_t_distribution.rkh @@ -19,6 +19,7 @@ Density and distribution function plots for the t distribution. </settings> <related> <ul> + <li><link href="rkward://component/t_probabilities"/></li> <li><link href="rkward://rhelp/TDist"/></li> <li><link href="rkward://component/plot_options"/></li> <li><link href="rkward://rhelp/curve"/></li> diff --git a/rkward/plugins/distributions/plot_tukey_distribution.rkh b/rkward/plugins/distributions/plot_tukey_distribution.rkh index a492f34..6c58dbd 100644 --- a/rkward/plugins/distributions/plot_tukey_distribution.rkh +++ b/rkward/plugins/distributions/plot_tukey_distribution.rkh @@ -21,6 +21,7 @@ Distribution function plot for the Studentized Range (Tukey) distribution. <related> <ul> + <li><link href="rkward://component/tukey_probabilities"/></li> <li><link href="rkward://rhelp/Tukey"/></li> <li><link href="rkward://component/plot_options"/></li> <li><link href="rkward://rhelp/curve"/></li> diff --git a/rkward/plugins/distributions/plot_uniform_distribution.rkh b/rkward/plugins/distributions/plot_uniform_distribution.rkh index aaff4e9..d397c73 100644 --- a/rkward/plugins/distributions/plot_uniform_distribution.rkh +++ b/rkward/plugins/distributions/plot_uniform_distribution.rkh @@ -20,6 +20,7 @@ Density and distribution function plots for the Uniform distribution. <related> <ul> + <li><link href="rkward://component/uniform_probabilities"/></li> <li><link href="rkward://rhelp/Uniform"/></li> <li><link href="rkward://component/plot_options"/></li> <li><link href="rkward://rhelp/curve"/></li> diff --git a/rkward/plugins/distributions/plot_weibull_distribution.rkh b/rkward/plugins/distributions/plot_weibull_distribution.rkh index 556c5ab..99492e4 100644 --- a/rkward/plugins/distributions/plot_weibull_distribution.rkh +++ b/rkward/plugins/distributions/plot_weibull_distribution.rkh @@ -20,6 +20,7 @@ Density and distribution function plots for the Weibull distribution. <related> <ul> + <li><link href="rkward://component/weibull_probabilities"/></li> <li><link href="rkward://rhelp/Weibull"/></li> <li><link href="rkward://component/plot_options"/></li> <li><link href="rkward://rhelp/curve"/></li> diff --git a/rkward/plugins/distributions/plot_wilcoxon_distribution.rkh b/rkward/plugins/distributions/plot_wilcoxon_distribution.rkh index 879b1f4..bc6a4fb 100644 --- a/rkward/plugins/distributions/plot_wilcoxon_distribution.rkh +++ b/rkward/plugins/distributions/plot_wilcoxon_distribution.rkh @@ -20,6 +20,7 @@ Density and distribution function plots for the Wilcoxon distribution. <related> <ul> + <li><link href="rkward://component/wilcoxon_probabilities"/></li> <li><link href="rkward://rhelp/Wilcoxon"/></li> <li><link href="rkward://component/plot_options"/></li> <li><link href="rkward://rhelp/curve"/></li> diff --git a/rkward/plugins/distributions/poisson.rkh b/rkward/plugins/distributions/poisson.rkh index e69de29..9ebaa33 100644 --- a/rkward/plugins/distributions/poisson.rkh +++ b/rkward/plugins/distributions/poisson.rkh @@ -0,0 +1,22 @@ +<!DOCTYPE rkhelp> +<document> + <snippets> + <include file="dist_help_snippets.xml"/> + </snippets> + <summary> + Provides a calculator for probabilities, quantiles, and densities in the Poisson distribution. + + Quantiles represents the number of events observed in a specified region (e.g. a fixed number of trials, or a fixed period of time), where λ (lambda) is the expected (mean) number of such events. + </summary> + <insert snippet="dialog_usage"/> + <settings> + <insert snippet="dialog_settings"/> + <setting id="lambda">The expected (mean) number of events in the region of interest.</setting> + </settings> + <related> + <ul> + <li><link href="rkward://rhelp/Poisson"/></li> + <li><link href="rkward://component/rkward/plot_poisson_distribution"/></li> + </ul> + </related> +</document> diff --git a/rkward/plugins/distributions/poisson.xml b/rkward/plugins/distributions/poisson.xml index 683b553..f7e31d1 100644 --- a/rkward/plugins/distributions/poisson.xml +++ b/rkward/plugins/distributions/poisson.xml @@ -5,13 +5,12 @@ <logic> <insert snippet="dialog_logic"/> <script><![CDATA[ - gui.setValue ("ui_note.text", i18n (noquote ("Quantiles represents the number of events observed in a fixed number of trials (or a fixed period of time), where lamda is the expected (mean) number of such events."))); + gui.setValue ("ui_note.text", i18n (noquote ("Quantiles represents the number of events observed in a specified region (e.g. a fixed number of trials, or a fixed period of time), where λ (lambda) is the expected (mean) number of such events."))); ]]></script> - </logic> <snippets> <snippet id="dist_options"> - <spinbox default_precision="1" type="real" min="0" initial="1" id="lambda" label="Lambda"/> + <spinbox default_precision="1" type="real" min="0" initial="1" id="lambda" label="λ (Lambda)"/> </snippet> <include file="dist_snippets.xml"/> </snippets> diff --git a/rkward/plugins/distributions/t.rkh b/rkward/plugins/distributions/t.rkh index e69de29..61a5ac2 100644 --- a/rkward/plugins/distributions/t.rkh +++ b/rkward/plugins/distributions/t.rkh @@ -0,0 +1,21 @@ +<!DOCTYPE rkhelp> +<document> + <snippets> + <include file="dist_help_snippets.xml"/> + </snippets> + <summary> + Provides a calculator for probabilities, quantiles, and densities in the Studentized Range (Tukey) distribution. + </summary> + <insert snippet="dialog_usage"/> + <settings> + <insert snippet="dialog_settings"/> + <setting id="df">Degrees of freedom.</setting> + <setting id="ncp">Non-centrality parameter.</setting> + </settings> + <related> + <ul> + <li><link href="rkward://rhelp/TDist"/></li> + <li><link href="rkward://component/rkward/plot_t_distribution"/></li> + </ul> + </related> +</document> diff --git a/rkward/plugins/distributions/tukey.js b/rkward/plugins/distributions/tukey.js index 32db2a0..c23560d 100644 --- a/rkward/plugins/distributions/tukey.js +++ b/rkward/plugins/distributions/tukey.js @@ -1,5 +1,5 @@ include ("dist_common.js"); function getDistSpecifics () { - return initDistSpecifics (i18n ('Studentized Range (Tukey) distribution'), 'tukey', ["nmeans", "df", "nranges"], [0, undefined], continuous); + return initDistSpecifics (i18n ('Studentized Range (Tukey) distribution'), 'tukey', ["nmeans", "df"], [0, undefined], continuous); } diff --git a/rkward/plugins/distributions/tukey.rkh b/rkward/plugins/distributions/tukey.rkh index e69de29..459b524 100644 --- a/rkward/plugins/distributions/tukey.rkh +++ b/rkward/plugins/distributions/tukey.rkh @@ -0,0 +1,23 @@ +<!DOCTYPE rkhelp> +<document> + <snippets> + <include file="dist_help_snippets.xml"/> + </snippets> + <summary> + Provides a calculator for probabilities, quantiles, and densities in the Standardized Range (Tukey) distribution. + + Quantiles are the ratio between the observed range in the given number of observations, and the standard deviation estimate (based on given number of degrees of freedom) of an independent sample. + </summary> + <insert snippet="dialog_usage"/> + <settings> + <insert snippet="dialog_settings"/> + <setting id="nmeans">Number of independent observations whose range to consider.</setting> + <setting id="df">Degrees of freedom for the (independent sample) estimate of standard deviation.</setting> + </settings> + <related> + <ul> + <li><link href="rkward://rhelp/Tukey"/></li> + <li><link href="rkward://component/rkward/plot_tukey_distribution"/></li> + </ul> + </related> +</document> diff --git a/rkward/plugins/distributions/tukey.xml b/rkward/plugins/distributions/tukey.xml index 32236ea..b82c52b 100644 --- a/rkward/plugins/distributions/tukey.xml +++ b/rkward/plugins/distributions/tukey.xml @@ -7,9 +7,8 @@ </logic> <snippets> <snippet id="dist_options"> - <spinbox min="1" type="integer" initial="2" id="nmeans" label="Sample size for range"/> - <spinbox default_precision="1" initial="5" id="df" label="Degrees of freedom for s"/> - <spinbox type="integer" initial="1" min="0" id="nranges" label="Number of groups whose maximum range is considered"/> + <spinbox min="2" type="integer" initial="5" id="nmeans" label="Number of observations"/> + <spinbox default_precision="1" initial="5" id="df" label="Degrees of freedom for standard deviation estimate"/> </snippet> <include file="dist_snippets.xml"/> </snippets> diff --git a/rkward/plugins/distributions/uniform.rkh b/rkward/plugins/distributions/uniform.rkh index e69de29..257031f 100644 --- a/rkward/plugins/distributions/uniform.rkh +++ b/rkward/plugins/distributions/uniform.rkh @@ -0,0 +1,21 @@ +<!DOCTYPE rkhelp> +<document> + <snippets> + <include file="dist_help_snippets.xml"/> + </snippets> + <summary> + Provides a calculator for probabilities, quantiles, and densities in the Uniform distribution. + </summary> + <insert snippet="dialog_usage"/> + <settings> + <insert snippet="dialog_settings"/> + <setting id="min">Lower limit.</setting> + <setting id="max">Upper limit.</setting> + </settings> + <related> + <ul> + <li><link href="rkward://rhelp/Uniform"/></li> + <li><link href="rkward://component/rkward/plot_uniform_distribution"/></li> + </ul> + </related> +</document> diff --git a/rkward/plugins/distributions/weibull.rkh b/rkward/plugins/distributions/weibull.rkh index e69de29..1014aea 100644 --- a/rkward/plugins/distributions/weibull.rkh +++ b/rkward/plugins/distributions/weibull.rkh @@ -0,0 +1,21 @@ +<!DOCTYPE rkhelp> +<document> + <snippets> + <include file="dist_help_snippets.xml"/> + </snippets> + <summary> + Provides a calculator for probabilities, quantiles, and densities in the Weibull distribution. + </summary> + <insert snippet="dialog_usage"/> + <settings> + <insert snippet="dialog_settings"/> + <setting id="shape">Shape parameter (k).</setting> + <setting id="scale">Scale parameter (λ).</setting> + </settings> + <related> + <ul> + <li><link href="rkward://rhelp/Weibull"/></li> + <li><link href="rkward://component/rkward/plot_weibull_distribution"/></li> + </ul> + </related> +</document> diff --git a/rkward/plugins/distributions/weibull.xml b/rkward/plugins/distributions/weibull.xml index b5c6a39..e778ff0 100755 --- a/rkward/plugins/distributions/weibull.xml +++ b/rkward/plugins/distributions/weibull.xml @@ -7,8 +7,8 @@ </logic> <snippets> <snippet id="dist_options"> - <spinbox default_precision="2" type="real" min="0" initial="1" id="shape" label="Shape"/> - <spinbox default_precision="2" type="real" min="0.000001" initial="1" id="scale" label="Scale"/> + <spinbox default_precision="1" type="real" min="0" initial="1" id="shape" label="Shape"/> + <spinbox default_precision="1" type="real" min="0.000001" initial="1" id="scale" label="Scale"/> </snippet> <include file="dist_snippets.xml"/> </snippets> diff --git a/rkward/plugins/distributions/wilcoxon.rkh b/rkward/plugins/distributions/wilcoxon.rkh index e69de29..f39919d 100644 --- a/rkward/plugins/distributions/wilcoxon.rkh +++ b/rkward/plugins/distributions/wilcoxon.rkh @@ -0,0 +1,23 @@ +<!DOCTYPE rkhelp> +<document> + <snippets> + <include file="dist_help_snippets.xml"/> + </snippets> + <summary> + Provides a calculator for probabilities, quantiles, and densities in the Wilcoxon distribution. + + Quantiles correspond to the value of the Wilcoxon Rank Sum statistic, i.e. the number of pairs from sample x and y, for which y[j] is not greater than x[i]. + </summary> + <insert snippet="dialog_usage"/> + <settings> + <insert snippet="dialog_settings"/> + <setting id="m">m (Numbers of observations in the first sample)</setting> + <setting id="n">n (Numbers of observations in the second sample)</setting> + </settings> + <related> + <ul> + <li><link href="rkward://rhelp/Wilcoxon"/></li> + <li><link href="rkward://component/rkward/plot_wilcoxon_distribution"/></li> + </ul> + </related> +</document> diff --git a/rkward/plugins/distributions/wilcoxon.xml b/rkward/plugins/distributions/wilcoxon.xml index d4c59b0..f45a16c 100755 --- a/rkward/plugins/distributions/wilcoxon.xml +++ b/rkward/plugins/distributions/wilcoxon.xml @@ -4,8 +4,9 @@ <help file="wilcoxon.rkh" /> <logic> <insert snippet="dialog_logic"/> - <set id="ui_note.visible" to="true"/> - <set id="ui_note.text" to="Quantiles correspond to the value of the Wilcoxon Rank Sum statistic, i.e. the number of pairs from sample x and y, for which y[j] is not greater than x[i]."/> + <script><![CDATA[ + gui.setValue ("ui_note.text", i18n (noquote ("Quantiles correspond to the value of the Wilcoxon Rank Sum statistic, i.e. the number of pairs from sample x and y, for which y[j] is not greater than x[i]."))); + ]]></script> </logic> <snippets> <snippet id="dist_options"> |
From: Thomas F. <tho...@ru...> - 2015-01-25 19:08:11
|
Git commit 227ed9131aed2ae5945551f70355ac2a449db0a5 by Thomas Friedrichsmeier. Committed on 25/01/2015 at 19:07. Pushed by tfry into branch 'work/distributions'. Further progress on the mass-conversion of distribution plugins. TODO: Complete help pages, add tests. M +1 -1 rkward/plugins/distributions.pluginmap M +1 -1 rkward/plugins/distributions/beta.js M +1 -1 rkward/plugins/distributions/binomial.js M +3 -2 rkward/plugins/distributions/binomial.xml M +1 -1 rkward/plugins/distributions/cauchy.js M +21 -0 rkward/plugins/distributions/cauchy.rkh M +4 -1 rkward/plugins/distributions/chi_squared.js M +21 -0 rkward/plugins/distributions/chi_squared.rkh M +15 -7 rkward/plugins/distributions/dist_common.js M +2 -1 rkward/plugins/distributions/dist_snippets.xml M +2 -1 rkward/plugins/distributions/exponential.js M +21 -0 rkward/plugins/distributions/exponential.rkh M +1 -1 rkward/plugins/distributions/exponential.xml M +1 -1 rkward/plugins/distributions/f.js M +22 -0 rkward/plugins/distributions/f.rkh M +3 -3 rkward/plugins/distributions/f.xml M +1 -1 rkward/plugins/distributions/gamma.js M +22 -0 rkward/plugins/distributions/gamma.rkh M +2 -2 rkward/plugins/distributions/gamma.xml M +2 -1 rkward/plugins/distributions/geom.js M +22 -0 rkward/plugins/distributions/geom.rkh M +3 -0 rkward/plugins/distributions/geom.xml M +6 -17 rkward/plugins/distributions/gumbel.js M +2 -2 rkward/plugins/distributions/gumbel.xml M +1 -3 rkward/plugins/distributions/hypergeometric.js M +7 -4 rkward/plugins/distributions/hypergeometric.xml M +1 -1 rkward/plugins/distributions/log_normal.js M +2 -2 rkward/plugins/distributions/log_normal.xml M +3 -1 rkward/plugins/distributions/logistic.js M +2 -2 rkward/plugins/distributions/logistic.xml M +3 -1 rkward/plugins/distributions/negative_binomial.js M +4 -1 rkward/plugins/distributions/negative_binomial.xml M +1 -1 rkward/plugins/distributions/normal.js M +1 -0 rkward/plugins/distributions/plot_beta_distribution.rkh M +2 -2 rkward/plugins/distributions/plot_binomial_distribution.rkh M +2 -2 rkward/plugins/distributions/plot_cauchy_distribution.rkh M +2 -1 rkward/plugins/distributions/poisson.js M +5 -1 rkward/plugins/distributions/poisson.xml M +1 -1 rkward/plugins/distributions/t.js M +2 -2 rkward/plugins/distributions/t.xml M +1 -1 rkward/plugins/distributions/tukey.js M +2 -2 rkward/plugins/distributions/tukey.xml M +3 -1 rkward/plugins/distributions/uniform.js M +1 -1 rkward/plugins/distributions/weibull.js M +3 -1 rkward/plugins/distributions/wilcoxon.js M +2 -0 rkward/plugins/distributions/wilcoxon.xml http://commits.kde.org/rkward/227ed9131aed2ae5945551f70355ac2a449db0a5 diff --git a/rkward/plugins/distributions.pluginmap b/rkward/plugins/distributions.pluginmap index 1e24fef..4a19ead 100644 --- a/rkward/plugins/distributions.pluginmap +++ b/rkward/plugins/distributions.pluginmap @@ -38,7 +38,7 @@ <component type="standard" id="chi_squared_probabilities" file="chi_squared.xml" label="Chi-squared distribution calculator" /> <component type="standard" id="plot_chi_squared_distribution" file="plot_chi_squared_distribution.xml" label="Plot Chi-squared distribution" /> - <component type="standard" id="exponential_probabilities" file="exponential.xml" label="Exponential probabilities" /> + <component type="standard" id="exponential_probabilities" file="exponential.xml" label="Exponential distribution calculator" /> <component type="standard" id="plot_exponential_distribution" file="plot_exponential_distribution.xml" label="Plot Exponential distribution" /> <component type="standard" id="f_probabilities" file="f.xml" label="F distribution calculator" /> diff --git a/rkward/plugins/distributions/beta.js b/rkward/plugins/distributions/beta.js index 209b8c1..c3e9bd6 100755 --- a/rkward/plugins/distributions/beta.js +++ b/rkward/plugins/distributions/beta.js @@ -1,5 +1,5 @@ include ("dist_common.js"); function getDistSpecifics () { - return initDistSpecifics (i18n ('Beta distribution'), 'beta', ["shape1", "shape2", "ncp"], [0, 1], true); + return initDistSpecifics (i18n ('Beta distribution'), 'beta', ["shape1", "shape2", "ncp"], [0, 1], continuous); } diff --git a/rkward/plugins/distributions/binomial.js b/rkward/plugins/distributions/binomial.js index ca0f014..f4cff4f 100644 --- a/rkward/plugins/distributions/binomial.js +++ b/rkward/plugins/distributions/binomial.js @@ -1,6 +1,6 @@ include ("dist_common.js"); function getDistSpecifics () { - var dist = initDistSpecifics (i18n ('Binomial distribution'), 'binom', ["size", "prob"], [0, getString ("size")], false); + var dist = initDistSpecifics (i18n ('Binomial distribution'), 'binom', ["size", "prob"], [0, getString ("size")], discrete); return dist; } diff --git a/rkward/plugins/distributions/binomial.xml b/rkward/plugins/distributions/binomial.xml index b6198b0..f1047a1 100644 --- a/rkward/plugins/distributions/binomial.xml +++ b/rkward/plugins/distributions/binomial.xml @@ -4,8 +4,9 @@ <help file="binomial.rkh" /> <logic> <insert snippet="dialog_logic"/> - <set id="ui_note.visible" to="true"/> - <set id="ui_note.text" to="Note: For the binomial distribution, quantiles can be interpreted as number of successes in the given number of trials."/> + <script><![CDATA[ + gui.setValue ("ui_note.text", i18n (noquote ("Quantiles can be interpreted as number of successes in the given number of trials."))); + ]]></script> </logic> <snippets> <snippet id="dist_options"> diff --git a/rkward/plugins/distributions/cauchy.js b/rkward/plugins/distributions/cauchy.js index 66938ec..d7779de 100755 --- a/rkward/plugins/distributions/cauchy.js +++ b/rkward/plugins/distributions/cauchy.js @@ -1,5 +1,5 @@ include ("dist_common.js"); function getDistSpecifics () { - return initDistSpecifics (i18n ('Cauchy distribution'), 'cauchy', ["location", "scale"]); + return initDistSpecifics (i18n ('Cauchy distribution'), 'cauchy', ["location", "scale"], [], continuous); } diff --git a/rkward/plugins/distributions/cauchy.rkh b/rkward/plugins/distributions/cauchy.rkh index e69de29..dfa4fc4 100644 --- a/rkward/plugins/distributions/cauchy.rkh +++ b/rkward/plugins/distributions/cauchy.rkh @@ -0,0 +1,21 @@ +<!DOCTYPE rkhelp> +<document> + <snippets> + <include file="dist_help_snippets.xml"/> + </snippets> + <summary> + Provides a calculator for probabilities, quantiles, and densities in the Cauchy distribution. + </summary> + <insert snippet="dialog_usage"/> + <settings> + <insert snippet="dialog_settings"/> + <setting id="location">Location parameter (median) of the Cauchy distribution</setting> + <setting id="scale">Scale parameter of the Cauchy distribution</setting> + </settings> + <related> + <ul> + <li><link href="rkward://rhelp/Cauchy"/></li> + <li><link href="rkward://component/rkward/plot_cauchy_distribution"/></li> + </ul> + </related> +</document> diff --git a/rkward/plugins/distributions/chi_squared.js b/rkward/plugins/distributions/chi_squared.js index 2ffd350..71631e4 100644 --- a/rkward/plugins/distributions/chi_squared.js +++ b/rkward/plugins/distributions/chi_squared.js @@ -1,5 +1,8 @@ include ("dist_common.js"); function getDistSpecifics () { - return initDistSpecifics (i18n ('Chi-squared distribution'), 'chisq', ["df", "ncp"]); + var df = Number (getString ("df")); + return initDistSpecifics (i18n ('Chi-squared distribution'), 'chisq', ["df", "ncp"], + [Math.max (0, Math.floor (df * .6 - 4)), Math.floor (df * 1.4 + 4)], // NOTE: crude self-made heuristic for covering the likely range of interest for auto-quantiles + continuos); } diff --git a/rkward/plugins/distributions/chi_squared.rkh b/rkward/plugins/distributions/chi_squared.rkh index e69de29..50818c6 100644 --- a/rkward/plugins/distributions/chi_squared.rkh +++ b/rkward/plugins/distributions/chi_squared.rkh @@ -0,0 +1,21 @@ +<!DOCTYPE rkhelp> +<document> + <snippets> + <include file="dist_help_snippets.xml"/> + </snippets> + <summary> + Provides a calculator for probabilities, quantiles, and densities in the Chi-squared (χ²) distribution. + </summary> + <insert snippet="dialog_usage"/> + <settings> + <insert snippet="dialog_settings"/> + <setting id="df">Degrees of freedom</setting> + <setting id="ncp">Non-centrality parameter</setting> + </settings> + <related> + <ul> + <li><link href="rkward://rhelp/Chisquare"/></li> + <li><link href="rkward://component/rkward/plot_chi_squared_distribution"/></li> + </ul> + </related> +</document> diff --git a/rkward/plugins/distributions/dist_common.js b/rkward/plugins/distributions/dist_common.js index 2028932..de9d69e 100644 --- a/rkward/plugins/distributions/dist_common.js +++ b/rkward/plugins/distributions/dist_common.js @@ -4,7 +4,11 @@ var dist; var invar; var outvar; -function initDistSpecifics (title, stem, params, range, continuous) { +const continuous = 1; +const discrete = 2; + +// NOTE: range +function initDistSpecifics (title, stem, params, range, type) { var dist = new Object (); var header = new Header (title); var par = ""; @@ -15,9 +19,9 @@ function initDistSpecifics (title, stem, params, range, continuous) { dist["header"] = header; dist["params"] = par; dist["funstem"] = stem; - dist["min"] = Number (range[0]); - dist["max"] = Number (range[1]); - dist["cont"] = continuous; + dist["min"] = range[0]; + dist["max"] = range[1]; + dist["cont"] = (type == continuous); return dist; } @@ -45,24 +49,28 @@ function calculate () { if (mode == "q") values = getList ("p.0"); else values = getList ("q.0"); if (values.length < 1) { + // NOTE: making this an even number is somewhat important. Otherwise, the middle number will be something very close to (but not quite) 0 in many cases, + // resulting in very ugly number formatting var max_auto_sequence_length = 20; if (invar == 'q') { if (!dist["cont"]) { - var span = dist["max"] - dist["min"]; + var span = Number (dist["max"]) - Number (dist["min"]) - 1; if (span <= max_auto_sequence_length) { values = String (dist["min"]) + ':' + String (dist["max"]); } else { values = 'seq.int (' + String (dist["min"]) + ', ' + String (dist["max"]) + ', by=' + String (Math.ceil (span / max_auto_sequence_length)) + ')'; } } else { - values = 'seq (' + String (dist["min"]) + ', ' + String (dist["max"]) + ', length.out=' + String (max_auto_sequence_length+1) + ')'; + if (dist["min"] === undefined) dist["min"] = 'q' + dist["funstem"] + ' (.01' + dist["params"] + ')'; + if (dist["max"] === undefined) dist["max"] = 'q' + dist["funstem"] + ' (.99' + dist["params"] + ')'; + values = 'seq (' + String (dist["min"]) + ', ' + String (dist["max"]) + ', length.out=' + String (max_auto_sequence_length) + ')'; } } else { // invar == 'p' if (logpd) { values = '-' + String (max_auto_sequence_length) + ':0'; } else { - values = 'seq (0, 1, length.out=' + String (max_auto_sequence_length+1) + ')'; + values = 'seq (0, 1, length.out=' + String (max_auto_sequence_length) + ')'; } } } else { diff --git a/rkward/plugins/distributions/dist_snippets.xml b/rkward/plugins/distributions/dist_snippets.xml index 63855a9..25c5b21 100644 --- a/rkward/plugins/distributions/dist_snippets.xml +++ b/rkward/plugins/distributions/dist_snippets.xml @@ -10,7 +10,8 @@ <connect client="q.visible" governor="do_q.not"/> <connect client="p.visible" governor="do_q"/> - <set id="ui_note.visible" to="false"/> + <convert id="have_ui_note" mode="notequals" sources="ui_note.text" standard=""/> + <connect client="ui_note.visible" governor="have_ui_note"/> </snippet> <snippet id="dialog_layout"> <dropdown id="mode" label="Mode"> diff --git a/rkward/plugins/distributions/exponential.js b/rkward/plugins/distributions/exponential.js index 22f8660..e581136 100755 --- a/rkward/plugins/distributions/exponential.js +++ b/rkward/plugins/distributions/exponential.js @@ -1,5 +1,6 @@ include ("dist_common.js"); function getDistSpecifics () { - return initDistSpecifics (i18n ('Exponential distribution'), 'exp', ["rate"]); + var rate = Number (getString ("rate")); + return initDistSpecifics (i18n ('Exponential distribution'), 'exp', ["rate"], [0, Math.floor (5/rate)], continuous); } diff --git a/rkward/plugins/distributions/exponential.rkh b/rkward/plugins/distributions/exponential.rkh index e69de29..4324ee6 100644 --- a/rkward/plugins/distributions/exponential.rkh +++ b/rkward/plugins/distributions/exponential.rkh @@ -0,0 +1,21 @@ +<!DOCTYPE rkhelp> +<document> + <snippets> + <include file="dist_help_snippets.xml"/> + </snippets> + <summary> + Provides a calculator for probabilities, quantiles, and densities in the Exponential distribution. + </summary> + <insert snippet="dialog_usage"/> + <settings> + <insert snippet="dialog_settings"/> + <setting id="rate">Rate parameter λ (1/mean)</setting> + </settings> + <related> + <ul> + <li><link href="rkward://component/rkward/gamma_probabilities"/> (of which the exponential distribution is a special case)</li> + <li><link href="rkward://rhelp/Exponential"/></li> + <li><link href="rkward://component/rkward/plot_exponential_distribution"/></li> + </ul> + </related> +</document> diff --git a/rkward/plugins/distributions/exponential.xml b/rkward/plugins/distributions/exponential.xml index cec6009..339a809 100755 --- a/rkward/plugins/distributions/exponential.xml +++ b/rkward/plugins/distributions/exponential.xml @@ -7,7 +7,7 @@ </logic> <snippets> <snippet id="dist_options"> - <spinbox default_precision="2" type="real" min="0" initial="1" id="rate" label="vector of rates"/> + <spinbox default_precision="1" type="real" min="0" initial="1" id="rate" label="Rates"/> </snippet> <include file="dist_snippets.xml"/> </snippets> diff --git a/rkward/plugins/distributions/f.js b/rkward/plugins/distributions/f.js index b148eae..d69986b 100644 --- a/rkward/plugins/distributions/f.js +++ b/rkward/plugins/distributions/f.js @@ -1,5 +1,5 @@ include ("dist_common.js"); function getDistSpecifics () { - return initDistSpecifics (i18n ('F distribution'), 'f', ["df1", "df2", "ncp"]); + return initDistSpecifics (i18n ('F distribution'), 'f', ["df1", "df2", "ncp"], [0, undefined], continuous); } diff --git a/rkward/plugins/distributions/f.rkh b/rkward/plugins/distributions/f.rkh index e69de29..7962a6c 100644 --- a/rkward/plugins/distributions/f.rkh +++ b/rkward/plugins/distributions/f.rkh @@ -0,0 +1,22 @@ +<!DOCTYPE rkhelp> +<document> + <snippets> + <include file="dist_help_snippets.xml"/> + </snippets> + <summary> + Provides a calculator for probabilities, quantiles, and densities in the F distribution. + </summary> + <insert snippet="dialog_usage"/> + <settings> + <insert snippet="dialog_settings"/> + <setting id="df1">Numerator degrees of freedom</setting> + <setting id="df2">Denominator degrees of freedom</setting> + <setting id="ncp">Non-centrality parameter</setting> + </settings> + <related> + <ul> + <li><link href="rkward://rhelp/Fdist"/></li> + <li><link href="rkward://component/rkward/plot_f_distribution"/></li> + </ul> + </related> +</document> diff --git a/rkward/plugins/distributions/f.xml b/rkward/plugins/distributions/f.xml index ee0e96a..c16873c 100644 --- a/rkward/plugins/distributions/f.xml +++ b/rkward/plugins/distributions/f.xml @@ -7,9 +7,9 @@ </logic> <snippets> <snippet id="dist_options"> - <spinbox default_precision="2" type="real" initial="1" id="df1" min="0" label="Numerator degree of Freedom"/> - <spinbox default_precision="2" type="real" initial="1" id="df2" min="0" label="Denominator degree of Freedom"/> - <spinbox default_precision="2" type="real" initial="0" id="ncp" min="0" label="non-centrality parameter"/> + <spinbox default_precision="1" type="real" initial="1" id="df1" min="0" label="Numerator degrees of Freedom"/> + <spinbox default_precision="1" type="real" initial="10" id="df2" min="0" label="Denominator degrees of Freedom"/> + <spinbox default_precision="1" type="real" initial="0" id="ncp" min="0" label="non-centrality parameter"/> </snippet> <include file="dist_snippets.xml"/> </snippets> diff --git a/rkward/plugins/distributions/gamma.js b/rkward/plugins/distributions/gamma.js index b7dabe1..32487c1 100755 --- a/rkward/plugins/distributions/gamma.js +++ b/rkward/plugins/distributions/gamma.js @@ -1,5 +1,5 @@ include ("dist_common.js"); function getDistSpecifics () { - return initDistSpecifics (i18n ('Gamma distribution'), 'gamma', ["shape", "rate"]); + return initDistSpecifics (i18n ('Gamma distribution'), 'gamma', ["shape", "rate"], [0, undefined], continuous); } diff --git a/rkward/plugins/distributions/gamma.rkh b/rkward/plugins/distributions/gamma.rkh index e69de29..610d165 100644 --- a/rkward/plugins/distributions/gamma.rkh +++ b/rkward/plugins/distributions/gamma.rkh @@ -0,0 +1,22 @@ +<!DOCTYPE rkhelp> +<document> + <snippets> + <include file="dist_help_snippets.xml"/> + </snippets> + <summary> + Provides a calculator for probabilities, quantiles, and densities in the gamma distribution. + </summary> + <insert snippet="dialog_usage"/> + <settings> + <insert snippet="dialog_settings"/> + <setting id="shape">Shape parameter (k)</setting> + <setting id="rate">Rate parameter β (inverse of scale parameter)</setting> + </settings> + <related> + <ul> + <li><link href="rkward://component/rkward/exponential_probabilities"/> (a special case of the gamma distribution with shape=1)</li> + <li><link href="rkward://rhelp/GammaDist">R help on Gamma Distribution functions</link></li> + <li><link href="rkward://component/rkward/plot_gamma_distribution"/></li> + </ul> + </related> +</document> diff --git a/rkward/plugins/distributions/gamma.xml b/rkward/plugins/distributions/gamma.xml index c5d3288..6bbd16e 100755 --- a/rkward/plugins/distributions/gamma.xml +++ b/rkward/plugins/distributions/gamma.xml @@ -7,8 +7,8 @@ </logic> <snippets> <snippet id="dist_options"> - <spinbox default_precision="2" type="real" min="0" initial="1" id="shape" label="Shape"/> - <spinbox default_precision="2" type="real" min="0" initial="1" id="rate" label="Rate"/> + <spinbox default_precision="1" type="real" min="0" initial="1" id="shape" label="Shape"/> + <spinbox default_precision="1" type="real" min="0" initial="1" id="rate" label="Rate"/> </snippet> <include file="dist_snippets.xml"/> </snippets> diff --git a/rkward/plugins/distributions/geom.js b/rkward/plugins/distributions/geom.js index 0c4a02f..f7dbbd6 100755 --- a/rkward/plugins/distributions/geom.js +++ b/rkward/plugins/distributions/geom.js @@ -1,5 +1,6 @@ include ("dist_common.js"); function getDistSpecifics () { - return initDistSpecifics (i18n ('Geometric distribution'), 'geom', ["prob"]); + var prob = Number (getString ("prob")); + return initDistSpecifics (i18n ('Geometric distribution'), 'geom', ["prob"], [0, Math.floor (5/prob)], discrete); } diff --git a/rkward/plugins/distributions/geom.rkh b/rkward/plugins/distributions/geom.rkh index e69de29..64e4c80 100644 --- a/rkward/plugins/distributions/geom.rkh +++ b/rkward/plugins/distributions/geom.rkh @@ -0,0 +1,22 @@ +<!DOCTYPE rkhelp> +<document> + <snippets> + <include file="dist_help_snippets.xml"/> + </snippets> + <summary> + Provides a calculator for probabilities, quantiles, and densities in the Geometric distribution. + + Quantiles in the geometric distribution represent the number of failures in a sequence of Bernoulli trials before the first success. + </summary> + <insert snippet="dialog_usage"/> + <settings> + <insert snippet="dialog_settings"/> + <setting id="prob">Probability of success in each trial. Note that this setting is <b>not</b> affected by the "log probabilities" setting, i.e. always specify the plain probability,</setting> + </settings> + <related> + <ul> + <li><link href="rkward://rhelp/Geometric"/></li> + <li><link href="rkward://component/rkward/plot_geom_distribution"/></li> + </ul> + </related> +</document> diff --git a/rkward/plugins/distributions/geom.xml b/rkward/plugins/distributions/geom.xml index bd3564b..68b4ce5 100755 --- a/rkward/plugins/distributions/geom.xml +++ b/rkward/plugins/distributions/geom.xml @@ -4,6 +4,9 @@ <help file="geom.rkh" /> <logic> <insert snippet="dialog_logic"/> + <script><![CDATA[ + gui.setValue ("ui_note.text", i18n (noquote ("Quantiles represent the number of failures in a sequence of Bernoulli trials before the first success."))); + ]]></script> </logic> <snippets> <snippet id="dist_options"> diff --git a/rkward/plugins/distributions/gumbel.js b/rkward/plugins/distributions/gumbel.js index 6dc1e8d..5f5098f 100755 --- a/rkward/plugins/distributions/gumbel.js +++ b/rkward/plugins/distributions/gumbel.js @@ -1,22 +1,11 @@ include ("dist_common.js"); -function getDistSpecifics () { - return initDistSpecifics (i18n ('Gumbel distribution'), 'weibull', ["shape", "scale"]); -} - -error! - -// globals -var q; - -function calculate () { - q = "c (" + getString ("q").replace (/[, ]+/g, ", ") + ")"; - - echo ('result <- (pweibull (q = exp(' + q + '), shape = ' + getValue ("shape") + ', scale = ' + getValue ("scale") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n'); +function preprocess () { + echo ('require (FAdist)\n'); } -function printout () { - echo ('rk.header ("Gumbel probability", list ("Vector of quantiles", "' + q + '", "Shape", "' + getValue ("shape") + '", "Scale", "' + getValue ("scale") + '", "Tail", "' + getValue ("tail") + '", "Probabilities p are given as", "' + getValue ("logp") + '"))\n'); - echo ('rk.results (result, titles="Gumbel probabilities")\n'); +function getDistSpecifics () { + var scale = Number (getString ("scale")); + var location = Number (getString ("location")); + return initDistSpecifics (i18n ('Gumbel distribution'), 'gumbel', ["location", "scale"], [Math.floor (-2*scale+location), Math.ceil (5*scale+location)], continuous); } - diff --git a/rkward/plugins/distributions/gumbel.xml b/rkward/plugins/distributions/gumbel.xml index 120bc81..a195e3e 100755 --- a/rkward/plugins/distributions/gumbel.xml +++ b/rkward/plugins/distributions/gumbel.xml @@ -7,8 +7,8 @@ </logic> <snippets> <snippet id="dist_options"> - <spinbox default_precision="2" type="real" min="0" initial="1" id="shape" label="Shape"/> - <spinbox default_precision="2" type="real" min="1" initial="1" id="scale" label="Scale"/> + <spinbox default_precision="1" type="real" min="0" initial="0" id="location" label="Location"/> + <spinbox default_precision="1" type="real" initial="1" id="scale" label="Scale"/> </snippet> <include file="dist_snippets.xml"/> </snippets> diff --git a/rkward/plugins/distributions/hypergeometric.js b/rkward/plugins/distributions/hypergeometric.js index d9f9b7d..9e65315 100755 --- a/rkward/plugins/distributions/hypergeometric.js +++ b/rkward/plugins/distributions/hypergeometric.js @@ -1,7 +1,5 @@ include ("dist_common.js"); function getDistSpecifics () { - var dist = initDistSpecifics (i18n ('Hypergeometric distribution'), 'hyper', ["m", "n", "k"]); - dist["max_quantile"] = getString ("m"); - return dist; + return initDistSpecifics (i18n ('Hypergeometric distribution'), 'hyper', ["m", "n", "k"], [0, getString ("m")], discrete); } diff --git a/rkward/plugins/distributions/hypergeometric.xml b/rkward/plugins/distributions/hypergeometric.xml index 26a064e..73e1e13 100755 --- a/rkward/plugins/distributions/hypergeometric.xml +++ b/rkward/plugins/distributions/hypergeometric.xml @@ -1,15 +1,18 @@ <!DOCTYPE rkplugin> <document> - <code file="hypergeometric_probabilities.js" /> + <code file="hypergeometric.js" /> <help file="hypergeometric.rkh" /> <logic> <insert snippet="dialog_logic"/> + <script><![CDATA[ + gui.setValue ("ui_note.text", i18n (noquote ("Quantiles represent the number of white balls drawn in k draws without replacement from an urn containing m white and n black balls."))); + ]]></script> </logic> <snippets> <snippet id="dist_options"> - <spinbox type="integer" min="0" initial="1" id="m" label="m (Number of white balls in the urn)"/> - <spinbox type="integer" min="0" initial="1" id="n" label="n (Number of black balls in the urn)"/> - <spinbox type="integer" min="0" initial="1" id="k" label="k (Number of balls drawn from the urn)"/> + <spinbox type="integer" min="0" initial="10" id="m" label="m (Number of white balls in the urn)"/> + <spinbox type="integer" min="0" initial="10" id="n" label="n (Number of black balls in the urn)"/> + <spinbox type="integer" min="0" initial="5" id="k" label="k (Number of balls drawn from the urn)"/> </snippet> <include file="dist_snippets.xml"/> </snippets> diff --git a/rkward/plugins/distributions/log_normal.js b/rkward/plugins/distributions/log_normal.js index 772c877..a61ae46 100644 --- a/rkward/plugins/distributions/log_normal.js +++ b/rkward/plugins/distributions/log_normal.js @@ -1,5 +1,5 @@ include ("dist_common.js"); function getDistSpecifics () { - return initDistSpecifics (i18n ('Log Normal distribution'), 'lnorm', ["meanlog", "sdlog"]); + return initDistSpecifics (i18n ('Log Normal distribution'), 'lnorm', ["meanlog", "sdlog"], [0, undefined], continuous); } diff --git a/rkward/plugins/distributions/log_normal.xml b/rkward/plugins/distributions/log_normal.xml index e4df211..24d3164 100644 --- a/rkward/plugins/distributions/log_normal.xml +++ b/rkward/plugins/distributions/log_normal.xml @@ -7,8 +7,8 @@ </logic> <snippets> <snippet id="dist_options"> - <spinbox default_precision="2" type="real" initial="0" id="meanlog" label="meanlog (mean of the distribution on the log scale)"/> - <spinbox default_precision="2" type="real" min="0.000001" initial="1" id="sdlog" label="sdlog (standard deviation of the distribution on the log scale)"/> + <spinbox default_precision="1" type="real" initial="0" id="meanlog" label="meanlog (mean of the distribution on the log scale)"/> + <spinbox default_precision="1" type="real" min="0.000001" initial="1" id="sdlog" label="sdlog (standard deviation of the distribution on the log scale)"/> </snippet> <include file="dist_snippets.xml"/> </snippets> diff --git a/rkward/plugins/distributions/logistic.js b/rkward/plugins/distributions/logistic.js index 4c6fcdf..77b4052 100755 --- a/rkward/plugins/distributions/logistic.js +++ b/rkward/plugins/distributions/logistic.js @@ -1,5 +1,7 @@ include ("dist_common.js"); function getDistSpecifics () { - return initDistSpecifics (i18n ('Logistic distribution'), 'logis', ["location", "scale"]); + var loc = Number (getString ("location")); + var scale = Number (getString ("scale")); + return initDistSpecifics (i18n ('Logistic distribution'), 'logis', ["location", "scale"], [-5*scale+loc, 5*scale+loc], continuous); } diff --git a/rkward/plugins/distributions/logistic.xml b/rkward/plugins/distributions/logistic.xml index 41b5baf..639b6dd 100755 --- a/rkward/plugins/distributions/logistic.xml +++ b/rkward/plugins/distributions/logistic.xml @@ -7,8 +7,8 @@ </logic> <snippets> <snippet id="dist_options"> - <spinbox default_precision="2" type="real" initial="1" id="location" label="Location"/> - <spinbox default_precision="2" type="real" min="0" initial="1" id="scale" label="Scale"/> + <spinbox default_precision="1" type="real" initial="0" id="location" label="Location"/> + <spinbox default_precision="1" type="real" min="0" initial="1" id="scale" label="Scale"/> </snippet> <include file="dist_snippets.xml"/> </snippets> diff --git a/rkward/plugins/distributions/negative_binomial.js b/rkward/plugins/distributions/negative_binomial.js index 8a2f008..e388796 100755 --- a/rkward/plugins/distributions/negative_binomial.js +++ b/rkward/plugins/distributions/negative_binomial.js @@ -1,5 +1,7 @@ include ("dist_common.js"); function getDistSpecifics () { - return initDistSpecifics (i18n ('Negative Binomial distribution'), 'nbinom', ["size", "prob"]); + var size = Number (getString ("size")); + var prob = Number (getString ("prob")); + return initDistSpecifics (i18n ('Negative Binomial distribution'), 'nbinom', ["size", "prob"], [0, Math.ceil (size * 1.5 / prob)], discrete); } diff --git a/rkward/plugins/distributions/negative_binomial.xml b/rkward/plugins/distributions/negative_binomial.xml index 3e464cb..aa8a636 100755 --- a/rkward/plugins/distributions/negative_binomial.xml +++ b/rkward/plugins/distributions/negative_binomial.xml @@ -4,10 +4,13 @@ <help file="negative_binomial.rkh" /> <logic> <insert snippet="dialog_logic"/> + <script><![CDATA[ + gui.setValue ("ui_note.text", i18n (noquote ("Quantiles represents the number of failures in a sequence of Bernoulli trials before the target number of successes is reached."))); + ]]></script> </logic> <snippets> <snippet id="dist_options"> - <spinbox type="integer" min="0" initial="1" id="size" label="Target for number of successful trials"/> + <spinbox type="integer" min="0" initial="5" id="size" label="Target for number of successful trials"/> <spinbox default_precision="2" type="real" min="0" initial="0.5" max="1" id="prob" label="Probability of success in each trial"/> </snippet> <include file="dist_snippets.xml"/> diff --git a/rkward/plugins/distributions/normal.js b/rkward/plugins/distributions/normal.js index 4abf66d..d9e5518 100644 --- a/rkward/plugins/distributions/normal.js +++ b/rkward/plugins/distributions/normal.js @@ -1,5 +1,5 @@ include ("dist_common.js"); function getDistSpecifics () { - return initDistSpecifics (i18n ('Normal distribution'), 'norm', ["mean", "sd"], [-4, 4], true); + return initDistSpecifics (i18n ('Normal distribution'), 'norm', ["mean", "sd"], [-4, 4], continous); } diff --git a/rkward/plugins/distributions/plot_beta_distribution.rkh b/rkward/plugins/distributions/plot_beta_distribution.rkh index b2898f5..1afb251 100644 --- a/rkward/plugins/distributions/plot_beta_distribution.rkh +++ b/rkward/plugins/distributions/plot_beta_distribution.rkh @@ -20,6 +20,7 @@ Density and distribution function plots for the Beta distribution. </settings> <related> <ul> + <li><link href="rkward://component/beta_probabilities"/></li> <li><link href="rkward://rhelp/Beta"/></li> <li><link href="rkward://component/plot_options"/></li> <li><link href="rkward://rhelp/curve"/></li> diff --git a/rkward/plugins/distributions/plot_binomial_distribution.rkh b/rkward/plugins/distributions/plot_binomial_distribution.rkh index 77bb4c7..4e28fac 100644 --- a/rkward/plugins/distributions/plot_binomial_distribution.rkh +++ b/rkward/plugins/distributions/plot_binomial_distribution.rkh @@ -13,8 +13,8 @@ Density and distribution function plots for the Binomial distribution. <settings> <insert snippet="density_help"/> <insert snippet="discont_range_help"/> - <setting id="size">See R reference on Binomial distribution.</setting> - <setting id="prob">See R reference on Binomial distribution.</setting> + <setting id="size">Number of binomial trials</setting> + <setting id="prob">Probability of success in each trial</setting> <insert snippet="common_options_help"/> </settings> diff --git a/rkward/plugins/distributions/plot_cauchy_distribution.rkh b/rkward/plugins/distributions/plot_cauchy_distribution.rkh index 386ef6e..2c9a82c 100644 --- a/rkward/plugins/distributions/plot_cauchy_distribution.rkh +++ b/rkward/plugins/distributions/plot_cauchy_distribution.rkh @@ -13,8 +13,8 @@ Density and distribution function plots for the Cauchy distribution. <settings> <insert snippet="density_help"/> <insert snippet="cont_range_help"/> - <setting id="loc">See R reference on Cauchy distribution.</setting> - <setting id="scale">See R reference on Cauchy distribution.</setting> + <setting id="loc">Location parameter (median) of the Cauchy distribution</setting> + <setting id="scale">Scale parameter of the Cauchy distribution</setting> <insert snippet="common_options_help"/> </settings> <related> diff --git a/rkward/plugins/distributions/poisson.js b/rkward/plugins/distributions/poisson.js index eed2a57..fbffaa9 100644 --- a/rkward/plugins/distributions/poisson.js +++ b/rkward/plugins/distributions/poisson.js @@ -1,5 +1,6 @@ include ("dist_common.js"); function getDistSpecifics () { - return initDistSpecifics (i18n ('Poisson distribution'), 'pois', ["lambda"]); + var lambda = Number (getString ("lambda")); + return initDistSpecifics (i18n ('Poisson distribution'), 'pois', ["lambda"], [0, lambda + Math.sqrt (lambda)*3 + 1], discrete); } diff --git a/rkward/plugins/distributions/poisson.xml b/rkward/plugins/distributions/poisson.xml index c865d5b..683b553 100644 --- a/rkward/plugins/distributions/poisson.xml +++ b/rkward/plugins/distributions/poisson.xml @@ -4,10 +4,14 @@ <help file="poisson.rkh" /> <logic> <insert snippet="dialog_logic"/> + <script><![CDATA[ + gui.setValue ("ui_note.text", i18n (noquote ("Quantiles represents the number of events observed in a fixed number of trials (or a fixed period of time), where lamda is the expected (mean) number of such events."))); + ]]></script> + </logic> <snippets> <snippet id="dist_options"> - <spinbox default_precision="2" type="real" min="0" initial="1" id="lambda" label="Lambda"/> + <spinbox default_precision="1" type="real" min="0" initial="1" id="lambda" label="Lambda"/> </snippet> <include file="dist_snippets.xml"/> </snippets> diff --git a/rkward/plugins/distributions/t.js b/rkward/plugins/distributions/t.js index 682dc28..c7132af 100644 --- a/rkward/plugins/distributions/t.js +++ b/rkward/plugins/distributions/t.js @@ -1,5 +1,5 @@ include ("dist_common.js"); function getDistSpecifics () { - return initDistSpecifics (i18n ('t distribution'), 't', ["df", "ncp"]); + return initDistSpecifics (i18n ('t distribution'), 't', ["df", "ncp"], [], continuous); } diff --git a/rkward/plugins/distributions/t.xml b/rkward/plugins/distributions/t.xml index 286a19c..6b19b95 100644 --- a/rkward/plugins/distributions/t.xml +++ b/rkward/plugins/distributions/t.xml @@ -7,8 +7,8 @@ </logic> <snippets> <snippet id="dist_options"> - <spinbox default_precision="2" type="real" initial="1" id="df" min="0" label="Degrees of Freedom"/> - <spinbox default_precision="2" type="real" initial="0" id="ncp" min="0" label="non-centrality parameter"/> + <spinbox default_precision="1" type="real" initial="10" id="df" min="0" label="Degrees of Freedom"/> + <spinbox default_precision="1" type="real" initial="0" id="ncp" min="0" label="non-centrality parameter"/> </snippet> <include file="dist_snippets.xml"/> </snippets> diff --git a/rkward/plugins/distributions/tukey.js b/rkward/plugins/distributions/tukey.js index e224d99..32db2a0 100644 --- a/rkward/plugins/distributions/tukey.js +++ b/rkward/plugins/distributions/tukey.js @@ -1,5 +1,5 @@ include ("dist_common.js"); function getDistSpecifics () { - return initDistSpecifics (i18n ('Studentized Range (Tukey) distribution'), 'tukey', ["nmeans", "df", "nranges"]); + return initDistSpecifics (i18n ('Studentized Range (Tukey) distribution'), 'tukey', ["nmeans", "df", "nranges"], [0, undefined], continuous); } diff --git a/rkward/plugins/distributions/tukey.xml b/rkward/plugins/distributions/tukey.xml index 910f1a5..32236ea 100644 --- a/rkward/plugins/distributions/tukey.xml +++ b/rkward/plugins/distributions/tukey.xml @@ -8,8 +8,8 @@ <snippets> <snippet id="dist_options"> <spinbox min="1" type="integer" initial="2" id="nmeans" label="Sample size for range"/> - <input default_precision="2" initial="5" id="df" label="Degrees of freedom for s"/> - <spinbox default_precision="2" type="integer" initial="1" min="0" id="nranges" label="Number of groups whose maximum range is considered"/> + <spinbox default_precision="1" initial="5" id="df" label="Degrees of freedom for s"/> + <spinbox type="integer" initial="1" min="0" id="nranges" label="Number of groups whose maximum range is considered"/> </snippet> <include file="dist_snippets.xml"/> </snippets> diff --git a/rkward/plugins/distributions/uniform.js b/rkward/plugins/distributions/uniform.js index 09276b7..4b2fba2 100755 --- a/rkward/plugins/distributions/uniform.js +++ b/rkward/plugins/distributions/uniform.js @@ -1,5 +1,7 @@ include ("dist_common.js"); function getDistSpecifics () { - return initDistSpecifics (i18n ('Uniform distribution'), 'unif', ["min", "max"]); + var min = Number (getString ("min")); + var max = Number (getString ("max")); + return initDistSpecifics (i18n ('Uniform distribution'), 'unif', ["min", "max"], [min, max], continuous); } diff --git a/rkward/plugins/distributions/weibull.js b/rkward/plugins/distributions/weibull.js index c0832b6..dd74d2c 100755 --- a/rkward/plugins/distributions/weibull.js +++ b/rkward/plugins/distributions/weibull.js @@ -1,5 +1,5 @@ include ("dist_common.js"); function getDistSpecifics () { - return initDistSpecifics (i18n ('Weilbull distribution'), 'weibull', ["shape", "scale"]); + return initDistSpecifics (i18n ('Weilbull distribution'), 'weibull', ["shape", "scale"], [0, undefined], continuous); } diff --git a/rkward/plugins/distributions/wilcoxon.js b/rkward/plugins/distributions/wilcoxon.js index 7d94bd0..6dbaba7 100755 --- a/rkward/plugins/distributions/wilcoxon.js +++ b/rkward/plugins/distributions/wilcoxon.js @@ -1,5 +1,7 @@ include ("dist_common.js"); function getDistSpecifics () { - return initDistSpecifics (i18n ('Wilcox Rank Sum distribution'), 'wilcox', ["m", "n"]); + var m = Number (getString ("m")); + var n = Number (getString ("n")); + return initDistSpecifics (i18n ('Wilcox Rank Sum distribution'), 'wilcox', ["m", "n"], [0, m*n], discrete); } diff --git a/rkward/plugins/distributions/wilcoxon.xml b/rkward/plugins/distributions/wilcoxon.xml index 0d7ccba..d4c59b0 100755 --- a/rkward/plugins/distributions/wilcoxon.xml +++ b/rkward/plugins/distributions/wilcoxon.xml @@ -4,6 +4,8 @@ <help file="wilcoxon.rkh" /> <logic> <insert snippet="dialog_logic"/> + <set id="ui_note.visible" to="true"/> + <set id="ui_note.text" to="Quantiles correspond to the value of the Wilcoxon Rank Sum statistic, i.e. the number of pairs from sample x and y, for which y[j] is not greater than x[i]."/> </logic> <snippets> <snippet id="dist_options"> |
From: Thomas F. <tho...@ru...> - 2015-01-22 21:40:30
|
Git commit 5b742e59b7bef0abe20b26653ac4e7ea915319be by Thomas Friedrichsmeier. Committed on 22/01/2015 at 21:37. Pushed by tfry into branch 'work/distributions'. Start working on the mass conversion of distribution plugins. Unfinished. M +84 -121 rkward/plugins/distributions.pluginmap M +1 -5 rkward/plugins/distributions/beta.js A +22 -0 rkward/plugins/distributions/beta.rkh M +2 -1 rkward/plugins/distributions/beta.xml M +1 -6 rkward/plugins/distributions/binomial.js M +4 -6 rkward/plugins/distributions/binomial.rkh A +5 -0 rkward/plugins/distributions/cauchy.js A +0 -0 rkward/plugins/distributions/cauchy.rkh R +7 -3 rkward/plugins/distributions/cauchy.xml [from: rkward/plugins/distributions/cauchy_probabilities.xml - 063% similarity] D +0 -14 rkward/plugins/distributions/cauchy_probabilities.js D +0 -14 rkward/plugins/distributions/cauchy_quantiles.js D +0 -14 rkward/plugins/distributions/cauchy_quantiles.xml A +5 -0 rkward/plugins/distributions/chi_squared.js A +0 -0 rkward/plugins/distributions/chi_squared.rkh R +7 -3 rkward/plugins/distributions/chi_squared.xml [from: rkward/plugins/distributions/chi_squared_quantiles.xml - 063% similarity] D +0 -14 rkward/plugins/distributions/chi_squared_probabilities.js D +0 -14 rkward/plugins/distributions/chi_squared_quantiles.js M +23 -6 rkward/plugins/distributions/dist_common.js M +3 -0 rkward/plugins/distributions/dist_help_snippets.xml A +5 -0 rkward/plugins/distributions/exponential.js A +0 -0 rkward/plugins/distributions/exponential.rkh R +7 -3 rkward/plugins/distributions/exponential.xml [from: rkward/plugins/distributions/exponential_probabilities.xml - 055% similarity] D +0 -14 rkward/plugins/distributions/exponential_probabilities.js D +0 -14 rkward/plugins/distributions/exponential_quantiles.js D +0 -13 rkward/plugins/distributions/exponential_quantiles.xml A +5 -0 rkward/plugins/distributions/f.js A +0 -0 rkward/plugins/distributions/f.rkh R +7 -3 rkward/plugins/distributions/f.xml [from: rkward/plugins/distributions/f_probabilities.xml - 073% similarity] D +0 -14 rkward/plugins/distributions/f_probabilities.js D +0 -14 rkward/plugins/distributions/f_quantiles.js D +0 -15 rkward/plugins/distributions/f_quantiles.xml A +5 -0 rkward/plugins/distributions/gamma.js A +0 -0 rkward/plugins/distributions/gamma.rkh R +7 -3 rkward/plugins/distributions/gamma.xml [from: rkward/plugins/distributions/gamma_probabilities.xml - 064% similarity] D +0 -14 rkward/plugins/distributions/gamma_probabilities.js D +0 -15 rkward/plugins/distributions/gamma_quantiles.js D +0 -14 rkward/plugins/distributions/gamma_quantiles.xml A +5 -0 rkward/plugins/distributions/geom.js A +0 -0 rkward/plugins/distributions/geom.rkh R +7 -3 rkward/plugins/distributions/geom.xml [from: rkward/plugins/distributions/geom_probabilities.xml - 060% similarity] D +0 -14 rkward/plugins/distributions/geom_probabilities.js D +0 -14 rkward/plugins/distributions/geom_quantiles.js D +0 -13 rkward/plugins/distributions/geom_quantiles.xml R +8 -0 rkward/plugins/distributions/gumbel.js [from: rkward/plugins/distributions/gumbel_probabilities.js - 080% similarity] A +0 -0 rkward/plugins/distributions/gumbel.rkh R +7 -3 rkward/plugins/distributions/gumbel.xml [from: rkward/plugins/distributions/gumbel_probabilities.xml - 063% similarity] D +0 -14 rkward/plugins/distributions/gumbel_quantiles.js D +0 -14 rkward/plugins/distributions/gumbel_quantiles.xml A +7 -0 rkward/plugins/distributions/hypergeometric.js A +0 -0 rkward/plugins/distributions/hypergeometric.rkh R +6 -2 rkward/plugins/distributions/hypergeometric.xml [from: rkward/plugins/distributions/hypergeometric_probabilities.xml - 073% similarity] D +0 -14 rkward/plugins/distributions/hypergeometric_probabilities.js D +0 -14 rkward/plugins/distributions/hypergeometric_quantiles.js D +0 -15 rkward/plugins/distributions/hypergeometric_quantiles.xml A +5 -0 rkward/plugins/distributions/log_normal.js A +0 -0 rkward/plugins/distributions/log_normal.rkh R +7 -3 rkward/plugins/distributions/log_normal.xml [from: rkward/plugins/distributions/log_normal_probabilities.xml - 068% similarity] D +0 -14 rkward/plugins/distributions/log_normal_probabilities.js D +0 -14 rkward/plugins/distributions/log_normal_quantiles.js D +0 -14 rkward/plugins/distributions/log_normal_quantiles.xml A +5 -0 rkward/plugins/distributions/logistic.js A +0 -0 rkward/plugins/distributions/logistic.rkh R +7 -3 rkward/plugins/distributions/logistic.xml [from: rkward/plugins/distributions/logistic_probabilities.xml - 063% similarity] D +0 -14 rkward/plugins/distributions/logistic_probabilities.js D +0 -14 rkward/plugins/distributions/logistic_quantiles.js D +0 -14 rkward/plugins/distributions/logistic_quantiles.xml A +5 -0 rkward/plugins/distributions/negative_binomial.js A +0 -0 rkward/plugins/distributions/negative_binomial.rkh R +7 -3 rkward/plugins/distributions/negative_binomial.xml [from: rkward/plugins/distributions/negative_binomial_quantiles.xml - 063% similarity] D +0 -14 rkward/plugins/distributions/negative_binomial_probabilities.js D +0 -14 rkward/plugins/distributions/negative_binomial_probabilities.xml D +0 -14 rkward/plugins/distributions/negative_binomial_quantiles.js A +5 -0 rkward/plugins/distributions/normal.js A +0 -0 rkward/plugins/distributions/normal.rkh R +7 -3 rkward/plugins/distributions/normal.xml [from: rkward/plugins/distributions/normal_probabilities.xml - 064% similarity] D +0 -14 rkward/plugins/distributions/normal_probabilities.js D +0 -14 rkward/plugins/distributions/normal_quantiles.js D +0 -14 rkward/plugins/distributions/normal_quantiles.xml A +5 -0 rkward/plugins/distributions/poisson.js A +0 -0 rkward/plugins/distributions/poisson.rkh R +7 -3 rkward/plugins/distributions/poisson.xml [from: rkward/plugins/distributions/poisson_quantiles.xml - 056% similarity] D +0 -14 rkward/plugins/distributions/poisson_probabilities.js D +0 -13 rkward/plugins/distributions/poisson_probabilities.xml D +0 -14 rkward/plugins/distributions/poisson_quantiles.js A +5 -0 rkward/plugins/distributions/t.js A +0 -0 rkward/plugins/distributions/t.rkh R +7 -3 rkward/plugins/distributions/t.xml [from: rkward/plugins/distributions/chi_squared_probabilities.xml - 067% similarity] D +0 -14 rkward/plugins/distributions/t_probabilities.js D +0 -14 rkward/plugins/distributions/t_probabilities.xml D +0 -14 rkward/plugins/distributions/t_quantiles.js D +0 -14 rkward/plugins/distributions/t_quantiles.xml A +5 -0 rkward/plugins/distributions/tukey.js A +0 -0 rkward/plugins/distributions/tukey.rkh R +7 -3 rkward/plugins/distributions/tukey.xml [from: rkward/plugins/distributions/tukey_probabilities.xml - 069% similarity] D +0 -14 rkward/plugins/distributions/tukey_probabilities.js D +0 -14 rkward/plugins/distributions/tukey_quantiles.js D +0 -15 rkward/plugins/distributions/tukey_quantiles.xml A +5 -0 rkward/plugins/distributions/uniform.js A +0 -0 rkward/plugins/distributions/uniform.rkh R +7 -3 rkward/plugins/distributions/uniform.xml [from: rkward/plugins/distributions/uniform_probabilities.xml - 065% similarity] D +0 -14 rkward/plugins/distributions/uniform_probabilities.js D +0 -14 rkward/plugins/distributions/uniform_quantiles.js D +0 -14 rkward/plugins/distributions/uniform_quantiles.xml A +5 -0 rkward/plugins/distributions/weibull.js A +0 -0 rkward/plugins/distributions/weibull.rkh R +7 -3 rkward/plugins/distributions/weibull.xml [from: rkward/plugins/distributions/weibull_probabilities.xml - 064% similarity] D +0 -14 rkward/plugins/distributions/weibull_probabilities.js D +0 -14 rkward/plugins/distributions/weibull_quantiles.js D +0 -14 rkward/plugins/distributions/weibull_quantiles.xml A +5 -0 rkward/plugins/distributions/wilcoxon.js A +0 -0 rkward/plugins/distributions/wilcoxon.rkh R +7 -3 rkward/plugins/distributions/wilcoxon.xml [from: rkward/plugins/distributions/wilcoxon_probabilities.xml - 064% similarity] D +0 -14 rkward/plugins/distributions/wilcoxon_probabilities.js D +0 -14 rkward/plugins/distributions/wilcoxon_quantiles.js D +0 -14 rkward/plugins/distributions/wilcoxon_quantiles.xml http://commits.kde.org/rkward/5b742e59b7bef0abe20b26653ac4e7ea915319be diff --git a/rkward/plugins/distributions.pluginmap b/rkward/plugins/distributions.pluginmap index 8864e70..1e24fef 100644 --- a/rkward/plugins/distributions.pluginmap +++ b/rkward/plugins/distributions.pluginmap @@ -17,7 +17,6 @@ <components> <!-- tests --> - <component type="standard" id="shapiro_test" file="tests/shapiro_test.xml" label="Shapiro-Wilk Normality Test" /> <component type="standard" id="ad_test" file="tests/ad_test.xml" label="Anderson-Darling Normality Test" /> <component type="standard" id="cvm_test" file="tests/cvm_test.xml" label="Cramer-von Mises Normality Test" /> @@ -27,81 +26,63 @@ <component type="standard" id="jb_test" file="tests/jb_test.xml" label="Jarque-Bera Normality Test" /> <!-- distributions --> - <component type="standard" id="beta_probabilities" file="beta.xml" label="Beta probabilities" /> + <component type="standard" id="beta_probabilities" file="beta.xml" label="Beta distribution calculator" /> <component type="standard" id="plot_beta_distribution" file="plot_beta_distribution.xml" label="Plot Beta distribution" /> - <component type="standard" id="binomial_probabilities" file="binomial.xml" label="Binomial probabilities, quantiles, densities" /> + <component type="standard" id="binomial_probabilities" file="binomial.xml" label="Binomial distribution calculator" /> <component type="standard" id="plot_binomial_distribution" file="plot_binomial_distribution.xml" label="Plot binomial distribution" /> - <component type="standard" id="cauchy_quantiles" file="cauchy_quantiles.xml" label="Cauchy quantiles" /> - <component type="standard" id="cauchy_probabilities" file="cauchy_probabilities.xml" label="Cauchy probabilities" /> + <component type="standard" id="cauchy_probabilities" file="cauchy.xml" label="Cauchy distribution calculator" /> <component type="standard" id="plot_cauchy_distribution" file="plot_cauchy_distribution.xml" label="Plot Cauchy distribution" /> - <component type="standard" id="chi_squared_quantiles" file="chi_squared_quantiles.xml" label="Chi-squared quantiles" /> - <component type="standard" id="chi_squared_probabilities" file="chi_squared_probabilities.xml" label="Chi-squared probabilities" /> + <component type="standard" id="chi_squared_probabilities" file="chi_squared.xml" label="Chi-squared distribution calculator" /> <component type="standard" id="plot_chi_squared_distribution" file="plot_chi_squared_distribution.xml" label="Plot Chi-squared distribution" /> - <component type="standard" id="exponential_quantiles" file="exponential_quantiles.xml" label="Exponential quantiles" /> - <component type="standard" id="exponential_probabilities" file="exponential_probabilities.xml" label="Exponential probabilities" /> + <component type="standard" id="exponential_probabilities" file="exponential.xml" label="Exponential probabilities" /> <component type="standard" id="plot_exponential_distribution" file="plot_exponential_distribution.xml" label="Plot Exponential distribution" /> - <component type="standard" id="f_quantiles" file="f_quantiles.xml" label="F quantiles" /> - <component type="standard" id="f_probabilities" file="f_probabilities.xml" label="F probabilities" /> + <component type="standard" id="f_probabilities" file="f.xml" label="F distribution calculator" /> <component type="standard" id="plot_f_distribution" file="plot_f_distribution.xml" label="Plot F distribution" /> - <component type="standard" id="gamma_quantiles" file="gamma_quantiles.xml" label="Gamma quantiles" /> - <component type="standard" id="gamma_probabilities" file="gamma_probabilities.xml" label="Gamma probabilities" /> + <component type="standard" id="gamma_probabilities" file="gamma.xml" label="Gamma distribution calculator" /> <component type="standard" id="plot_gamma_distribution" file="plot_gamma_distribution.xml" label="Plot Gamma distribution" /> - <component type="standard" id="geom_quantiles" file="geom_quantiles.xml" label="Geometric quantiles" /> - <component type="standard" id="geom_probabilities" file="geom_probabilities.xml" label="Geometric probabilities" /> + <component type="standard" id="geom_probabilities" file="geom.xml" label="Geometric distribution calculator" /> <component type="standard" id="plot_geometric_distribution" file="plot_geometric_distribution.xml" label="Plot Geometric distribution" /> - <component type="standard" id="gumbel_quantiles" file="gumbel_quantiles.xml" label="Gumbel quantiles" /> - <component type="standard" id="gumbel_probabilities" file="gumbel_probabilities.xml" label="Gumbel probabilities" /> + <component type="standard" id="gumbel_probabilities" file="gumbel.xml" label="Gumbel distribution calculator" /> - <component type="standard" id="hypergeometric_quantiles" file="hypergeometric_quantiles.xml" label="Hypergeometric quantiles" /> - <component type="standard" id="hypergeometric_probabilities" file="hypergeometric_probabilities.xml" label="Hypergeometric probabilities" /> + <component type="standard" id="hypergeometric_probabilities" file="hypergeometric.xml" label="Hypergeometric distribution calculator" /> <component type="standard" id="plot_hypergeometric_distribution" file="plot_hypergeometric_distribution.xml" label="Plot Hypergeometric distribution" /> - <component type="standard" id="logistic_quantiles" file="logistic_quantiles.xml" label="Logistic quantiles" /> - <component type="standard" id="logistic_probabilities" file="logistic_probabilities.xml" label="Logistic probabilities" /> + <component type="standard" id="logistic_probabilities" file="logistic.xml" label="Logistic distribution calculator" /> <component type="standard" id="plot_logistic_distribution" file="plot_logistic_distribution.xml" label="Plot Logistic distribution" /> - <component type="standard" id="log_normal_quantiles" file="log_normal_quantiles.xml" label="Log Normal quantiles" /> - <component type="standard" id="log_normal_probabilities" file="log_normal_probabilities.xml" label="Log Normal probabilities" /> - <component type="standard" id="plot_lognormal_distribution" file="plot_lognormal_distribution.xml" label="Plot Lognormal distribution" /> + <component type="standard" id="log_normal_probabilities" file="log_normal.xml" label="Log Normal distribution calculator" /> + <component type="standard" id="plot_lognormal_distribution" file="plot_lognormal_distribution.xml" label="Plot Log Normal distribution" /> - <component type="standard" id="negative_binomial_quantiles" file="negative_binomial_quantiles.xml" label="Negative Binomial quantiles" /> - <component type="standard" id="negative_binomial_probabilities" file="negative_binomial_probabilities.xml" label="Negative Binomial probabilities" /> + <component type="standard" id="negative_binomial_probabilities" file="negative_binomial.xml" label="Negative Binomial distribution calculator" /> <component type="standard" id="plot_negbinomial_distribution" file="plot_negbinomial_distribution.xml" label="Plot Negative Binomial distribution" /> - <component type="standard" id="normal_quantiles" file="normal_quantiles.xml" label="Normal quantiles" /> - <component type="standard" id="normal_probabilities" file="normal_probabilities.xml" label="Normal probabilities" /> + <component type="standard" id="normal_probabilities" file="normal.xml" label="Normal distribution calculator" /> <component type="standard" id="plot_normal_distribution" file="plot_normal_distribution.xml" label="Plot Normal distribution" /> - <component type="standard" id="poisson_quantiles" file="poisson_quantiles.xml" label="Poisson quantiles" /> - <component type="standard" id="poisson_probabilities" file="poisson_probabilities.xml" label="Poisson probabilities" /> + <component type="standard" id="poisson_probabilities" file="poisson.xml" label="Poisson distribution calculator" /> <component type="standard" id="plot_poisson_distribution" file="plot_poisson_distribution.xml" label="Plot Poisson distribution" /> - <component type="standard" id="t_quantiles" file="t_quantiles.xml" label="t quantiles" /> - <component type="standard" id="t_probabilities" file="t_probabilities.xml" label="t probabilities" /> + <component type="standard" id="t_probabilities" file="t.xml" label="t distribution calculator" /> <component type="standard" id="plot_t_distribution" file="plot_t_distribution.xml" label="Plot t distribution" /> - <component type="standard" id="tukey_probabilities" file="tukey_probabilities.xml" label="Studentized Range probabilities (Tukey)" /> - <component type="standard" id="tukey_quantiles" file="tukey_quantiles.xml" label="Studentized Range quantiles (Tukey)" /> + <component type="standard" id="tukey_probabilities" file="tukey.xml" label="Studentized Range (Tukey) distribution calculator" /> <component type="standard" id="plot_tukey_distribution" file="plot_tukey_distribution.xml" label="Plot Studentized Range (Tukey) distribution" /> - <component type="standard" id="uniform_quantiles" file="uniform_quantiles.xml" label="Uniform quantiles" /> - <component type="standard" id="uniform_probabilities" file="uniform_probabilities.xml" label="Uniform probabilities" /> + <component type="standard" id="uniform_probabilities" file="uniform.xml" label="Uniform distribution calculator" /> <component type="standard" id="plot_uniform_distribution" file="plot_uniform_distribution.xml" label="Plot Uniform distribution" /> - <component type="standard" id="weibull_quantiles" file="weibull_quantiles.xml" label="Weibull quantiles" /> - <component type="standard" id="weibull_probabilities" file="weibull_probabilities.xml" label="Weibull probabilities" /> + <component type="standard" id="weibull_probabilities" file="weibull.xml" label="Weibull distribution calculator" /> <component type="standard" id="plot_weibull_distribution" file="plot_weibull_distribution.xml" label="Plot Weibull distribution" /> - <component type="standard" id="wilcoxon_quantiles" file="wilcoxon_quantiles.xml" label="Wilcoxon Rank Sum quantiles" /> - <component type="standard" id="wilcoxon_probabilities" file="wilcoxon_probabilities.xml" label="Wilcoxon Rank Sum probabilities" /> + <component type="standard" id="wilcoxon_probabilities" file="wilcoxon.xml" label="Wilcoxon Rank Sum distribution calculator" /> <component type="standard" id="plot_wilcoxon_distribution" file="plot_wilcoxon_distribution.xml" label="Plot Wilcoxon Rank Sum distribution" /> @@ -129,131 +110,113 @@ <hierarchy> <menu id="distributions" label="Distributions"> <menu id="distribution_analysis" label="Distribution Analysis"> - <entry component="ad_test" label="Anderson-Darling Normality Test"/> - <entry component="cvm_test" label="Cramer-von Mises Normality Test"/> - <entry component="lillie_test" label="Lilliefors (Kolmogorov-Smirnov) Normality Test"/> - <entry component="pearson_test" label="Pearson chi-square Normality Test"/> - <entry component="sf_test" label="Shapiro-Francia Normality Test"/> - <entry component="shapiro_test" label="Shapiro-Wilk Normality Test"/> - <entry component="jb_test" label="Jarque-Bera Normality Test"/> + <entry component="ad_test" /> + <entry component="cvm_test" /> + <entry component="lillie_test" /> + <entry component="pearson_test" /> + <entry component="sf_test" /> + <entry component="shapiro_test" /> + <entry component="jb_test" /> </menu> <menu id="univariate_continuous_distributions" label="Univariate continuous distributions"> <menu id="beta_distribution" label="Beta"> - <entry component="beta_probabilities" label="Beta probabilities, quantiles, densities"/> - <entry component="plot_beta_clt" label="Beta CLT"/> - <entry component="plot_beta_distribution" label="Plot Beta distribution"/> + <entry component="beta_probabilities" /> + <entry component="plot_beta_clt" /> + <entry component="plot_beta_distribution" /> </menu> <menu id="cauchy_distribution" label="Cauchy"> - <entry component="cauchy_quantiles" label="Cauchy quantiles"/> - <entry component="cauchy_probabilities" label="Cauchy probabilities"/> - <entry component="plot_cauchy_distribution" label="Plot Cauchy distribution"/> + <entry component="cauchy_probabilities" /> + <entry component="plot_cauchy_distribution" /> </menu> <menu id="chi_squared_distribution" label="Chi-squared"> - <entry component="chi_squared_quantiles" label="Chi-squared quantiles"/> - <entry component="chi_squared_probabilities" label="Chi-squared probabilities"/> - <entry component="plot_chi_squared_clt" label="Chi-squared CLT"/> - <entry component="plot_chi_squared_distribution" label="Plot Chi-squared distribution"/> + <entry component="chi_squared_probabilities" /> + <entry component="plot_chi_squared_clt" /> + <entry component="plot_chi_squared_distribution" /> </menu> <menu id="exponential_distribution" label="Exponential"> - <entry component="exponential_quantiles" label="Exponential quantiles"/> - <entry component="exponential_probabilities" label="Exponential probabilities"/> - <entry component="plot_exponential_clt" label="Exponential CLT"/> - <entry component="plot_exponential_distribution" label="Plot Exponential distribution"/> + <entry component="exponential_probabilities" /> + <entry component="plot_exponential_clt" /> + <entry component="plot_exponential_distribution" /> </menu> <menu id="f_distribution" label="F"> - <entry component="f_quantiles" label="F quantiles"/> - <entry component="f_probabilities" label="F probabilities"/> - <entry component="plot_f_clt" label="F CLT"/> - <entry component="plot_f_distribution" label="Plot F distribution"/> + <entry component="f_probabilities" /> + <entry component="plot_f_clt" /> + <entry component="plot_f_distribution" /> </menu> <menu id="gamma_distribution" label="Gamma"> - <entry component="gamma_quantiles" label="Gamma quantiles"/> - <entry component="gamma_probabilities" label="Gamma probabilities"/> - <entry component="plot_gamma_clt" label="Gamma CLT"/> - <entry component="plot_gamma_distribution" label="Plot Gamma distribution"/> + <entry component="gamma_probabilities" /> + <entry component="plot_gamma_clt" /> + <entry component="plot_gamma_distribution" /> </menu> <menu id="gumbel_distribution" label="Gumbel"> - <entry component="gumbel_quantiles" label="Gumbel quantiles"/> - <entry component="gumbel_probabilities" label="Gumbel probabilities"/> + <entry component="gumbel_probabilities" /> </menu> <menu id="logistic_distribution" label="Logistic"> - <entry component="logistic_quantiles" label="Logistic quantiles"/> - <entry component="logistic_probabilities" label="Logistic probabilities"/> - <entry component="plot_logistic_clt" label="Logistic CLT"/> - <entry component="plot_logistic_distribution" label="Plot Logistic distribution"/> + <entry component="logistic_probabilities" /> + <entry component="plot_logistic_clt" /> + <entry component="plot_logistic_distribution" /> </menu> <menu id="log_normal_distribution" label="Log Normal"> - <entry component="log_normal_quantiles" label="Log Normal quantiles"/> - <entry component="log_normal_probabilities" label="Log Normal probabilities"/> - <entry component="plot_log_normal_clt" label="Log Normal CLT"/> - <entry component="plot_lognormal_distribution" label="Plot Lognormal distribution"/> + <entry component="log_normal_probabilities" /> + <entry component="plot_log_normal_clt" /> + <entry component="plot_lognormal_distribution" /> </menu> <menu id="normal_distribution" label="Normal"> - <entry component="normal_quantiles" label="Normal quantiles"/> - <entry component="normal_probabilities" label="Normal probabilities"/> - <entry component="plot_normal_clt" label="Normal CLT"/> - <entry component="plot_normal_distribution" label="Plot Normal distribution"/> + <entry component="normal_probabilities" /> + <entry component="plot_normal_clt" /> + <entry component="plot_normal_distribution" /> </menu> <menu id="tukey_distribution" label="Tukey"> - <entry component="tukey_probabilities" label="Tukey probabilities"/> - <entry component="tukey_quantiles" label="Tukey quantiles"/> - <entry component="plot_tukey_distribution" label="Plot Studentized Range (Tukey) distribution"/> + <entry component="tukey_probabilities" /> + <entry component="plot_tukey_distribution" /> </menu> <menu id="t_distribution" label="t"> - <entry component="t_quantiles" label="t quantiles"/> - <entry component="t_probabilities" label="t probabilities"/> - <entry component="plot_t_clt" label="t CLT"/> - <entry component="plot_t_distribution" label="Plot t distribution"/> + <entry component="t_probabilities" /> + <entry component="plot_t_clt" /> + <entry component="plot_t_distribution" /> </menu> <menu id="uniform_distribution" label="Uniform"> - <entry component="uniform_quantiles" label="Uniform quantiles"/> - <entry component="uniform_probabilities" label="Uniform probabilities"/> - <entry component="plot_uniform_clt" label="Uniform CLT"/> - <entry component="plot_uniform_distribution" label="Plot Uniform distribution"/> + <entry component="uniform_probabilities" /> + <entry component="plot_uniform_clt" /> + <entry component="plot_uniform_distribution" /> </menu> <menu id="weibull_distribution" label="Weibull"> - <entry component="weibull_quantiles" label="Weibull quantiles"/> - <entry component="weibull_probabilities" label="Weibull probabilities"/> - <entry component="plot_weibull_clt" label="Weibull CLT"/> - <entry component="plot_weibull_distribution" label="Plot Weibull distribution"/> + <entry component="weibull_probabilities" /> + <entry component="plot_weibull_clt" /> + <entry component="plot_weibull_distribution" /> </menu> </menu> <menu id="univariate_discrete_distributions" label="Univariate discrete distributions"> <menu id="binomial_distribution" label="Binomial"> - <entry component="binomial_probabilities" label="Binomial probabilities, quantiles, densities"/> - <entry component="plot_binomial_clt" label="Binomial CLT"/> - <entry component="plot_binomial_distribution" label="Plot binomial distribution"/> + <entry component="binomial_probabilities" /> + <entry component="plot_binomial_clt" /> + <entry component="plot_binomial_distribution" /> </menu> <menu id="geometric_distribution" label="Geometric"> - <entry component="geom_probabilities" label="Geometric probabilities"/> - <entry component="geom_quantiles" label="Geometric quantiles"/> - <entry component="plot_geometric_clt" label="Geometric CLT"/> - <entry component="plot_geometric_distribution" label="Plot Geometric distribution"/> + <entry component="geom_probabilities" /> + <entry component="plot_geometric_clt" /> + <entry component="plot_geometric_distribution" /> </menu> <menu id="hypergeometric_distribution" label="Hypergeometric"> - <entry component="hypergeometric_probabilities" label="Hypergeometric probabilities"/> - <entry component="hypergeometric_quantiles" label="Hypergeometric quantiles"/> - <entry component="plot_hypergeometric_clt" label="Hypergeometric CLT"/> - <entry component="plot_hypergeometric_distribution" label="Plot Hypergeometric distribution"/> + <entry component="hypergeometric_probabilities" /> + <entry component="plot_hypergeometric_clt" /> + <entry component="plot_hypergeometric_distribution" /> </menu> <menu id="negative_binomial_distribution" label="Negative Binomial"> - <entry component="negative_binomial_probabilities" label="Negative Binomial probabilities"/> - <entry component="negative_binomial_quantiles" label="Hypergeometric quantiles"/> - <entry component="plot_negbinomial_clt" label="Negative Binomial CLT"/> - <entry component="plot_negbinomial_distribution" label="Plot Negative Binomial distribution"/> + <entry component="negative_binomial_probabilities" /> + <entry component="plot_negbinomial_clt" /> + <entry component="plot_negbinomial_distribution" /> </menu> <menu id="poisson_distribution" label="Poisson"> - <entry component="poisson_probabilities" label="Poisson probabilities"/> - <entry component="poisson_quantiles" label="Poisson quantiles"/> - <entry component="plot_poisson_clt" label="Poisson CLT"/> - <entry component="plot_poisson_distribution" label="Plot Poisson distribution"/> + <entry component="poisson_probabilities" /> + <entry component="plot_poisson_clt" /> + <entry component="plot_poisson_distribution" /> </menu> <menu id="wilcoxon_distribution" label="Wilcoxon Rank Sum"> - <entry component="wilcoxon_quantiles" label="Wilcoxon Rank Sum quantiles"/> - <entry component="wilcoxon_probabilities" label="Wilcoxon Rank Sum probabilities"/> - <entry component="plot_wilcoxon_clt" label="Wilcoxon CLT"/> - <entry component="plot_wilcoxon_distribution" label="Plot Wilcoxon Rank Sum distribution"/> + <entry component="wilcoxon_probabilities" /> + <entry component="plot_wilcoxon_clt" /> + <entry component="plot_wilcoxon_distribution" /> </menu> </menu> </menu> diff --git a/rkward/plugins/distributions/beta.js b/rkward/plugins/distributions/beta.js index 1c6e0b8..209b8c1 100755 --- a/rkward/plugins/distributions/beta.js +++ b/rkward/plugins/distributions/beta.js @@ -1,9 +1,5 @@ include ("dist_common.js"); function getDistSpecifics () { - var dist = new Object; - dist["params"] = ', shape1=' + getValue ("shape1") + ', shape2=' + getValue ("shape2") + ', ncp=' + getValue ("ncp"); - dist["funstem"] = 'beta'; - dist["header"] = new Header (i18n ('Beta distribution')).addFromUI ("shape1").addFromUI ("shape2").addFromUI ("ncp"); - return dist; + return initDistSpecifics (i18n ('Beta distribution'), 'beta', ["shape1", "shape2", "ncp"], [0, 1], true); } diff --git a/rkward/plugins/distributions/beta.rkh b/rkward/plugins/distributions/beta.rkh new file mode 100644 index 0000000..66e3020 --- /dev/null +++ b/rkward/plugins/distributions/beta.rkh @@ -0,0 +1,22 @@ +<!DOCTYPE rkhelp> +<document> + <snippets> + <include file="dist_help_snippets.xml"/> + </snippets> + <summary> + Provides a calculator for probabilities, quantiles, and densities in the Beta distribution. + </summary> + <insert snippet="dialog_usage"/> + <settings> + <insert snippet="dialog_settings"/> + <setting id="shape1">Parameter of the Beta distribution</setting> + <setting id="shape2">Parameter of the Beta distribution</setting> + <setting id="ncp">Non-centrality parameter</setting> + </settings> + <related> + <ul> + <li><link href="rkward://rhelp/Beta"/></li> + <li><link href="rkward://component/rkward/plot_beta_distribution"/></li> + </ul> + </related> +</document> diff --git a/rkward/plugins/distributions/beta.xml b/rkward/plugins/distributions/beta.xml index 8b1d067..213111f 100755 --- a/rkward/plugins/distributions/beta.xml +++ b/rkward/plugins/distributions/beta.xml @@ -1,6 +1,7 @@ <!DOCTYPE rkplugin> <document> <code file="beta.js" /> + <help file="beta.rkh" /> <logic> <insert snippet="dialog_logic"/> </logic> @@ -12,7 +13,7 @@ </snippet> <include file="dist_snippets.xml"/> </snippets> - <dialog label="Beta probabilities, quantiles, densities" > + <dialog label="Beta distribution calculator" > <insert snippet="dialog_layout"/> </dialog> </document> diff --git a/rkward/plugins/distributions/binomial.js b/rkward/plugins/distributions/binomial.js index 7534c58..ca0f014 100644 --- a/rkward/plugins/distributions/binomial.js +++ b/rkward/plugins/distributions/binomial.js @@ -1,11 +1,6 @@ include ("dist_common.js"); function getDistSpecifics () { - var dist = new Object; - var size = getString ("size"); - dist["params"] = ', size=' + size + ", prob=" + getString ("prob"); - dist["funstem"] = 'binom'; - dist["max_quantile"] = size; - dist["header"] = new Header (i18n ('Binomial distribution')).addFromUI ("size").addFromUI ("prob"); + var dist = initDistSpecifics (i18n ('Binomial distribution'), 'binom', ["size", "prob"], [0, getString ("size")], false); return dist; } diff --git a/rkward/plugins/distributions/binomial.rkh b/rkward/plugins/distributions/binomial.rkh index 7afcc63..0b3d8ef 100644 --- a/rkward/plugins/distributions/binomial.rkh +++ b/rkward/plugins/distributions/binomial.rkh @@ -1,16 +1,14 @@ <!DOCTYPE rkhelp> <document> + <snippets> + <include file="dist_help_snippets.xml"/> + </snippets> <summary> Provides a calculator for probabilities, quantiles, and densities in the binonmial distribution. Note: For the binomial distribution, quantiles can be interpreted as number of successes in the given number of trials. </summary> - <usage> - Select the desired mode of operation, then specify the values of interest. - </usage> - <snippets> - <include file="dist_help_snippets.xml"/> - </snippets> + <insert snippet="dialog_usage"/> <settings> <insert snippet="dialog_settings"/> <setting id="size">Number of binomial trials</setting> diff --git a/rkward/plugins/distributions/cauchy.js b/rkward/plugins/distributions/cauchy.js new file mode 100755 index 0000000..66938ec --- /dev/null +++ b/rkward/plugins/distributions/cauchy.js @@ -0,0 +1,5 @@ +include ("dist_common.js"); + +function getDistSpecifics () { + return initDistSpecifics (i18n ('Cauchy distribution'), 'cauchy', ["location", "scale"]); +} diff --git a/rkward/plugins/distributions/cauchy.rkh b/rkward/plugins/distributions/cauchy.rkh new file mode 100644 index 0000000..e69de29 diff --git a/rkward/plugins/distributions/cauchy_probabilities.xml b/rkward/plugins/distributions/cauchy.xml similarity index 63% rename from rkward/plugins/distributions/cauchy_probabilities.xml rename to rkward/plugins/distributions/cauchy.xml index a257343..decb889 100755 --- a/rkward/plugins/distributions/cauchy_probabilities.xml +++ b/rkward/plugins/distributions/cauchy.xml @@ -1,6 +1,10 @@ <!DOCTYPE rkplugin> <document> - <code file="cauchy_probabilities.js" /> + <code file="cauchy.js" /> + <help file="cauchy.rkh" /> + <logic> + <insert snippet="dialog_logic"/> + </logic> <snippets> <snippet id="dist_options"> <spinbox default_precision="2" type="real" initial="0" id="location" label="Location"/> @@ -8,7 +12,7 @@ </snippet> <include file="dist_snippets.xml"/> </snippets> - <dialog label="Cauchy probabilities" > - <insert snippet="probabilities_layout"/> + <dialog label="Cauchy distribution calculator" > + <insert snippet="dialog_layout"/> </dialog> </document> diff --git a/rkward/plugins/distributions/cauchy_probabilities.js b/rkward/plugins/distributions/cauchy_probabilities.js deleted file mode 100755 index 6d6f9db..0000000 --- a/rkward/plugins/distributions/cauchy_probabilities.js +++ /dev/null @@ -1,14 +0,0 @@ -// globals -var q; - -function calculate () { - q = "c (" + getString ("q").replace (/[, ]+/g, ", ") + ")"; - - echo ('result <- (pcauchy (q = ' + q + ', location = ' + getValue ("location") + ', scale = ' + getValue ("scale") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n'); -} - -function printout () { - echo ('rk.header ("Cauchy probabilities", list ("Vector of quantiles", "' + q + '", "Location", "' + getValue ("location") + '", "Scale", "' + getValue ("scale") + '", "Tail", "' + getValue ("tail") + '", "Probabilities p are given as", "' + getValue ("logp") + '"))\n'); - echo ('rk.results (result, titles="Cauchy probabilities")\n'); -} - diff --git a/rkward/plugins/distributions/cauchy_quantiles.js b/rkward/plugins/distributions/cauchy_quantiles.js deleted file mode 100755 index da16f15..0000000 --- a/rkward/plugins/distributions/cauchy_quantiles.js +++ /dev/null @@ -1,14 +0,0 @@ -// globals -var p; - -function calculate () { - p = "c (" + getString ("p").replace (/[, ]+/g, ", ") + ")"; - - echo ('result <- (qcauchy (p = ' + p + ', location = ' + getValue ("location") + ', scale = ' + getValue ("scale") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n'); -} - -function printout () { - echo ('rk.header ("Cauchy quantiles", list ("Vector of probabilities", "' + p + '", "Location", "' + getValue ("location") + '", "Scale", "' + getValue ("scale") + '", "Tail", "' + getValue ("tail") + '", "Probabilities p are given as", "' + getValue ("logp") + '"));\n'); - echo ('rk.results (result, titles="Cauchy quantiles")\n'); -} - diff --git a/rkward/plugins/distributions/cauchy_quantiles.xml b/rkward/plugins/distributions/cauchy_quantiles.xml deleted file mode 100755 index 32a47e3..0000000 --- a/rkward/plugins/distributions/cauchy_quantiles.xml +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE rkplugin> -<document> - <code file="cauchy_quantiles.js" /> - <snippets> - <snippet id="dist_options"> - <spinbox default_precision="2" type="real" initial="0" id="location" label="Location"/> - <spinbox default_precision="2" type="real" min="0" initial="1" id="scale" label="Scale"/> - </snippet> - <include file="dist_snippets.xml"/> - </snippets> - <dialog label="Cauchy quantiles" > - <insert snippet="quantiles_layout"/> - </dialog> -</document> diff --git a/rkward/plugins/distributions/chi_squared.js b/rkward/plugins/distributions/chi_squared.js new file mode 100644 index 0000000..2ffd350 --- /dev/null +++ b/rkward/plugins/distributions/chi_squared.js @@ -0,0 +1,5 @@ +include ("dist_common.js"); + +function getDistSpecifics () { + return initDistSpecifics (i18n ('Chi-squared distribution'), 'chisq', ["df", "ncp"]); +} diff --git a/rkward/plugins/distributions/chi_squared.rkh b/rkward/plugins/distributions/chi_squared.rkh new file mode 100644 index 0000000..e69de29 diff --git a/rkward/plugins/distributions/chi_squared_quantiles.xml b/rkward/plugins/distributions/chi_squared.xml similarity index 63% rename from rkward/plugins/distributions/chi_squared_quantiles.xml rename to rkward/plugins/distributions/chi_squared.xml index 5d3845c..caf0688 100644 --- a/rkward/plugins/distributions/chi_squared_quantiles.xml +++ b/rkward/plugins/distributions/chi_squared.xml @@ -1,6 +1,10 @@ <!DOCTYPE rkplugin> <document> - <code file="chi_squared_quantiles.js" /> + <code file="chi_squared.js" /> + <help file="chi_squared.rkh" /> + <logic> + <insert snippet="dialog_logic"/> + </logic> <snippets> <snippet id="dist_options"> <spinbox default_precision="2" type="real" initial="1" id="df" min="0" label="Degrees of Freedom"/> @@ -8,7 +12,7 @@ </snippet> <include file="dist_snippets.xml"/> </snippets> - <dialog label="Chi-squared quantile" > - <insert snippet="quantiles_layout"/> + <dialog label="Chi-squared distribution calculator" > + <insert snippet="dialog_layout"/> </dialog> </document> diff --git a/rkward/plugins/distributions/chi_squared_probabilities.js b/rkward/plugins/distributions/chi_squared_probabilities.js deleted file mode 100644 index cc0d9b1..0000000 --- a/rkward/plugins/distributions/chi_squared_probabilities.js +++ /dev/null @@ -1,14 +0,0 @@ -// globals -var q; - -function calculate () { - q = "c (" + getString ("q").replace (/[, ]+/g, ", ") + ")"; - - echo ('result <- (pchisq (q = ' + q + ', df = ' + getValue ("df") + ', ncp = ' + getValue ("ncp") + ', ' + getValue ("tail") + ', ' + getValue ("logp") + '))\n'); -} - -function printout () { - echo ('rk.header ("Chi-squared probability", list ("Vector of quantiles", "' + q + '", "Degrees of Freedom", "' + getValue ("df") + '", "non-centrality parameter", "' + getValue ("ncp") + '", "Tail", "' + getValue ("tail") + '", "Probabilities p are given as", "' + getValue ("logp") + '"));\n'); - echo ('rk.results (result, titles="Chi-squared probabilities")\n'); -} - diff --git a/rkward/plugins/distributions/chi_squared_quantiles.js b/rkward/plugins/distributions/chi_squared_quantiles.js deleted file mode 100644 index 728d79e..0000000 --- a/rkward/plugins/distributions/chi_squared_quantiles.js +++ /dev/null @@ -1,14 +0,0 @@ -// globals -var p; - -function calculate () { - p = "c (" + getString ("p").replace (/[, ]+/g, ", ") + ")"; - - echo ('result <- (qchisq (p = ' + p + ', df = ' + getValue ("df") + ', ncp = ' + getValue ("ncp") + ', ' + getValue ("tail") + ', ' + getValue ("logp") + '))\n'); -} - -function printout () { - echo ('rk.header ("Chi-squared quantile", list ("Vector of probabilities", "' + p + '", "Degrees of freedom", "' + getValue ("df") + '", "non-centrality parameter", "' + getValue ("ncp") + '", "Tail", "' + getValue ("tail") + '", "Probabilities p are given as", "' + getValue ("logp") + '"));\n'); - echo ('rk.results (result, titles="Chi-squared quantiles")\n'); -} - diff --git a/rkward/plugins/distributions/dist_common.js b/rkward/plugins/distributions/dist_common.js index 7eaadef..2028932 100644 --- a/rkward/plugins/distributions/dist_common.js +++ b/rkward/plugins/distributions/dist_common.js @@ -4,6 +4,23 @@ var dist; var invar; var outvar; +function initDistSpecifics (title, stem, params, range, continuous) { + var dist = new Object (); + var header = new Header (title); + var par = ""; + for (var i = 0; i < params.length; ++i) { + header.addFromUI (params[i]); + par += ', ' + params[i] + '=' + getString (params[i]); + } + dist["header"] = header; + dist["params"] = par; + dist["funstem"] = stem; + dist["min"] = Number (range[0]); + dist["max"] = Number (range[1]); + dist["cont"] = continuous; + return dist; +} + function calculate () { mode = getString ("mode"); dist = getDistSpecifics (); @@ -31,15 +48,15 @@ function calculate () { var max_auto_sequence_length = 20; if (invar == 'q') { - var maxquant = dist["max_quantile"]; - if (typeof (maxquant) != 'undefined') { - if (maxquant <= max_auto_sequence_length) { - values = '0:' + String (maxquant); + if (!dist["cont"]) { + var span = dist["max"] - dist["min"]; + if (span <= max_auto_sequence_length) { + values = String (dist["min"]) + ':' + String (dist["max"]); } else { - values = 'seq.int (0, ' + String (maxquant) + ', by=' + String (Math.ceil (maxquant / max_auto_sequence_length)) + ')'; + values = 'seq.int (' + String (dist["min"]) + ', ' + String (dist["max"]) + ', by=' + String (Math.ceil (span / max_auto_sequence_length)) + ')'; } } else { - values = 'seq (0, 1, length.out=' + String (max_auto_sequence_length+1) + ')'; + values = 'seq (' + String (dist["min"]) + ', ' + String (dist["max"]) + ', length.out=' + String (max_auto_sequence_length+1) + ')'; } } else { // invar == 'p' if (logpd) { diff --git a/rkward/plugins/distributions/dist_help_snippets.xml b/rkward/plugins/distributions/dist_help_snippets.xml index 43f4ef1..c4736c9 100644 --- a/rkward/plugins/distributions/dist_help_snippets.xml +++ b/rkward/plugins/distributions/dist_help_snippets.xml @@ -9,4 +9,7 @@ <setting id="lower">If checked (the default) probabilities are P[X ≤ x]. Otherwise (upper tail) probabilities are P[X > x]</setting> <caption title="Distribution specific settings"/> </snippet> + <snippet id="dialog_usage"> + <usage>Select the desired mode of operation, then specify the values of interest. The input values (quantiles or probabilies) can be left empty, in which case a short sequence of evenly spaced values will be filled in, automatically.</usage> + </snippet> </document> diff --git a/rkward/plugins/distributions/exponential.js b/rkward/plugins/distributions/exponential.js new file mode 100755 index 0000000..22f8660 --- /dev/null +++ b/rkward/plugins/distributions/exponential.js @@ -0,0 +1,5 @@ +include ("dist_common.js"); + +function getDistSpecifics () { + return initDistSpecifics (i18n ('Exponential distribution'), 'exp', ["rate"]); +} diff --git a/rkward/plugins/distributions/exponential.rkh b/rkward/plugins/distributions/exponential.rkh new file mode 100644 index 0000000..e69de29 diff --git a/rkward/plugins/distributions/exponential_probabilities.xml b/rkward/plugins/distributions/exponential.xml similarity index 55% rename from rkward/plugins/distributions/exponential_probabilities.xml rename to rkward/plugins/distributions/exponential.xml index efee93c..cec6009 100755 --- a/rkward/plugins/distributions/exponential_probabilities.xml +++ b/rkward/plugins/distributions/exponential.xml @@ -1,13 +1,17 @@ <!DOCTYPE rkplugin> <document> - <code file="exponential_probabilities.js" /> + <code file="exponential.js" /> + <help file="exponential.rkh" /> + <logic> + <insert snippet="dialog_logic"/> + </logic> <snippets> <snippet id="dist_options"> <spinbox default_precision="2" type="real" min="0" initial="1" id="rate" label="vector of rates"/> </snippet> <include file="dist_snippets.xml"/> </snippets> - <dialog label="Exponential probabilities" > - <insert snippet="probabilities_layout"/> + <dialog label="Exponential distribution calculator" > + <insert snippet="dialog_layout"/> </dialog> </document> diff --git a/rkward/plugins/distributions/exponential_probabilities.js b/rkward/plugins/distributions/exponential_probabilities.js deleted file mode 100755 index d985514..0000000 --- a/rkward/plugins/distributions/exponential_probabilities.js +++ /dev/null @@ -1,14 +0,0 @@ -// globals -var q; - -function calculate () { - q = "c (" + getString ("q").replace (/[, ]+/g, ", ") + ")"; - - echo ('result <- (pexp (q = ' + q + ', rate = ' + getValue ("rate") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n'); -} - -function printout () { - echo ('rk.header ("Exponential probabilities", list ("Vector of quantiles", "' + q + '", "Rate", "' + getValue ("rate") + '", "Tail", "' + getValue ("tail") + '", "Probabilities p are given as", "' + getValue ("logp") + '"))\n'); - echo ('rk.results (result, titles="Exponential probabilities")\n'); -} - diff --git a/rkward/plugins/distributions/exponential_quantiles.js b/rkward/plugins/distributions/exponential_quantiles.js deleted file mode 100755 index 8c2a09e..0000000 --- a/rkward/plugins/distributions/exponential_quantiles.js +++ /dev/null @@ -1,14 +0,0 @@ -// globals -var p; - -function calculate () { - p = "c (" + getString ("p").replace (/[, ]+/g, ", ") + ")"; - - echo ('result <- (qexp (p = ' + p + ', rate = ' + getValue ("rate") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n'); -} - -function printout () { - echo ('rk.header ("Exponential quantiles", list ("Vector of probabilities", "' + p + '", "Rate", "' + getValue ("rate") + '", "Tail", "' + getValue ("tail") + '", "Probabilities p are given as", "' + getValue ("logp") + '"))\n'); - echo ('rk.results (result, titles="Exponential quantiles")\n'); -} - diff --git a/rkward/plugins/distributions/exponential_quantiles.xml b/rkward/plugins/distributions/exponential_quantiles.xml deleted file mode 100755 index 0b76e69..0000000 --- a/rkward/plugins/distributions/exponential_quantiles.xml +++ /dev/null @@ -1,13 +0,0 @@ -<!DOCTYPE rkplugin> -<document> - <code file="exponential_quantiles.js" /> - <snippets> - <snippet id="dist_options"> - <spinbox default_precision="2" type="real" min="0" initial="1" id="rate" label="vector of rates"/> - </snippet> - <include file="dist_snippets.xml"/> - </snippets> - <dialog label="Exponential quantiles" > - <insert snippet="quantiles_layout"/> - </dialog> -</document> diff --git a/rkward/plugins/distributions/f.js b/rkward/plugins/distributions/f.js new file mode 100644 index 0000000..b148eae --- /dev/null +++ b/rkward/plugins/distributions/f.js @@ -0,0 +1,5 @@ +include ("dist_common.js"); + +function getDistSpecifics () { + return initDistSpecifics (i18n ('F distribution'), 'f', ["df1", "df2", "ncp"]); +} diff --git a/rkward/plugins/distributions/f.rkh b/rkward/plugins/distributions/f.rkh new file mode 100644 index 0000000..e69de29 diff --git a/rkward/plugins/distributions/f_probabilities.xml b/rkward/plugins/distributions/f.xml similarity index 73% rename from rkward/plugins/distributions/f_probabilities.xml rename to rkward/plugins/distributions/f.xml index 54dbadd..ee0e96a 100644 --- a/rkward/plugins/distributions/f_probabilities.xml +++ b/rkward/plugins/distributions/f.xml @@ -1,6 +1,10 @@ <!DOCTYPE rkplugin> <document> - <code file="f_probabilities.js" /> + <code file="f.js" /> + <help file="f.rkh" /> + <logic> + <insert snippet="dialog_logic"/> + </logic> <snippets> <snippet id="dist_options"> <spinbox default_precision="2" type="real" initial="1" id="df1" min="0" label="Numerator degree of Freedom"/> @@ -9,7 +13,7 @@ </snippet> <include file="dist_snippets.xml"/> </snippets> - <dialog label="F probability" > - <insert snippet="probabilities_layout"/> + <dialog label="F distribution calculator" > + <insert snippet="dialog_layout"/> </dialog> </document> diff --git a/rkward/plugins/distributions/f_probabilities.js b/rkward/plugins/distributions/f_probabilities.js deleted file mode 100644 index 7c47415..0000000 --- a/rkward/plugins/distributions/f_probabilities.js +++ /dev/null @@ -1,14 +0,0 @@ -// globals -var q; - -function calculate () { - q = "c (" + getString ("q").replace (/[, ]+/g, ", ") + ")"; - - echo ('result <- (pf (q = ' + q + ', df1 = ' + getValue ("df1") + ', df2 = ' + getValue ("df2") + ', ncp = ' + getValue ("ncp") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n'); -} - -function printout () { - echo ('rk.header ("F probability", list ("Vector of quantiles", "' + q + '", "Numerator degrees of freedom", "' + getValue ("df1") + '", "Denominator degrees of freedom", "' + getValue ("df2") + '", "non-centrality parameter", "' + getValue ("ncp") + '", "Tail", "' + getValue ("tail") + '", "Probabilities p are given as", "' + getValue ("logp") + '"));\n'); - echo ('rk.results (result, titles="F probabilities")\n'); -} - diff --git a/rkward/plugins/distributions/f_quantiles.js b/rkward/plugins/distributions/f_quantiles.js deleted file mode 100644 index d26c733..0000000 --- a/rkward/plugins/distributions/f_quantiles.js +++ /dev/null @@ -1,14 +0,0 @@ -// globals -var p; - -function calculate () { - p = "c (" + getString ("p").replace (/[, ]+/g, ", ") + ")"; - - echo ('result <- (qf (p = ' + p + ', df1 = ' + getValue ("df1") + ', df2 = ' + getValue ("df2") + ', ncp = ' + getValue ("ncp") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n'); -} - -function printout () { - echo ('rk.header ("F quantile", list ("Vector of probabilities", "' + p + '", "Numerator degrees of freedom", "' + getValue ("df1") + '", "Denominator degrees of freedom", "' + getValue ("df2") + '", "non-centrality parameter", "' + getValue ("ncp") + '", "Tail", "' + getValue ("tail") + '", "Probabilities p are given as", "' + getValue ("logp") + '"));\n'); - echo ('rk.results (result, titles="F quantiles")\n'); -} - diff --git a/rkward/plugins/distributions/f_quantiles.xml b/rkward/plugins/distributions/f_quantiles.xml deleted file mode 100644 index 753db1b..0000000 --- a/rkward/plugins/distributions/f_quantiles.xml +++ /dev/null @@ -1,15 +0,0 @@ -<!DOCTYPE rkplugin> -<document> - <code file="f_quantiles.js" /> - <snippets> - <snippet id="dist_options"> - <spinbox default_precision="2" type="real" initial="1" id="df1" min="0" label="Numerator degree of Freedom"/> - <spinbox default_precision="2" type="real" initial="1" id="df2" min="0" label="Denominator degree of Freedom"/> - <spinbox default_precision="2" type="real" initial="0" id="ncp" min="0" label="non-centrality parameter"/> - </snippet> - <include file="dist_snippets.xml"/> - </snippets> - <dialog label="F quantile" > - <insert snippet="quantiles_layout"/> - </dialog> -</document> diff --git a/rkward/plugins/distributions/gamma.js b/rkward/plugins/distributions/gamma.js new file mode 100755 index 0000000..b7dabe1 --- /dev/null +++ b/rkward/plugins/distributions/gamma.js @@ -0,0 +1,5 @@ +include ("dist_common.js"); + +function getDistSpecifics () { + return initDistSpecifics (i18n ('Gamma distribution'), 'gamma', ["shape", "rate"]); +} diff --git a/rkward/plugins/distributions/gamma.rkh b/rkward/plugins/distributions/gamma.rkh new file mode 100644 index 0000000..e69de29 diff --git a/rkward/plugins/distributions/gamma_probabilities.xml b/rkward/plugins/distributions/gamma.xml similarity index 64% rename from rkward/plugins/distributions/gamma_probabilities.xml rename to rkward/plugins/distributions/gamma.xml index d186b9c..c5d3288 100755 --- a/rkward/plugins/distributions/gamma_probabilities.xml +++ b/rkward/plugins/distributions/gamma.xml @@ -1,6 +1,10 @@ <!DOCTYPE rkplugin> <document> - <code file="gamma_probabilities.js" /> + <code file="gamma.js" /> + <help file="gamma.rkh" /> + <logic> + <insert snippet="dialog_logic"/> + </logic> <snippets> <snippet id="dist_options"> <spinbox default_precision="2" type="real" min="0" initial="1" id="shape" label="Shape"/> @@ -8,7 +12,7 @@ </snippet> <include file="dist_snippets.xml"/> </snippets> - <dialog label="Gamma probabilities" > - <insert snippet="probabilities_layout"/> + <dialog label="Gamma distribution calculator" > + <insert snippet="dialog_layout"/> </dialog> </document> diff --git a/rkward/plugins/distributions/gamma_probabilities.js b/rkward/plugins/distributions/gamma_probabilities.js deleted file mode 100755 index 7592643..0000000 --- a/rkward/plugins/distributions/gamma_probabilities.js +++ /dev/null @@ -1,14 +0,0 @@ -// globals -var q; - -function calculate () { - q = "c (" + getString ("q").replace (/[, ]+/g, ", ") + ")"; - - echo ('result <- (pgamma (q = ' + q + ', shape = ' + getValue ("shape") + ', rate = ' + getValue ("rate") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n'); -} - -function printout () { - echo ('rk.header ("Gamma probability", list ("Vector of quantiles", "' + q + '", "Shape", "' + getValue ("shape") + '", "Rate", "' + getValue ("rate") + '", "Tail", "' + getValue ("tail") + '", "Probabilities p are given as", "' + getValue ("logp") + '"))\n'); - echo ('rk.results (result, titles="Gamma probabilities")\n'); -} - diff --git a/rkward/plugins/distributions/gamma_quantiles.js b/rkward/plugins/distributions/gamma_quantiles.js deleted file mode 100755 index a00570c..0000000 --- a/rkward/plugins/distributions/gamma_quantiles.js +++ /dev/null @@ -1,15 +0,0 @@ -// globals -var p; - -function calculate () { - p = "c (" + getString ("p").replace (/[, ]+/g, ", ") + ")"; - - echo ('result <- (qgamma (p = ' + p + ', shape = ' + getValue ("shape") + ', rate = ' + getValue ("rate") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n'); - echo ('\n'); -} - -function printout () { - echo ('rk.header ("Gamma quantile", list ("Vector of probabilities", "' + p + '", "Shape", "' + getValue ("shape") + '", "Rate", "' + getValue ("rate") + '", "Tail", "' + getValue ("tail") + '", "Probabilities p are given as", "' + getValue ("logp") + '"))\n'); - echo ('rk.results (result, titles="Gamma quantiles")\n'); -} - diff --git a/rkward/plugins/distributions/gamma_quantiles.xml b/rkward/plugins/distributions/gamma_quantiles.xml deleted file mode 100755 index bd06aa2..0000000 --- a/rkward/plugins/distributions/gamma_quantiles.xml +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE rkplugin> -<document> - <code file="gamma_quantiles.js" /> - <snippets> - <snippet id="dist_options"> - <spinbox default_precision="2" type="real" min="0" initial="1" id="shape" label="Shape"/> - <spinbox default_precision="2" type="real" min="0" initial="1" id="rate" label="Rate"/> - </snippet> - <include file="dist_snippets.xml"/> - </snippets> - <dialog label="Gamma quantiles" > - <insert snippet="quantiles_layout"/> - </dialog> -</document> diff --git a/rkward/plugins/distributions/geom.js b/rkward/plugins/distributions/geom.js new file mode 100755 index 0000000..0c4a02f --- /dev/null +++ b/rkward/plugins/distributions/geom.js @@ -0,0 +1,5 @@ +include ("dist_common.js"); + +function getDistSpecifics () { + return initDistSpecifics (i18n ('Geometric distribution'), 'geom', ["prob"]); +} diff --git a/rkward/plugins/distributions/geom.rkh b/rkward/plugins/distributions/geom.rkh new file mode 100644 index 0000000..e69de29 diff --git a/rkward/plugins/distributions/geom_probabilities.xml b/rkward/plugins/distributions/geom.xml similarity index 60% rename from rkward/plugins/distributions/geom_probabilities.xml rename to rkward/plugins/distributions/geom.xml index 2f821d8..bd3564b 100755 --- a/rkward/plugins/distributions/geom_probabilities.xml +++ b/rkward/plugins/distributions/geom.xml @@ -1,13 +1,17 @@ <!DOCTYPE rkplugin> <document> - <code file="geom_probabilities.js" /> + <code file="geom.js" /> + <help file="geom.rkh" /> + <logic> + <insert snippet="dialog_logic"/> + </logic> <snippets> <snippet id="dist_options"> <spinbox default_precision="2" type="real" min="0" initial="0.5" max="1" id="prob" label="probability of success in each trial"/> </snippet> <include file="dist_snippets.xml"/> </snippets> - <dialog label="Geometric probabilities" > - <insert snippet="probabilities_layout"/> + <dialog label="Geometric distribution calculator" > + <insert snippet="dialog_layout"/> </dialog> </document> diff --git a/rkward/plugins/distributions/geom_probabilities.js b/rkward/plugins/distributions/geom_probabilities.js deleted file mode 100755 index d020dd6..0000000 --- a/rkward/plugins/distributions/geom_probabilities.js +++ /dev/null @@ -1,14 +0,0 @@ -// globals -var q; - -function calculate () { - q = "c (" + getString ("q").replace (/[, ]+/g, ", ") + ")"; - - echo ('result <- (pgeom (q = ' + q + ', prob = ' + getValue ("prob") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n'); -} - -function printout () { - echo ('rk.header ("Geometric probability", list ("Vector of quantiles", "' + q + '", "Probability of success in each trial", "' + getValue ("prob") + '", "Tail", "' + getValue ("tail") + '", "Probabilities p are given as", "' + getValue ("logp") + '"))\n'); - echo ('rk.results (result, titles="Geometric probabilities")\n'); -} - diff --git a/rkward/plugins/distributions/geom_quantiles.js b/rkward/plugins/distributions/geom_quantiles.js deleted file mode 100755 index 52c1aa8..0000000 --- a/rkward/plugins/distributions/geom_quantiles.js +++ /dev/null @@ -1,14 +0,0 @@ -// globals -var p; - -function calculate () { - p = "c (" + getString ("p").replace (/[, ]+/g, ", ") + ")"; - - echo ('result <- (qgeom (p = ' + p + ', prob = ' + getValue ("prob") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n'); -} - -function printout () { - echo ('rk.header ("Geometric quantile", list ("Vector of probabilities", "' + p + '", "Probability of success in each trial", "' + getValue ("prob") + '", "Tail", "' + getValue ("tail") + '", "Probabilities p are given as", "' + getValue ("logp") + '"))\n'); - echo ('rk.results (result, titles="Geometric quantiles")\n'); -} - diff --git a/rkward/plugins/distributions/geom_quantiles.xml b/rkward/plugins/distributions/geom_quantiles.xml deleted file mode 100755 index 27c7dcb..0000000 --- a/rkward/plugins/distributions/geom_quantiles.xml +++ /dev/null @@ -1,13 +0,0 @@ -<!DOCTYPE rkplugin> -<document> - <code file="geom_quantiles.js" /> - <snippets> - <snippet id="dist_options"> - <spinbox default_precision="2" type="real" min="0" initial="0.5" max="1" id="prob" label="probability of success in each trial"/> - </snippet> - <include file="dist_snippets.xml"/> - </snippets> - <dialog label="Geometr... [truncated message content] |
From: Thomas F. <tho...@ru...> - 2015-01-22 17:30:48
|
Git commit 625600cf34118352ba978624cee775ed04c03c1d by Thomas Friedrichsmeier. Committed on 22/01/2015 at 17:30. Pushed by tfry into branch 'work/distributions'. Document that later <set>-elements will override earlier ones. M +5 -2 doc/rkwardplugins/index.docbook M +7 -6 rkward/plugin/rkstandardcomponent.cpp http://commits.kde.org/rkward/625600cf34118352ba978624cee775ed04c03c1d diff --git a/doc/rkwardplugins/index.docbook b/doc/rkwardplugins/index.docbook index 371280e..4da8d3d 100644 --- a/doc/rkwardplugins/index.docbook +++ b/doc/rkwardplugins/index.docbook @@ -50,6 +50,7 @@ as Authors, publish date, the abstract, and Keywords --> <year>2012</year> <year>2013</year> <year>2014</year> +<year>2015</year> <holder>Thomas Friedrichsmeier</holder> </copyright> <!-- Translators: put here the copyright notice of the translation --> @@ -57,7 +58,7 @@ as Authors, publish date, the abstract, and Keywords --> and in the FDL itself on how to use it. --> <legalnotice>&FDLNotice;</legalnotice> -<date>2014-12-18</date> +<date>2015-01-22</date> <releaseinfo>0.6.300</releaseinfo> <abstract> @@ -3324,7 +3325,9 @@ Child-elements: <varlistentry> <term><set></term> -<listitem><para>Set a property to a fixed value (of course, if you additionally connect the property to some other property, the value does not remain fixed). For instance, if you embed a plugin, but want to hide some of its elements, you might set the visibility property of those elements to false. Useful esp. for embedded/embedding plugins. Attributes: +<listitem><para>Set a property to a fixed value (of course, if you additionally connect the property to some other property, the value does not remain fixed). For instance, if you embed a plugin, but want to hide some of its elements, you might set the visibility property of those elements to false. Useful esp. for embedded/embedding plugins. Note: If there are several <set> elements +for a single <parameter>id</parameter>, the latest one to be defined takes precendence. This will sometimes be useful to rely on when using <include>d parts. +Attributes: <variablelist> <varlistentry> <term><parameter>id</parameter></term> diff --git a/rkward/plugin/rkstandardcomponent.cpp b/rkward/plugin/rkstandardcomponent.cpp index 0902499..5f48925 100644 --- a/rkward/plugin/rkstandardcomponent.cpp +++ b/rkward/plugin/rkstandardcomponent.cpp @@ -710,11 +710,6 @@ void RKComponentBuilder::parseLogic (const QDomElement &element, XMLHelper &xml, addConnection (xml.getStringAttribute (*it, "client", "#noid#", DL_WARNING), QString::null, xml.getStringAttribute (*it, "governor", "#noid#", DL_WARNING), QString::null, xml.getBoolAttribute (*it, "reconcile", false, DL_INFO), element); } - // find initialize elements - children = xml.getChildElements (element, "set", DL_INFO); - for (it = children.constBegin (); it != children.constEnd (); ++it) { - initial_values.insert (xml.getStringAttribute (*it, "id", "#noid#", DL_WARNING), xml.getStringAttribute (*it, "to", "false", DL_WARNING)); - } children = xml.getChildElements (element, "dependency_check", DL_INFO); for (it = children.constBegin (); it != children.constEnd (); ++it) { RKComponentPropertyBool *dep = new RKComponentPropertyBool (component (), false); @@ -736,7 +731,13 @@ void RKComponentBuilder::parseLogic (const QDomElement &element, XMLHelper &xml, if (!dummy.isNull ()) { initial_values.insert (id, dummy); } - // TODO add more options + } + + // find initialize elements + children = xml.getChildElements (element, "set", DL_INFO); + for (it = children.constBegin (); it != children.constEnd (); ++it) { + // NOTE: It is by design that if there are several initializations for a single id, the latest one takes precedence. Useful in some cases of inclusion. + initial_values.insert (xml.getStringAttribute (*it, "id", "#noid#", DL_WARNING), xml.getStringAttribute (*it, "to", "false", DL_WARNING)); } // find convert elements |
From: Thomas F. <tho...@ru...> - 2015-01-22 17:30:44
|
Git commit dd3d55da50cc25ad642da38bd6b5a3bdaeeb5ea4 by Thomas Friedrichsmeier. Committed on 22/01/2015 at 17:28. Pushed by tfry into branch 'work/distributions'. Complete re-design for distributions plugins (for now). Beta and binomial are the first two converted. M +4 -6 rkward/plugins/distributions.pluginmap A +9 -0 rkward/plugins/distributions/beta.js A +18 -0 rkward/plugins/distributions/beta.xml D +0 -14 rkward/plugins/distributions/beta_probabilities.js D +0 -15 rkward/plugins/distributions/beta_probabilities.xml D +0 -14 rkward/plugins/distributions/beta_quantiles.js D +0 -15 rkward/plugins/distributions/beta_quantiles.xml M +5 -16 rkward/plugins/distributions/binomial.js M +3 -2 rkward/plugins/distributions/binomial.xml M +62 -22 rkward/plugins/distributions/dist_common.js M +3 -2 rkward/plugins/distributions/dist_help_snippets.xml M +9 -5 rkward/plugins/distributions/dist_snippets.xml http://commits.kde.org/rkward/dd3d55da50cc25ad642da38bd6b5a3bdaeeb5ea4 diff --git a/rkward/plugins/distributions.pluginmap b/rkward/plugins/distributions.pluginmap index 98cdb1c..8864e70 100644 --- a/rkward/plugins/distributions.pluginmap +++ b/rkward/plugins/distributions.pluginmap @@ -27,11 +27,10 @@ <component type="standard" id="jb_test" file="tests/jb_test.xml" label="Jarque-Bera Normality Test" /> <!-- distributions --> - <component type="standard" id="beta_quantiles" file="beta_quantiles.xml" label="Beta quantiles" /> - <component type="standard" id="beta_probabilities" file="beta_probabilities.xml" label="Beta probabilities" /> + <component type="standard" id="beta_probabilities" file="beta.xml" label="Beta probabilities" /> <component type="standard" id="plot_beta_distribution" file="plot_beta_distribution.xml" label="Plot Beta distribution" /> - <component type="standard" id="binomial_calculator" file="binomial.xml" label="Binomial probabilities, quantiles, densities" /> + <component type="standard" id="binomial_probabilities" file="binomial.xml" label="Binomial probabilities, quantiles, densities" /> <component type="standard" id="plot_binomial_distribution" file="plot_binomial_distribution.xml" label="Plot binomial distribution" /> <component type="standard" id="cauchy_quantiles" file="cauchy_quantiles.xml" label="Cauchy quantiles" /> @@ -140,8 +139,7 @@ </menu> <menu id="univariate_continuous_distributions" label="Univariate continuous distributions"> <menu id="beta_distribution" label="Beta"> - <entry component="beta_quantiles" label="Beta quantiles"/> - <entry component="beta_probabilities" label="Beta probabilities"/> + <entry component="beta_probabilities" label="Beta probabilities, quantiles, densities"/> <entry component="plot_beta_clt" label="Beta CLT"/> <entry component="plot_beta_distribution" label="Plot Beta distribution"/> </menu> @@ -223,7 +221,7 @@ <menu id="univariate_discrete_distributions" label="Univariate discrete distributions"> <menu id="binomial_distribution" label="Binomial"> - <entry component="binomial_calculator" label="Binomial probabilities, quantiles, densities"/> + <entry component="binomial_probabilities" label="Binomial probabilities, quantiles, densities"/> <entry component="plot_binomial_clt" label="Binomial CLT"/> <entry component="plot_binomial_distribution" label="Plot binomial distribution"/> </menu> diff --git a/rkward/plugins/distributions/beta.js b/rkward/plugins/distributions/beta.js new file mode 100755 index 0000000..1c6e0b8 --- /dev/null +++ b/rkward/plugins/distributions/beta.js @@ -0,0 +1,9 @@ +include ("dist_common.js"); + +function getDistSpecifics () { + var dist = new Object; + dist["params"] = ', shape1=' + getValue ("shape1") + ', shape2=' + getValue ("shape2") + ', ncp=' + getValue ("ncp"); + dist["funstem"] = 'beta'; + dist["header"] = new Header (i18n ('Beta distribution')).addFromUI ("shape1").addFromUI ("shape2").addFromUI ("ncp"); + return dist; +} diff --git a/rkward/plugins/distributions/beta.xml b/rkward/plugins/distributions/beta.xml new file mode 100755 index 0000000..8b1d067 --- /dev/null +++ b/rkward/plugins/distributions/beta.xml @@ -0,0 +1,18 @@ +<!DOCTYPE rkplugin> +<document> + <code file="beta.js" /> + <logic> + <insert snippet="dialog_logic"/> + </logic> + <snippets> + <snippet id="dist_options"> + <spinbox default_precision="1" type="real" initial="1" id="shape1" min="0" label="Shape 1"/> + <spinbox default_precision="1" type="real" initial="1" id="shape2" min="0" label="Shape 2"/> + <spinbox default_precision="1" type="real" min="0" initial="0" id="ncp" label="non-centrality parameter (ncp)"/> + </snippet> + <include file="dist_snippets.xml"/> + </snippets> + <dialog label="Beta probabilities, quantiles, densities" > + <insert snippet="dialog_layout"/> + </dialog> +</document> diff --git a/rkward/plugins/distributions/beta_probabilities.js b/rkward/plugins/distributions/beta_probabilities.js deleted file mode 100755 index ba11341..0000000 --- a/rkward/plugins/distributions/beta_probabilities.js +++ /dev/null @@ -1,14 +0,0 @@ -// globals -var q; - -function calculate () { - q = "c (" + getList ("q.0").join (", ") + ")"; - - echo ('result <- (pbeta (q = ' + q + ', shape1 = ' + getValue ("shape1") + ', shape2 = ' + getValue ("shape2") + ', ncp = ' + getValue ("ncp") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n'); -} - -function printout () { - echo ('rk.header ("Beta probability", list ("Vector of quantiles", "' + q + '", "Shape 1", "' + getValue ("shape1") + '", "Shape 2", "' + getValue ("shape2") + '", "non-centrality parameter (ncp)", "' + getValue ("ncp") + '", "Tail", "' + getValue ("tail") + '", "Probabilities p are given as", "' + getValue ("logp") + '"));\n'); - echo ('rk.results (result, titles="Beta probability")\n'); -} - diff --git a/rkward/plugins/distributions/beta_probabilities.xml b/rkward/plugins/distributions/beta_probabilities.xml deleted file mode 100755 index 7c2fb8c..0000000 --- a/rkward/plugins/distributions/beta_probabilities.xml +++ /dev/null @@ -1,15 +0,0 @@ -<!DOCTYPE rkplugin> -<document> - <code file="beta_probabilities.js" /> - <snippets> - <snippet id="dist_options"> - <spinbox default_precision="2" type="real" initial="1" id="shape1" min="0" label="Shape 1"/> - <spinbox default_precision="2" type="real" initial="1" id="shape2" min="0" label="Shape 2"/> - <spinbox default_precision="2" type="real" min="0" initial="0" id="ncp" label="non-centrality parameter (ncp)"/> - </snippet> - <include file="dist_snippets.xml"/> - </snippets> - <dialog label="Beta probability" > - <insert snippet="probabilities_layout"/> - </dialog> -</document> diff --git a/rkward/plugins/distributions/beta_quantiles.js b/rkward/plugins/distributions/beta_quantiles.js deleted file mode 100755 index 0d8c112..0000000 --- a/rkward/plugins/distributions/beta_quantiles.js +++ /dev/null @@ -1,14 +0,0 @@ -// globals -var p; - -function calculate () { - p = "c (" + getList ("p.0").join (", ") + ")"; - - echo ('result <- (qbeta (p = ' + p + ', shape1 = ' + getValue ("shape1") + ', shape2 = ' + getValue ("shape2") + ', ncp = ' + getValue ("ncp") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n'); -} - -function printout () { - echo ('rk.header ("Beta quantiles", list ("Vector of probabilities", "' + p + '", "Shape 1", "' + getValue ("shape1") + '", "Shape 2", "' + getValue ("shape2") + '", "non-centrality parameter (ncp)", "' + getValue ("ncp") + '", "Tail", "' + getValue ("tail") + '", "Probabilities p are given as", "' + getValue ("logp") + '"));\n'); - echo ('rk.results (result, titles="Beta quantiles")\n'); -} - diff --git a/rkward/plugins/distributions/beta_quantiles.xml b/rkward/plugins/distributions/beta_quantiles.xml deleted file mode 100755 index 1220afc..0000000 --- a/rkward/plugins/distributions/beta_quantiles.xml +++ /dev/null @@ -1,15 +0,0 @@ -<!DOCTYPE rkplugin> -<document> - <code file="beta_quantiles.js" /> - <snippets> - <snippet id="dist_options"> - <spinbox default_precision="2" type="real" initial="1" id="shape1" min="0" label="Shape 1"/> - <spinbox default_precision="2" type="real" initial="1" id="shape2" min="0" label="Shape 2"/> - <spinbox default_precision="2" type="real" min="0" initial="0" id="ncp" label="non-centrality parameter (ncp)"/> - </snippet> - <include file="dist_snippets.xml"/> - </snippets> - <dialog label="Beta quantiles" > - <insert snippet="quantiles_layout"/> - </dialog> -</document> diff --git a/rkward/plugins/distributions/binomial.js b/rkward/plugins/distributions/binomial.js index e210483..7534c58 100644 --- a/rkward/plugins/distributions/binomial.js +++ b/rkward/plugins/distributions/binomial.js @@ -2,21 +2,10 @@ include ("dist_common.js"); function getDistSpecifics () { var dist = new Object; - dist["params"] = "bla"; - dist["funstem"] = "binom"; - dist["header"] = new Header (i18n ("Binomial tail probability")); + var size = getString ("size"); + dist["params"] = ', size=' + size + ", prob=" + getString ("prob"); + dist["funstem"] = 'binom'; + dist["max_quantile"] = size; + dist["header"] = new Header (i18n ('Binomial distribution')).addFromUI ("size").addFromUI ("prob"); return dist; } - -/*function calculate () { - q = "c (" + getString ("q").replace (/[, ]+/g, ", ") + ")"; - - echo ('result <- (pbinom (q = ' + q + ', size = ' + getValue ("size") + ', prob = ' + getValue ("prob") + ', ' + getValue ("tail") + ', ' + getValue ("logp") + '))\n'); -} - -function printout () { - echo ('rk.header (, list ("Vector of quantiles", "' + q + '", "Binomial trials", "' + getValue ("size") + '", "Probability of success", "' + getValue ("prob") + '", "Tail", "' + getValue ("tail") + '", "Probabilities p are given as", "' + getValue ("logp") + '"));\n'); - echo ('rk.results (result, titles="Binomial tail probabilities")\n'); -} - -*/ \ No newline at end of file diff --git a/rkward/plugins/distributions/binomial.xml b/rkward/plugins/distributions/binomial.xml index b964ee1..b6198b0 100644 --- a/rkward/plugins/distributions/binomial.xml +++ b/rkward/plugins/distributions/binomial.xml @@ -4,13 +4,14 @@ <help file="binomial.rkh" /> <logic> <insert snippet="dialog_logic"/> + <set id="ui_note.visible" to="true"/> + <set id="ui_note.text" to="Note: For the binomial distribution, quantiles can be interpreted as number of successes in the given number of trials."/> </logic> <snippets> <snippet id="dist_options"> - <spinbox default_precision="2" type="integer" initial="1" id="size" min="1" label="Binomial trials"/> + <spinbox type="integer" initial="10" id="size" min="1" label="Binomial trials"/> <spinbox default_precision="2" type="real" initial="0.5" id="prob" min="0" max="1" label="Probability of success"/> </snippet> - <snippet id="ui_note"><text>Note: For the binomial distribution, quantiles can be interpreted as number of successes in the given number of trials.</text></snippet> <include file="dist_snippets.xml"/> </snippets> <dialog label="Binomial probabilities, quantiles, densities" > diff --git a/rkward/plugins/distributions/dist_common.js b/rkward/plugins/distributions/dist_common.js index d92eb35..7eaadef 100644 --- a/rkward/plugins/distributions/dist_common.js +++ b/rkward/plugins/distributions/dist_common.js @@ -1,38 +1,78 @@ var mode; -var values; -var logp; -var lowert; +var logpd; var dist; +var invar; +var outvar; function calculate () { mode = getString ("mode"); + dist = getDistSpecifics (); + invar = 'q'; + if (mode == 'q') invar = 'p' + outvar = mode; + + var params; + if (mode == "d") { + logpd = getBoolean ("logd.state"); + params = logpd ? ', log=TRUE' : ''; + // NOTE: param lower.tail is not applicable for density function + } else { + logpd = getBoolean ("logp.state"); + params = logpd ? ', log.p=TRUE' : ''; + if (!getBoolean ("lower.state")) { + params += ', lower.tail=FALSE'; + } + } + + var values; if (mode == "q") values = getList ("p.0"); else values = getList ("q.0"); - if (values.length > 1) values = 'c (' + values.join (', ') + ')'; + if (values.length < 1) { + var max_auto_sequence_length = 20; - logp = getBoolean ("logp.state"); - var logparam = logp ? ', logp=TRUE' : ''; - lowert = getBoolean ("lower.state"); - var tailparam = lowert ? '' : ', lower.tail=FALSE'; + if (invar == 'q') { + var maxquant = dist["max_quantile"]; + if (typeof (maxquant) != 'undefined') { + if (maxquant <= max_auto_sequence_length) { + values = '0:' + String (maxquant); + } else { + values = 'seq.int (0, ' + String (maxquant) + ', by=' + String (Math.ceil (maxquant / max_auto_sequence_length)) + ')'; + } + } else { + values = 'seq (0, 1, length.out=' + String (max_auto_sequence_length+1) + ')'; + } + } else { // invar == 'p' + if (logpd) { + values = '-' + String (max_auto_sequence_length) + ':0'; + } else { + values = 'seq (0, 1, length.out=' + String (max_auto_sequence_length+1) + ')'; + } + } + } else { + if (values.length > 1) values = 'c (' + values.join (', ') + ')'; + } - dist = getDistSpecifics (); + echo (invar + ' <- ' + values + '\n'); + echo (outvar + ' <- ' + mode + dist["funstem"] + ' (' + invar + dist["params"] + params + ')\n'); +} - var plabel = logp ? i18n ('Log Probability') : i18n ('Probability'); - var qlabel = i18n ('Quantile'); - var dlabel = i18n ('Density'); - - echo ('result <- data.frame ('); - echo (mode == "q" ? plabel : qlabel); - echo ('=' + values + ', '); - if (mode == "d") echo (dlabel + '=d' + dist["funstem"] + ' (' + values + dist["params"] + logparam + ')'); // NOTE: param lower.tail is not applicable for density function - else if (mode == "p") echo (plabel + '=p' + dist["funstem"] + ' (' + values + dist["params"] + tailparam + logparam + ')'); - else if (mode == "q") echo (qlabel + '=q' + dist["funstem"] + ' (' + values + dist["params"] + tailparam + logparam + ')'); - echo (')\n'); +function getLabel (quantity) { + if (quantity == "q") return i18n ('Quantile'); + if (quantity == "d") { + if (logpd) return i18nc ('logarithm of density', 'log (Density)'); + return i18n ('Density'); + } + // quantity == "p" + if (logpd) return i18nc ('logarithm of probability', 'log (Probability)'); + return i18n ('Probability'); } function printout () { header = dist["header"]; - header.add (i18nc ("Tail of distribution function: lower / upper", 'Tail'), lowert ? i18n ('Lower tail: P[X ≤ x]') : i18n ('Upper tail: P[X > x]')); + if (mode != "d") { + header.add (i18nc ("Tail of distribution function: lower / upper", 'Tail'), getBoolean ("lower.state") ? i18n ('Lower tail: P[X ≤ x]') : i18n ('Upper tail: P[X > x]')); + } header.print (); - echo ('rk.print (result)\n'); + + echo ('rk.results (data.frame (' + getLabel (invar) + '=' + invar + ', ' + getLabel (outvar) + '=' + outvar + ', check.names=FALSE))\n'); } diff --git a/rkward/plugins/distributions/dist_help_snippets.xml b/rkward/plugins/distributions/dist_help_snippets.xml index a32c2e3..43f4ef1 100644 --- a/rkward/plugins/distributions/dist_help_snippets.xml +++ b/rkward/plugins/distributions/dist_help_snippets.xml @@ -2,9 +2,10 @@ <snippet id="dialog_settings"> <caption title="Generic settings"/> <setting id="mode">Specify the quantitiy to be calculated (probabilites, densities, or quantiles), and the quantity given (probabilities or quantiles)</setting> - <setting id="q">When calculating densities or probabilites, specify one or more quantiles.</setting> - <setting id="p">When calculating quantiles, specify one or more probabilities (optionally logarithmic; see below).</setting> + <setting id="q">When calculating densities or probabilites, specify one or more quantiles. If this setting is left empty, a sequence of evenly spaced quantiles will be used, instead.</setting> + <setting id="p">When calculating quantiles, specify one or more probabilities, optionally logarithmic (see below). If this setting is left empty, a sequence sequence of evenly spaced (log) probabilities will be used, instead.</setting> <setting id="logp">When calculating probabilities, return these as log (p). When specifying probabilites, these are supplied as log (p).</setting> + <setting id="logd">When calculating densities, return these as log (d).</setting> <setting id="lower">If checked (the default) probabilities are P[X ≤ x]. Otherwise (upper tail) probabilities are P[X > x]</setting> <caption title="Distribution specific settings"/> </snippet> diff --git a/rkward/plugins/distributions/dist_snippets.xml b/rkward/plugins/distributions/dist_snippets.xml index c325d17..63855a9 100644 --- a/rkward/plugins/distributions/dist_snippets.xml +++ b/rkward/plugins/distributions/dist_snippets.xml @@ -5,9 +5,12 @@ <convert id="do_q" mode="equals" sources="mode.string" standard="q"/> <connect client="lower.enabled" governor="do_d.not"/> - <connect client="logp.enabled" governor="do_d.not"/> + <connect client="logp.visible" governor="do_d.not"/> + <connect client="logd.visible" governor="do_d"/> <connect client="q.visible" governor="do_q.not"/> <connect client="p.visible" governor="do_q"/> + + <set id="ui_note.visible" to="false"/> </snippet> <snippet id="dialog_layout"> <dropdown id="mode" label="Mode"> @@ -18,9 +21,10 @@ <row> <frame> <column> - <matrix columns="1" allow_user_resize_columns="false" min_rows="1" required="true" mode="real" fixed_width="true" min="0" id="q" label="Vector of quantiles"/> - <matrix columns="1" allow_user_resize_columns="false" min_rows="1" required="true" mode="real" fixed_width="true" id="p" label="Vector of probabilities"/> - <checkbox id="logp" label="log probabilities" /> + <matrix columns="1" allow_user_resize_columns="false" required="true" mode="real" fixed_width="true" min="0" id="q" label="Specify Quantiles (optional)"/> + <matrix columns="1" allow_user_resize_columns="false" required="true" mode="real" fixed_width="true" id="p" label="Specify Probabilities (optional)"/> + <checkbox id="logp" label="Logarithmic probabilities" /> + <checkbox id="logd" label="Logarithmic densities" /> <checkbox id="lower" label="Lower tail" checked="true" /> <stretch/> </column> @@ -32,6 +36,6 @@ </column> </frame> </row> - <insert snippet="ui_note"/> + <text id="ui_note"/> </snippet> </document> |
From: Thomas F. <tho...@ru...> - 2015-01-22 17:30:41
|
Git commit 33f872ad5b5976d85e620107e8dd8e4b2b05906d by Thomas Friedrichsmeier. Committed on 22/01/2015 at 17:25. Pushed by tfry into branch 'work/distributions'. Add some padding inside results tables. M +5 -0 rkward/pages/rkward_output.css http://commits.kde.org/rkward/33f872ad5b5976d85e620107e8dd8e4b2b05906d diff --git a/rkward/pages/rkward_output.css b/rkward/pages/rkward_output.css index fbc0a58..086caca 100644 --- a/rkward/pages/rkward_output.css +++ b/rkward/pages/rkward_output.css @@ -24,6 +24,11 @@ table { border-spacing: 0px; } +td { + padding-left: .5em; + padding-right: .5em; +} + /* TOC menu */ .RKTOC { background-color: #eeeeff; |
From: Thomas F. <tho...@ru...> - 2015-01-22 09:51:53
|
Git commit a8138c27ee77fd869bc1ba65c20d5483a5dee40b by Thomas Friedrichsmeier. Committed on 22/01/2015 at 09:48. Pushed by tfry into branch 'work/distributions'. When printing data.frame through rk.results, make sure to format by column, not by cell. Fixes rounding to different number of digits within a column. M +2 -1 rkward/rbackend/rpackages/rkward/R/rk.print-functions.R http://commits.kde.org/rkward/a8138c27ee77fd869bc1ba65c20d5483a5dee40b diff --git a/rkward/rbackend/rpackages/rkward/R/rk.print-functions.R b/rkward/rbackend/rpackages/rkward/R/rk.print-functions.R index 88924c4..1506719 100644 --- a/rkward/rbackend/rpackages/rkward/R/rk.print-functions.R +++ b/rkward/rbackend/rpackages/rkward/R/rk.print-functions.R @@ -193,10 +193,11 @@ cat ("</tr>\n") if (is.data.frame (x)) { + x <- as.data.frame (lapply (x, format), stringsAsFactors=FALSE) for (row in 1:dim (x)[1]) { cat ("<tr>") for (col in 1:dim (x)[2]) { - cat ("<td>", format (x[row, col]), "</td>", sep="") + cat ("<td>", x[row, col], "</td>", sep="") } cat ("</tr>\n") } |