[rkward-cvs] [rkward/work/distributions] rkward/plugins/distributions: Some bits.
Thomas Friedrichsmeier
thomas.friedrichsmeier at ruhr-uni-bochum.de
Mon Jan 19 19:56:18 UTC 2015
Git commit 09a236c90e377c6a992c10f36a7c9145ffc619ec by Thomas Friedrichsmeier.
Committed on 08/01/2015 at 21:12.
Pushed by tfry into branch 'work/distributions'.
Some bits.
M +1 -1 rkward/plugins/distributions/beta_probabilities.js
M +1 -1 rkward/plugins/distributions/beta_quantiles.js
M +1 -1 rkward/plugins/distributions/binomial_quantiles.js
M +6 -9 rkward/plugins/distributions/dist_snippets.xml
http://commits.kde.org/rkward/09a236c90e377c6a992c10f36a7c9145ffc619ec
diff --git a/rkward/plugins/distributions/beta_probabilities.js b/rkward/plugins/distributions/beta_probabilities.js
index 354410b..ba11341 100755
--- a/rkward/plugins/distributions/beta_probabilities.js
+++ b/rkward/plugins/distributions/beta_probabilities.js
@@ -2,7 +2,7 @@
var q;
function calculate () {
- q = "c (" + getString ("q").replace (/[, ]+/g, ", ") + ")";
+ 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');
}
diff --git a/rkward/plugins/distributions/beta_quantiles.js b/rkward/plugins/distributions/beta_quantiles.js
index c980fcb..0d8c112 100755
--- a/rkward/plugins/distributions/beta_quantiles.js
+++ b/rkward/plugins/distributions/beta_quantiles.js
@@ -2,7 +2,7 @@
var p;
function calculate () {
- p = "c (" + getString ("p").replace (/[, ]+/g, ", ") + ")";
+ 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');
}
diff --git a/rkward/plugins/distributions/binomial_quantiles.js b/rkward/plugins/distributions/binomial_quantiles.js
index 7ce4fc9..7878b0e 100644
--- a/rkward/plugins/distributions/binomial_quantiles.js
+++ b/rkward/plugins/distributions/binomial_quantiles.js
@@ -2,7 +2,7 @@
var p;
function calculate () {
- p = "c (" + getString ("p").replace (/[, ]+/g, ", ") + ")";
+ p = "c (" + getList ("p.0").join (", ") + ")";
echo ('result <- (qbinom (p = ' + p + ', size = ' + getValue ("size") + ', prob = ' + getValue ("prob") + ', ' + getValue ("tail") + ', ' + getValue ("logp") + '))\n');
}
diff --git a/rkward/plugins/distributions/dist_snippets.xml b/rkward/plugins/distributions/dist_snippets.xml
index a4125c6..8c8c8ed 100644
--- a/rkward/plugins/distributions/dist_snippets.xml
+++ b/rkward/plugins/distributions/dist_snippets.xml
@@ -22,18 +22,15 @@
<snippet id="quantiles_layout">
<row>
<column>
- <input required="true" initial="0.95" id="p" label="Vector of probabilities"/>
- <insert snippet="dist_options"/>
- </column>
- <column>
- <radio id="tail" label="Choose type of probability" >
+ <matrix id="p" columns="1" min_rows="1" fixed_width="true" allow_user_resize_columns="false" mode="real" label="Vector of probabilities" horiz_headers=""/>
+ <radio id="tail" label="Type of probability" >
<option value="lower.tail=TRUE" label="lower tail" />
<option value="lower.tail=FALSE" label="upper tail" />
</radio>
- <radio id="logp" label="probabilities p are given as:" >
- <option value="log.p = FALSE" label="not log(p)" />
- <option value="log.p = TRUE" label="log(p)" />
- </radio>
+ <checkbox id="logp" label="probabilities p are given as log(p)" value="log.p = TRUE" value_unchecked="log.p = FALSE"/>
+ </column>
+ <column>
+ <insert snippet="dist_options"/>
<stretch/>
</column>
</row>
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
rkward-cvs mailing list
rkward-cvs at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rkward-cvs
More information about the rkward-tracker
mailing list