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-11 20:12:07
|
Git commit 102476808454ecb22d39beeaab14cd82095d5650 by Thomas Friedrichsmeier. Committed on 11/01/2015 at 20:10. Pushed by tfry into branch 'master'. Add helper script for importing plugins from our external_plugins repo (with history) A +50 -0 scripts/import_external_plugin.sh http://commits.kde.org/rkward/102476808454ecb22d39beeaab14cd82095d5650 diff --git a/scripts/import_external_plugin.sh b/scripts/import_external_plugin.sh new file mode 100755 index 0000000..e33166e --- /dev/null +++ b/scripts/import_external_plugin.sh @@ -0,0 +1,50 @@ +#!/bin/bash +# +# Import a plugin from our external plugins repository, keeping all commit history. +# Actually, imports single specified file or path from that repo. Just pick the +# generator script, and you should be fine (no need to preserve history on generated files). +# +# Note: +# Based on http://gbayer.com/development/moving-files-from-one-git-repository-to-another-preserving-history/ +# with some additional tweaking +# +# Usage: +# import_external_plugin.sh source_path target_dir +# Example: +# import_external_plugin.sh rk.power/inst/rkward/rkwarddev_power_plugin_script.R rkward/plugins/rkwarddev_scripts + +EXTERNAL_REPO=https://github.com/rkward-community/external-plugins.git +SOURCE_PATH=$1 +TARGET_PATH=$2 + +cd `dirname $0`/.. +BASEDIR=`pwd` +cd ${BASEDIR} +WORKDIR=${BASEDIR}/import_tmp + +# clone and filter external repo +git clone ${EXTERNAL_REPO} import_tmp +cd ${WORKDIR} +git remote rm origin # safety measure +# first split out the target into a single dir. For simplicity, we use ${TARGET_PATH}, here +git filter-branch --prune-empty --tree-filter " +if [ -e ${SOURCE_PATH} ]; then + mkdir -p ${TARGET_PATH} + mv ${SOURCE_PATH} ${TARGET_PATH} +fi" +# next filter that single dir +git filter-branch -f --subdirectory-filter ${TARGET_PATH} -- --all +mkdir -p ${TARGET_PATH} +mv * ${TARGET_PATH} +git add . +git commit -m "Import ${SOURCE_PATH} from external_plugins repository" + +# merge into main repo +cd ${BASEDIR} +git remote add external_repo_import ${WORKDIR} +git pull --no-rebase external_repo_import master +git remote rm external_repo_import + +# Done +rm -rf ${WORKDIR} +git status |
From: Yuri C. <yu...@uk...> - 2015-01-11 07:05:29
|
Git commit fec2dd70121749eb01b766ac76d285bac92879a4 by Yuri Chornoivan. Committed on 11/01/2015 at 07:04. Pushed by yurchor into branch 'master'. Fix typos M +1 -1 rkward/plugins/analysis/irt/dichotomous/par_est_lltm.rkh M +1 -1 rkward/plugins/analysis/irt/polytomous/par_est_gpcm.xml M +1 -1 rkward/plugins/analysis/irt/polytomous/par_est_lpcm.rkh M +1 -1 rkward/plugins/analysis/irt/polytomous/par_est_lrsm.rkh M +1 -1 rkward/plugins/x11device/export.rkh M +1 -1 rkward/plugins/x11device/export.xml http://commits.kde.org/rkward/fec2dd70121749eb01b766ac76d285bac92879a4 diff --git a/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.rkh b/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.rkh index b266902..bf59ec4 100644 --- a/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.rkh +++ b/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.rkh @@ -19,7 +19,7 @@ If repeated measurement applies, specify how many are represented in the data matrix (defaults to 1). This will divide the columns in the matrix into equally sized subsets of data. </setting> <setting id="groups"> - If you want to compute group contrasts, a vector determing the group membership of each subject must be given. By default no group contrasts are imposed. + If you want to compute group contrasts, a vector determining the group membership of each subject must be given. By default no group contrasts are imposed. </setting> <caption id="tab_options"/> diff --git a/rkward/plugins/analysis/irt/polytomous/par_est_gpcm.xml b/rkward/plugins/analysis/irt/polytomous/par_est_gpcm.xml index b457a31..8deb76c 100644 --- a/rkward/plugins/analysis/irt/polytomous/par_est_gpcm.xml +++ b/rkward/plugins/analysis/irt/polytomous/par_est_gpcm.xml @@ -34,7 +34,7 @@ <row id="options_row"> <varselector id="vars2" /> <column id="opt_var_col"> - <radio label="Should parameters be fixed (constrainted)?" id="constraint"> + <radio label="Should parameters be fixed (constrained)?" id="constraint"> <option label="Each item has its one discrimination parameter" value="gpcm" checked="true" /> <option label="Equal discrimination parameter across items" value="1PL" /> <option label="Discrimination parameter fixed at 1 across items" value="rasch" /> diff --git a/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.rkh b/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.rkh index 4f5bad9..b49d5f4 100644 --- a/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.rkh +++ b/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.rkh @@ -19,7 +19,7 @@ If repeated measurement applies, specify how many are represented in the data matrix (defaults to 1). This will divide the columns in the matrix into equally sized subsets of data. </setting> <setting id="groups"> - If you want to compute group contrasts, a vector determing the group membership of each subject must be given. By default no group contrasts are imposed. + If you want to compute group contrasts, a vector determining the group membership of each subject must be given. By default no group contrasts are imposed. </setting> <caption id="tab_options"/> diff --git a/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.rkh b/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.rkh index 979b83e..7ac48f8 100644 --- a/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.rkh +++ b/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.rkh @@ -19,7 +19,7 @@ If repeated measurement applies, specify how many are represented in the data matrix (defaults to 1). This will divide the columns in the matrix into equally sized subsets of data. </setting> <setting id="groups"> - If you want to compute group contrasts, a vector determing the group membership of each subject must be given. By default no group contrasts are imposed. + If you want to compute group contrasts, a vector determining the group membership of each subject must be given. By default no group contrasts are imposed. </setting> <caption id="tab_options"/> diff --git a/rkward/plugins/x11device/export.rkh b/rkward/plugins/x11device/export.rkh index db67e33..a6e3416 100644 --- a/rkward/plugins/x11device/export.rkh +++ b/rkward/plugins/x11device/export.rkh @@ -4,7 +4,7 @@ Export the current contents of a graphics device to a postscript/pdf/png/jpeg file either using the native functions or using ghostscript. </summary> <usage> - Choose an exporting function and a filename to save to. Additional options for size and resolution etc. are also available (see below). Exporting is done using <b>dev.print</b>. For exporting using ghostscript, <b>dev2bitmap</b> is used, which needs Ghostscript. Most of the exporting parameters are directly sent to the exporting function (<b>postscript</b>, <b>pdf</b>, <b>svg</b>, <b>png</b>, or <b>jpeg</b>) by dev.print. Note that there are no 'color' options (like background or foreground color) in this plugin. This is because dev.print simply prints the current graphics (mostly on X11) to the spedified file in the chosen format. To set background (or foreground) colors, these will need to be provided when calling the plotting function, mostly using <b>par</b>(). Note that all the parameters to postscript are also valid parameters to dev2bitmap. + Choose an exporting function and a filename to save to. Additional options for size and resolution etc. are also available (see below). Exporting is done using <b>dev.print</b>. For exporting using ghostscript, <b>dev2bitmap</b> is used, which needs Ghostscript. Most of the exporting parameters are directly sent to the exporting function (<b>postscript</b>, <b>pdf</b>, <b>svg</b>, <b>png</b>, or <b>jpeg</b>) by dev.print. Note that there are no 'color' options (like background or foreground color) in this plugin. This is because dev.print simply prints the current graphics (mostly on X11) to the specified file in the chosen format. To set background (or foreground) colors, these will need to be provided when calling the plotting function, mostly using <b>par</b>(). Note that all the parameters to postscript are also valid parameters to dev2bitmap. This plugin is only available in the context of a graphics device. </usage> diff --git a/rkward/plugins/x11device/export.xml b/rkward/plugins/x11device/export.xml index eddc129..761fe4d 100644 --- a/rkward/plugins/x11device/export.xml +++ b/rkward/plugins/x11device/export.xml @@ -172,7 +172,7 @@ </column> </row> </frame> - <frame id="frame_gsoptions" label="Ghostscript specific options"> + <frame id="frame_gsoptions" label="Ghostscript specific options"> <row> <dropdown id="gsformat" label="GS Output device" > <option value="pdfwrite" label="PDF" /> |
From: Thomas F. <tho...@ru...> - 2015-01-10 21:06:59
|
Git commit b1b76b243a42e4cde9667e44446a746efe75e883 by Thomas Friedrichsmeier. Committed on 10/01/2015 at 21:02. Pushed by tfry into branch 'master'. Finish adding i18n() calls to IRT plugins, and extract messages for IRT plugins. M +2 -0 Messages.sh M +1 -1 rkward/plugins/analysis/irt/polytomous/par_est_gpcm.rkh M +1 -1 rkward/plugins/irt.pluginmap M +7 -7 rkward/plugins/plots/irt/dichotomous/plot_ltm.js M +7 -7 rkward/plugins/plots/irt/dichotomous/plot_rasch.js M +7 -7 rkward/plugins/plots/irt/dichotomous/plot_tpm.js M +7 -7 rkward/plugins/plots/irt/polytomous/plot_grm.js M +1 -1 rkward/plugins/plots/irt/polytomous/plot_pcm.js M +1 -1 rkward/plugins/plots/irt/polytomous/plot_rsm.js M +1 -1 rkward/plugins/plots/irt/tests/eRm_plotLR.js M +1 -1 tests/item_response_theory/Andersen_LR_plot.rkcommands.R M +1 -1 tests/item_response_theory/plot_2PL.rkcommands.R M +1 -1 tests/item_response_theory/plot_3PL.rkcommands.R M +1 -1 tests/item_response_theory/plot_GRM.rkcommands.R M +1 -1 tests/item_response_theory/plot_PCM.rkcommands.R M +1 -1 tests/item_response_theory/plot_RSM.rkcommands.R M +1 -1 tests/item_response_theory/plot_Rasch.rkcommands.R http://commits.kde.org/rkward/b1b76b243a42e4cde9667e44446a746efe75e883 diff --git a/Messages.sh b/Messages.sh index 5483cdf..0781fce 100755 --- a/Messages.sh +++ b/Messages.sh @@ -18,4 +18,6 @@ python scripts/update_plugin_messages.py --extract-only --outdir=$podir rkward/p python scripts/update_plugin_messages.py --extract-only --outdir=$podir rkward/plugins/data.pluginmap # extract messages from data plugins: >> rkward__plots.pot python scripts/update_plugin_messages.py --extract-only --outdir=$podir rkward/plugins/plots.pluginmap +# extract messages from data plugins: >> rkward__item_response_theory.pot +python scripts/update_plugin_messages.py --extract-only --outdir=$podir rkward/plugins/irt.pluginmap # messages of embedded plugins are extracted implicitly, as part of the above extraction calls: >> rkward__embedded.pot diff --git a/rkward/plugins/analysis/irt/polytomous/par_est_gpcm.rkh b/rkward/plugins/analysis/irt/polytomous/par_est_gpcm.rkh index 3e9a9ac..d6d25fe 100644 --- a/rkward/plugins/analysis/irt/polytomous/par_est_gpcm.rkh +++ b/rkward/plugins/analysis/irt/polytomous/par_est_gpcm.rkh @@ -20,7 +20,7 @@ </setting> <caption id="tab_options"/> - <setting id="frame_constraints"> + <setting id="constraint"> Choose if discrimination parameters should be computed for each item individually. Alternatively, you can estimate one discrimination parameter that is equal for all items, or fix it at 1 for all items. </setting> <setting id="startval"> diff --git a/rkward/plugins/irt.pluginmap b/rkward/plugins/irt.pluginmap index 3a7e575..8504649 100644 --- a/rkward/plugins/irt.pluginmap +++ b/rkward/plugins/irt.pluginmap @@ -1,6 +1,6 @@ <!DOCTYPE rkpluginmap> -<document base_prefix="" namespace="rkward" id="irt"> +<document base_prefix="" namespace="rkward" id="irt" po_id="item_response_theory"> <include file="pluginmap_meta.inc"/> <about name="Item Response Theory" diff --git a/rkward/plugins/plots/irt/dichotomous/plot_ltm.js b/rkward/plugins/plots/irt/dichotomous/plot_ltm.js index 697424e..2644a67 100644 --- a/rkward/plugins/plots/irt/dichotomous/plot_ltm.js +++ b/rkward/plugins/plots/irt/dichotomous/plot_ltm.js @@ -74,7 +74,7 @@ function doPrintout (full) { options[options.length] = "annot=FALSE" ; if (full) { - echo ('rk.header("Two parameter logistic model plot")\n'); + new Header (i18n ("Two parameter logistic model plot")).print (); echo ('\n'); echo ('rk.graph.on()\n'); } @@ -85,19 +85,19 @@ function doPrintout (full) { // first we'll check wheter standard error curves should be plotted, // because it takes two steps to draw them: if (plot_type == "SEC") { - echo ('# two steps are needed to plot standard error curves\n'); - echo (' # first some values are generated...\n'); + comment ('two steps are needed to plot standard error curves', '\t'); + comment ('first some values are generated...', '\t'); echo (' res <- plot(' + getValue("x")); if (options.length > 0) echo(", "+options.join(", ")); echo (')\n'); echo ('\n'); - echo (' # ... and then they\'re used to plot the curves:\n'); + comment ('... and then they\'re used to plot the curves:', '\t'); echo (' plot(res[,"z"], 1/sqrt(res[,"info"]), lwd=2'); // we give some defaults, but they can be changed via the embedded plot options: if (!plot_ops_type) echo(", type=\"l\""); - if (!plot_ops_xlab) echo(", xlab=\"Ability\""); - if (!plot_ops_ylab) echo(", ylab=\"Standard Error\""); - if (!plot_ops_main) echo(", main=\"Stadard Error of Measurement\""); + if (!plot_ops_xlab) echo(", xlab=" + i18nc ("Item response theory", "Ability")); + if (!plot_ops_ylab) echo(", ylab=" + i18n ("Standard Error")); + if (!plot_ops_main) echo(", main="+ i18n ("Standard Error of Measurement")); if (plot_options) echo(plot_options); echo (')\n'); } diff --git a/rkward/plugins/plots/irt/dichotomous/plot_rasch.js b/rkward/plugins/plots/irt/dichotomous/plot_rasch.js index 9b5cd38..eda4ef7 100644 --- a/rkward/plugins/plots/irt/dichotomous/plot_rasch.js +++ b/rkward/plugins/plots/irt/dichotomous/plot_rasch.js @@ -71,7 +71,7 @@ function doPrintout (full) { options[options.length] = "annot=FALSE" ; if (full) { - echo ('rk.header("Rasch model plot")\n'); + new Header (i18n ("Rasch model plot")).print (); echo ('\n'); echo ('rk.graph.on()\n'); } @@ -82,19 +82,19 @@ function doPrintout (full) { // first we'll check wheter standard error curves should be plotted, // because it takes two steps to draw them: if (plot_type == "SEC") { - echo (' # two steps are needed to plot standard error curves\n'); - echo (' # first some values are generated...\n'); + comment ('two steps are needed to plot standard error curves', '\t'); + comment ('first some values are generated...', '\t'); echo (' res <- plot(' + getValue("x")); if (options.length > 0) echo(", "+options.join(", ")); echo (')\n'); echo ('\n'); - echo (' # ... and then they\'re used to plot the curves:\n'); + comment ('... and then they\'re used to plot the curves:', '\t'); echo (' plot(res[,"z"], 1/sqrt(res[,"info"]), lwd=2'); // we give come defaults, but they can be changed via the embedded plot options: if (!plot_ops_type) echo(", type=\"l\""); - if (!plot_ops_xlab) echo(", xlab=\"Ability\""); - if (!plot_ops_ylab) echo(", ylab=\"Standard Error\""); - if (!plot_ops_main) echo(", main=\"Stadard Error of Measurement\""); + if (!plot_ops_xlab) echo(", xlab=" + i18nc ("Item response theory", "Ability")); + if (!plot_ops_ylab) echo(", ylab=" + i18n ("Standard Error")); + if (!plot_ops_main) echo(", main=" + i18n ("Standard Error of Measurement")); if (plot_options) echo(plot_options); echo (')\n'); } diff --git a/rkward/plugins/plots/irt/dichotomous/plot_tpm.js b/rkward/plugins/plots/irt/dichotomous/plot_tpm.js index 1cb3bd3..d243b46 100644 --- a/rkward/plugins/plots/irt/dichotomous/plot_tpm.js +++ b/rkward/plugins/plots/irt/dichotomous/plot_tpm.js @@ -71,7 +71,7 @@ function doPrintout (full) { options[options.length] = "annot=FALSE" ; if (full) { - echo ('rk.header("Birnbaum three parameter model plot")\n'); + new Header (i18n ("Birnbaum three parameter model plot")).print (); echo ('\n'); echo ('rk.graph.on()\n'); } @@ -82,19 +82,19 @@ function doPrintout (full) { // first we'll check wheter standard error curves should be plotted, // because it takes two steps to draw them: if (plot_type == "SEC") { - echo (' # two steps are needed to plot standard error curves\n'); - echo (' # first some values are generated...\n'); + comment ('two steps are needed to plot standard error curves', '\t'); + comment ('first some values are generated...', '\t'); echo (' res <- plot(' + getValue("x")); if (options.length > 0) echo(", "+options.join(", ")); echo (')\n'); echo ('\n'); - echo (' # ... and then they\'re used to plot the curves:\n'); + comment ('... and then they\'re used to plot the curves:', '\t'); echo (' plot(res[,"z"], 1/sqrt(res[,"info"]), lwd=2'); // we give some defaults, but they can be changed via the embedded plot options: if (!plot_ops_type) echo(", type=\"l\""); - if (!plot_ops_xlab) echo(", xlab=\"Ability\""); - if (!plot_ops_ylab) echo(", ylab=\"Standard Error\""); - if (!plot_ops_main) echo(", main=\"Stadard Error of Measurement\""); + if (!plot_ops_xlab) echo(", xlab=" + i18nc ("Item response theory", "Ability"));; + if (!plot_ops_ylab) echo(", ylab=" + i18n ("Standard Error")); + if (!plot_ops_main) echo(", main=" + i18n ("Standard Error of Measurement")); if (plot_options) echo(plot_options); echo (')\n'); } diff --git a/rkward/plugins/plots/irt/polytomous/plot_grm.js b/rkward/plugins/plots/irt/polytomous/plot_grm.js index 9b9849f..10facff 100644 --- a/rkward/plugins/plots/irt/polytomous/plot_grm.js +++ b/rkward/plugins/plots/irt/polytomous/plot_grm.js @@ -79,7 +79,7 @@ function doPrintout (full) { options[options.length] = "annot=FALSE" ; if (full) { - echo ('rk.header("Graded response model plot")\n'); + new Header (i18n ("Graded response model plot")).print (); echo ('\n'); echo ('rk.graph.on()\n'); } @@ -90,19 +90,19 @@ function doPrintout (full) { // first we'll check wheter standard error curves should be plotted, // because it takes two steps to draw them: if (plot_type == "SEC") { - echo (' # two steps are needed to plot standard error curves\n'); - echo (' # first some values are generated...\n'); + comment ('two steps are needed to plot standard error curves', '\t'); + comment ('first some values are generated...', '\t'); echo (' res <- plot(' + getValue("x")); if (options.length > 0) echo(", "+options.join(", ")); echo (')\n'); echo ('\n'); - echo (' # ... and then they\'re used to plot the curves:\n'); + comment ('... and then they\'re used to plot the curves:', '\t'); echo (' plot(res[,"z"], 1/sqrt(res[,"test.info"]), lwd=2'); // we give come defaults, but they can be changed via the embedded plot options: if (!plot_ops_type) echo(", type=\"l\""); - if (!plot_ops_xlab) echo(", xlab=\"Ability\""); - if (!plot_ops_ylab) echo(", ylab=\"Standard Error\""); - if (!plot_ops_main) echo(", main=\"Stadard Error of Measurement\""); + if (!plot_ops_xlab) echo(", xlab=" + i18nc ("Item response theory", "Ability"));; + if (!plot_ops_ylab) echo(", ylab=" + i18n ("Standard Error")); + if (!plot_ops_main) echo(", main=" + i18n ("Standard Error of Measurement")); if (plot_options) echo(plot_options); echo (')\n'); } diff --git a/rkward/plugins/plots/irt/polytomous/plot_pcm.js b/rkward/plugins/plots/irt/polytomous/plot_pcm.js index 544053b..220c602 100644 --- a/rkward/plugins/plots/irt/polytomous/plot_pcm.js +++ b/rkward/plugins/plots/irt/polytomous/plot_pcm.js @@ -65,7 +65,7 @@ function doPrintout (full) { options[options.length] = "legpos=FALSE" ; if (full) { - echo ('rk.header("Partial credit model plot")\n'); + new Header (i18n ("Partial credit model plot")).print (); echo ('\n'); echo ('rk.graph.on()\n'); } diff --git a/rkward/plugins/plots/irt/polytomous/plot_rsm.js b/rkward/plugins/plots/irt/polytomous/plot_rsm.js index 1898c5b..71d6409 100644 --- a/rkward/plugins/plots/irt/polytomous/plot_rsm.js +++ b/rkward/plugins/plots/irt/polytomous/plot_rsm.js @@ -65,7 +65,7 @@ function doPrintout (full) { options[options.length] = "legpos=FALSE" ; if (full) { - echo ('rk.header("Rating scale model plot")\n'); + new Header (i18n ("Rating scale model plot")).print (); echo ('\n'); echo ('rk.graph.on()\n'); } diff --git a/rkward/plugins/plots/irt/tests/eRm_plotLR.js b/rkward/plugins/plots/irt/tests/eRm_plotLR.js index d1c19a7..10ac92f 100644 --- a/rkward/plugins/plots/irt/tests/eRm_plotLR.js +++ b/rkward/plugins/plots/irt/tests/eRm_plotLR.js @@ -82,7 +82,7 @@ function doPrintout (full) { options_plotgof[options_plotgof.length] = "tlab=\""+annotation+"\"" ; if (full) { - echo ('rk.header("Andersen\'s LR test")\n'); + new Header (i18n ("Andersen's LR test")).print (); echo ('\n'); echo ('rk.graph.on()\n'); } diff --git a/tests/item_response_theory/Andersen_LR_plot.rkcommands.R b/tests/item_response_theory/Andersen_LR_plot.rkcommands.R index 027448d..a7eb179 100644 --- a/tests/item_response_theory/Andersen_LR_plot.rkcommands.R +++ b/tests/item_response_theory/Andersen_LR_plot.rkcommands.R @@ -2,7 +2,7 @@ local({ ## Prepare require(eRm) ## Print result -rk.header("Andersen's LR test") +rk.header ("Andersen's LR test") rk.graph.on() try({ diff --git a/tests/item_response_theory/plot_2PL.rkcommands.R b/tests/item_response_theory/plot_2PL.rkcommands.R index bbd89a9..47ba1ea 100644 --- a/tests/item_response_theory/plot_2PL.rkcommands.R +++ b/tests/item_response_theory/plot_2PL.rkcommands.R @@ -2,7 +2,7 @@ local({ ## Prepare require(ltm) ## Print result -rk.header("Two parameter logistic model plot") +rk.header ("Two parameter logistic model plot") rk.graph.on() try({ diff --git a/tests/item_response_theory/plot_3PL.rkcommands.R b/tests/item_response_theory/plot_3PL.rkcommands.R index c140644..e6fc25a 100644 --- a/tests/item_response_theory/plot_3PL.rkcommands.R +++ b/tests/item_response_theory/plot_3PL.rkcommands.R @@ -2,7 +2,7 @@ local({ ## Prepare require(ltm) ## Print result -rk.header("Birnbaum three parameter model plot") +rk.header ("Birnbaum three parameter model plot") rk.graph.on() try({ diff --git a/tests/item_response_theory/plot_GRM.rkcommands.R b/tests/item_response_theory/plot_GRM.rkcommands.R index f712c95..902c4d4 100644 --- a/tests/item_response_theory/plot_GRM.rkcommands.R +++ b/tests/item_response_theory/plot_GRM.rkcommands.R @@ -2,7 +2,7 @@ local({ ## Prepare require(ltm) ## Print result -rk.header("Graded response model plot") +rk.header ("Graded response model plot") rk.graph.on() try({ diff --git a/tests/item_response_theory/plot_PCM.rkcommands.R b/tests/item_response_theory/plot_PCM.rkcommands.R index 329504f..552991b 100644 --- a/tests/item_response_theory/plot_PCM.rkcommands.R +++ b/tests/item_response_theory/plot_PCM.rkcommands.R @@ -2,7 +2,7 @@ local({ ## Prepare require(eRm) ## Print result -rk.header("Partial credit model plot") +rk.header ("Partial credit model plot") rk.graph.on() try({ diff --git a/tests/item_response_theory/plot_RSM.rkcommands.R b/tests/item_response_theory/plot_RSM.rkcommands.R index a814986..d5374ef 100644 --- a/tests/item_response_theory/plot_RSM.rkcommands.R +++ b/tests/item_response_theory/plot_RSM.rkcommands.R @@ -2,7 +2,7 @@ local({ ## Prepare require(eRm) ## Print result -rk.header("Rating scale model plot") +rk.header ("Rating scale model plot") rk.graph.on() try({ diff --git a/tests/item_response_theory/plot_Rasch.rkcommands.R b/tests/item_response_theory/plot_Rasch.rkcommands.R index 10ba7ab..c601365 100644 --- a/tests/item_response_theory/plot_Rasch.rkcommands.R +++ b/tests/item_response_theory/plot_Rasch.rkcommands.R @@ -2,7 +2,7 @@ local({ ## Prepare require(ltm) ## Print result -rk.header("Rasch model plot") +rk.header ("Rasch model plot") rk.graph.on() try({ |
From: Thomas F. <tho...@ru...> - 2015-01-10 21:06:57
|
Git commit 1ec888ed4efca112710dfa0dce99c0e772272ab3 by Thomas Friedrichsmeier. Committed on 10/01/2015 at 21:06. Pushed by tfry into branch 'master'. Extract messages from graphics device plugins M +4 -2 Messages.sh http://commits.kde.org/rkward/1ec888ed4efca112710dfa0dce99c0e772272ab3 diff --git a/Messages.sh b/Messages.sh index 0781fce..2c200a5 100755 --- a/Messages.sh +++ b/Messages.sh @@ -16,8 +16,10 @@ python scripts/update_plugin_messages.py --extract-only --outdir=$podir rkward/p python scripts/update_plugin_messages.py --extract-only --outdir=$podir rkward/plugins/import_export.pluginmap # extract messages from data plugins: >> rkward__data.pot python scripts/update_plugin_messages.py --extract-only --outdir=$podir rkward/plugins/data.pluginmap -# extract messages from data plugins: >> rkward__plots.pot +# extract messages from plot plugins: >> rkward__plots.pot python scripts/update_plugin_messages.py --extract-only --outdir=$podir rkward/plugins/plots.pluginmap -# extract messages from data plugins: >> rkward__item_response_theory.pot +# extract messages from graphics device plugins: >> rkward__graphics_device.pot +python scripts/update_plugin_messages.py --extract-only --outdir=$podir rkward/plugins/x11device.pluginmap +# extract messages from IRT plugins: >> rkward__item_response_theory.pot python scripts/update_plugin_messages.py --extract-only --outdir=$podir rkward/plugins/irt.pluginmap # messages of embedded plugins are extracted implicitly, as part of the above extraction calls: >> rkward__embedded.pot |
From: Thomas F. <tho...@ru...> - 2015-01-10 19:56:44
|
Git commit 4f9d25fa6b1d8913bf437ebe69e8020c2768db04 by Thomas Friedrichsmeier. Committed on 10/01/2015 at 19:54. Pushed by tfry into branch 'master'. Start adding i18n() to IRT plugins (not done yet: plots) M +5 -5 rkward/plugins/analysis/irt/dichotomous/par_est_2pl.js M +5 -5 rkward/plugins/analysis/irt/dichotomous/par_est_3pl.js M +6 -6 rkward/plugins/analysis/irt/dichotomous/par_est_lltm.js M +5 -5 rkward/plugins/analysis/irt/dichotomous/par_est_rasch.js M +5 -5 rkward/plugins/analysis/irt/polytomous/par_est_gpcm.js M +5 -5 rkward/plugins/analysis/irt/polytomous/par_est_grm.js M +6 -6 rkward/plugins/analysis/irt/polytomous/par_est_lpcm.js M +6 -6 rkward/plugins/analysis/irt/polytomous/par_est_lrsm.js M +6 -6 rkward/plugins/analysis/irt/polytomous/par_est_pcm.js M +6 -6 rkward/plugins/analysis/irt/polytomous/par_est_rsm.js M +3 -3 rkward/plugins/analysis/irt/tests/eRm_waldtest.js M +6 -7 rkward/plugins/analysis/irt/tests/ltm_cronbach_alpha.js M +1 -1 rkward/plugins/analysis/irt/tests/ltm_gof_rasch.js M +6 -6 rkward/plugins/analysis/irt/tests/ltm_item_fit.js M +3 -3 rkward/plugins/analysis/irt/tests/ltm_person_fit.js M +10 -10 rkward/plugins/analysis/irt/tests/ltm_unidimensional.js M +2 -2 tests/item_response_theory/Cronbach_alpha.rkcommands.R M +6 -4 tests/item_response_theory/Cronbach_alpha.rkout http://commits.kde.org/rkward/4f9d25fa6b1d8913bf437ebe69e8020c2768db04 diff --git a/rkward/plugins/analysis/irt/dichotomous/par_est_2pl.js b/rkward/plugins/analysis/irt/dichotomous/par_est_2pl.js index 6845f5f..3e155cb 100644 --- a/rkward/plugins/analysis/irt/dichotomous/par_est_2pl.js +++ b/rkward/plugins/analysis/irt/dichotomous/par_est_2pl.js @@ -50,15 +50,15 @@ function printout () { var save = getValue("save_name.active"); var save_name = getValue("save_name"); - echo ('rk.header ("2PL parameter estimation")\n'); - echo ('rk.print ("Call:")\n'); + echo ('rk.header ('+ i18n ("2PL parameter estimation") + ')\n'); + echo ('rk.print (' + i18n ("Call:") + ')\n'); echo ('rk.print.literal (deparse(estimates.2pl$call, width.cutoff=500))\n'); - echo ('rk.header ("Coefficients:", level=4)\n'); + echo ('rk.header (' + i18n ("Coefficients:") + ', level=4)\n'); echo ('rk.print (coef(estimates.2pl))\n'); - echo ('rk.print (paste("Log-likelihood value at convergence:",round(estimates.2pl$log.Lik, digits=1)))\n'); + echo ('rk.print (paste(' + i18n ("Log-likelihood value at convergence:") + ',round(estimates.2pl$log.Lik, digits=1)))\n'); // check if results are to be saved: if (save && save_name) { - echo ('# keep results in current workspace\n'); + comment ('keep results in current workspace'); echo ('.GlobalEnv$' + save_name + ' <- estimates.2pl\n'); } } diff --git a/rkward/plugins/analysis/irt/dichotomous/par_est_3pl.js b/rkward/plugins/analysis/irt/dichotomous/par_est_3pl.js index e85e164..885860a 100644 --- a/rkward/plugins/analysis/irt/dichotomous/par_est_3pl.js +++ b/rkward/plugins/analysis/irt/dichotomous/par_est_3pl.js @@ -56,15 +56,15 @@ function printout () { var save = getValue("save_name.active"); var save_name = getValue("save_name"); - echo ('rk.header ("3PL parameter estimation")\n'); - echo ('rk.print ("Call:")\n'); + echo ('rk.header (' + i18n ("3PL parameter estimation") + ')\n'); + echo ('rk.print (' + i18n ("Call:") + ')\n'); echo ('rk.print.literal (deparse(estimates.3pl$call, width.cutoff=500))\n'); - echo ('rk.header ("Coefficients:", level=4)\n'); + echo ('rk.header (' + i18n ("Coefficients:") + ', level=4)\n'); echo ('rk.print (coef(estimates.3pl))\n'); - echo ('rk.print (paste("Log-likelihood value at convergence:",round(estimates.3pl$log.Lik, digits=1)))\n'); + echo ('rk.print (paste(' + i18n ("Log-likelihood value at convergence:") + ',round(estimates.3pl$log.Lik, digits=1)))\n'); // check if results are to be saved: if (save && save_name) { - echo ('# keep results in current workspace\n'); + comment ('keep results in current workspace'); echo ('.GlobalEnv$' + save_name + ' <- estimates.3pl\n'); } } diff --git a/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.js b/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.js index a197a01..e03fb3b 100644 --- a/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.js +++ b/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.js @@ -31,16 +31,16 @@ function printout () { var save = getValue("save_name.active"); var save_name = getValue("save_name"); - echo ('rk.header ("LLTM parameter estimation")\n'); - echo ('rk.print ("Call:")\n'); + echo ('rk.header (' + i18n ("LLTM parameter estimation") + ')\n'); + echo ('rk.print (' + i18n ("Call:") + ')\n'); echo ('rk.print.literal (deparse(estimates.lltm$call, width.cutoff=500))\n'); - echo ('rk.header ("Coefficients:", level=4)\n'); + echo ('rk.header (' + i18n ("Coefficients:") + ', level=4)\n'); echo ('rk.print(t(rbind(Eta=estimates.lltm$etapar,StdErr=estimates.lltm$se.eta)))\n'); - echo ('rk.print (paste("Conditional log-likelihood:",round(estimates.lltm$loglik, digits=1),\n'); - echo ('"<br />Number of iterations:",estimates.lltm$iter,"<br />Number of parameters:",estimates.lltm$npar))\n'); + echo ('rk.print (paste(' + i18n ("Conditional log-likelihood:") + ',round(estimates.lltm$loglik, digits=1),\n'); + echo (i18n ("<br />Number of iterations:") + ',estimates.lltm$iter,' + i18n ("<br />Number of parameters:") + ',estimates.lltm$npar))\n'); // check if results are to be saved: if (save && save_name) { - echo ('# keep results in current workspace\n'); + comment ('keep results in current workspace'); echo ('.GlobalEnv$' + save_name + ' <- estimates.lltm\n'); } } diff --git a/rkward/plugins/analysis/irt/dichotomous/par_est_rasch.js b/rkward/plugins/analysis/irt/dichotomous/par_est_rasch.js index 8292af3..4abc5aa 100644 --- a/rkward/plugins/analysis/irt/dichotomous/par_est_rasch.js +++ b/rkward/plugins/analysis/irt/dichotomous/par_est_rasch.js @@ -46,15 +46,15 @@ function printout () { var save_name = getValue("save_name"); var irtparam = getValue("irtparam"); - echo ('rk.header ("Rasch parameter estimation")\n'); - echo ('rk.print ("Call:")\n'); + echo ('rk.header (' + i18n ("Rasch parameter estimation") + ')\n'); + echo ('rk.print (' + i18n ("Call:") + ')\n'); echo ('rk.print.literal (deparse(estimates.rasch$call, width.cutoff=500))\n'); - echo ('rk.header ("Coefficients:", level=4)\n'); + echo ('rk.header (' + i18n ("Coefficients:") + ', level=4)\n'); echo ('rk.print (coef(estimates.rasch))\n'); - echo ('rk.print (paste("Log-likelihood value at convergence:",round(estimates.rasch$log.Lik, digits=1)))\n'); + echo ('rk.print (paste(' + i18n ("Log-likelihood value at convergence:") + ',round(estimates.rasch$log.Lik, digits=1)))\n'); // check if results are to be saved: if (save && save_name) { - echo ('# keep results in current workspace\n'); + comment ('keep results in current workspace'); echo ('.GlobalEnv$' + save_name + ' <- estimates.rasch\n'); } } diff --git a/rkward/plugins/analysis/irt/polytomous/par_est_gpcm.js b/rkward/plugins/analysis/irt/polytomous/par_est_gpcm.js index 734b510..3e87a6d 100644 --- a/rkward/plugins/analysis/irt/polytomous/par_est_gpcm.js +++ b/rkward/plugins/analysis/irt/polytomous/par_est_gpcm.js @@ -65,15 +65,15 @@ function printout () { var save = getValue("save_name.active"); var save_name = getValue("save_name"); - echo ('rk.header ("GPCM parameter estimation")\n'); - echo ('rk.print ("Call:")\n'); + echo ('rk.header (' + i18n ("GPCM parameter estimation") + ')\n'); + echo ('rk.print (' + i18n ("Call:") + ')\n'); echo ('rk.print.literal (deparse(estimates.gpcm$call, width.cutoff=500))\n'); - echo ('rk.header ("Coefficients:", level=4)\n'); + echo ('rk.header (' + i18n ("Coefficients:") + ', level=4)\n'); echo ('rk.print (coef(estimates.gpcm))\n'); - echo ('rk.print (paste("Log-likelihood value at convergence:",round(estimates.gpcm$log.Lik, digits=1)))\n'); + echo ('rk.print (paste(' + i18n ("Log-likelihood value at convergence:") + ',round(estimates.gpcm$log.Lik, digits=1)))\n'); // check if results are to be saved: if (save && save_name) { - echo ('# keep results in current workspace\n'); + comment ('keep results in current workspace'); echo ('.GlobalEnv$' + save_name + ' <- estimates.gpcm\n'); } } diff --git a/rkward/plugins/analysis/irt/polytomous/par_est_grm.js b/rkward/plugins/analysis/irt/polytomous/par_est_grm.js index 3797a77..2fa13e3 100644 --- a/rkward/plugins/analysis/irt/polytomous/par_est_grm.js +++ b/rkward/plugins/analysis/irt/polytomous/par_est_grm.js @@ -50,15 +50,15 @@ function printout () { var save = getValue("save_name.active"); var save_name = getValue("save_name"); - echo ('rk.header ("GRM parameter estimation")\n'); - echo ('rk.print ("Call:")\n'); + echo ('rk.header (' + i18n ("GRM parameter estimation") + ')\n'); + echo ('rk.print (' + i18n ("Call:") + ')\n'); echo ('rk.print.literal (deparse(estimates.grm$call, width.cutoff=500))\n'); - echo ('rk.header ("Coefficients:", level=4)\n'); + echo ('rk.header (' + i18n ("Coefficients:") + ', level=4)\n'); echo ('rk.print (coef(estimates.grm))\n'); - echo ('rk.print (paste("Log-likelihood value at convergence:",round(estimates.grm$log.Lik, digits=1)))\n'); + echo ('rk.print (paste(' + i18n ("Log-likelihood value at convergence:") + ',round(estimates.grm$log.Lik, digits=1)))\n'); // check if results are to be saved: if (save && save_name) { - echo ('# keep results in current workspace\n'); + comment ('keep results in current workspace'); echo ('.GlobalEnv$' + save_name + ' <- estimates.grm\n'); } } diff --git a/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.js b/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.js index f38fb5f..bec45d3 100644 --- a/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.js +++ b/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.js @@ -31,16 +31,16 @@ function printout () { var save = getValue("save_name.active"); var save_name = getValue("save_name"); - echo ('rk.header ("LPCM parameter estimation")\n'); - echo ('rk.print ("Call:")\n'); + echo ('rk.header (' + i18n ("LPCM parameter estimation") + ')\n'); + echo ('rk.print (' + i18n ("Call:") + ')\n'); echo ('rk.print.literal (deparse(estimates.lpcm$call, width.cutoff=500))\n'); - echo ('rk.header ("Coefficients:", level=4)\n'); + echo ('rk.header (' + i18n ("Coefficients:") + ', level=4)\n'); echo ('rk.print(t(rbind(Eta=estimates.lpcm$etapar,StdErr=estimates.lpcm$se.eta)))\n'); - echo ('rk.print (paste("Conditional log-likelihood:",round(estimates.lpcm$loglik, digits=1),\n'); - echo ('"<br />Number of iterations:",estimates.lpcm$iter,"<br />Number of parameters:",estimates.lpcm$npar))\n'); + echo ('rk.print (paste(' + i18n ("Conditional log-likelihood:") + ',round(estimates.lpcm$loglik, digits=1),\n'); + echo (i18n ("<br />Number of iterations:") + ',estimates.lpcm$iter,' + i18n ("<br />Number of parameters:") + ',estimates.lpcm$npar))\n'); // check if results are to be saved: if (save && save_name) { - echo ('# keep results in current workspace\n'); + comment ('keep results in current workspace'); echo ('.GlobalEnv$' + save_name + ' <- estimates.lpcm\n'); } } diff --git a/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.js b/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.js index ced71bb..6619448 100644 --- a/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.js +++ b/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.js @@ -31,16 +31,16 @@ function printout () { var save = getValue("save_name.active"); var save_name = getValue("save_name"); - echo ('rk.header ("LRSM parameter estimation")\n'); - echo ('rk.print ("Call:")\n'); + echo ('rk.header (' + i18n ("LRSM parameter estimation") + ')\n'); + echo ('rk.print (' + i18n ("Call:") + ')\n'); echo ('rk.print.literal (deparse(estimates.lrsm$call, width.cutoff=500))\n'); - echo ('rk.header ("Coefficients:", level=4)\n'); + echo ('rk.header (' + i18n ("Coefficients:") + ', level=4)\n'); echo ('rk.print(t(rbind(Eta=estimates.lrsm$etapar,StdErr=estimates.lrsm$se.eta)))\n'); - echo ('rk.print (paste("Conditional log-likelihood:",round(estimates.lrsm$loglik, digits=1),\n'); - echo ('"<br />Number of iterations:",estimates.lrsm$iter,"<br />Number of parameters:",estimates.lrsm$npar))\n'); + echo ('rk.print (paste(' + i18n ("Conditional log-likelihood:") + ',round(estimates.lrsm$loglik, digits=1),\n'); + echo (i18n ("<br />Number of iterations:") + ',estimates.lrsm$iter,' + i18n ("<br />Number of parameters:") + ',estimates.lrsm$npar))\n'); // check if results are to be saved: if (save && save_name) { - echo ('# keep results in current workspace\n'); + comment ('keep results in current workspace'); echo ('.GlobalEnv$' + save_name + ' <- estimates.lrsm\n'); } } diff --git a/rkward/plugins/analysis/irt/polytomous/par_est_pcm.js b/rkward/plugins/analysis/irt/polytomous/par_est_pcm.js index 95381dd..a767710 100644 --- a/rkward/plugins/analysis/irt/polytomous/par_est_pcm.js +++ b/rkward/plugins/analysis/irt/polytomous/par_est_pcm.js @@ -26,16 +26,16 @@ function printout () { var save = getValue("save_name.active"); var save_name = getValue("save_name"); - echo ('rk.header ("PCM parameter estimation")\n'); - echo ('rk.print ("Call:")\n'); + echo ('rk.header (' + i18n ("PCM parameter estimation") + ')\n'); + echo ('rk.print (' + i18n ("Call:") + ')\n'); echo ('rk.print.literal (deparse(estimates.pcm$call, width.cutoff=500))\n'); - echo ('rk.header ("Coefficients:", level=4)\n'); + echo ('rk.header (' + i18n ("Coefficients:") + ', level=4)\n'); echo ('rk.print(t(rbind(Eta=estimates.pcm$etapar,StdErr=estimates.pcm$se.eta)))\n'); - echo ('rk.print (paste("Conditional log-likelihood:",round(estimates.pcm$loglik, digits=1),\n'); - echo ('"<br />Number of iterations:",estimates.pcm$iter,"<br />Number of parameters:",estimates.pcm$npar))\n'); + echo ('rk.print (paste(' + i18n ("Conditional log-likelihood:") + ',round(estimates.pcm$loglik, digits=1),\n'); + echo (i18n ("<br />Number of iterations:") + ',estimates.pcm$iter,' + i18n ("<br />Number of parameters:") + ',estimates.pcm$npar))\n'); // check if results are to be saved: if (save && save_name) { - echo ('# keep results in current workspace\n'); + comment ('keep results in current workspace'); echo ('.GlobalEnv$' + save_name + ' <- estimates.pcm\n'); } } diff --git a/rkward/plugins/analysis/irt/polytomous/par_est_rsm.js b/rkward/plugins/analysis/irt/polytomous/par_est_rsm.js index 2394f35..948d10a 100644 --- a/rkward/plugins/analysis/irt/polytomous/par_est_rsm.js +++ b/rkward/plugins/analysis/irt/polytomous/par_est_rsm.js @@ -26,16 +26,16 @@ function printout () { var save = getValue("save_name.active"); var save_name = getValue("save_name"); - echo ('rk.header ("RSM parameter estimation")\n'); - echo ('rk.print ("Call:")\n'); + echo ('rk.header (' + i18n ("RSM parameter estimation") + ')\n'); + echo ('rk.print (' + i18n ("Call:") + ')\n'); echo ('rk.print.literal (deparse(estimates.rsm$call, width.cutoff=500))\n'); - echo ('rk.header ("Coefficients:", level=4)\n'); + echo ('rk.header (' + i18n ("Coefficients:") + ', level=4)\n'); echo ('rk.print(t(rbind(Eta=estimates.rsm$etapar,StdErr=estimates.rsm$se.eta)))\n'); - echo ('rk.print (paste("Conditional log-likelihood:",round(estimates.rsm$loglik, digits=1),\n'); - echo ('"<br />Number of iterations:",estimates.rsm$iter,"<br />Number of parameters:",estimates.rsm$npar))\n'); + echo ('rk.print (paste(' + i18n ("Conditional log-likelihood:") + ',round(estimates.rsm$loglik, digits=1),\n'); + echo (i18n ("<br />Number of iterations:") + ',estimates.rsm$iter,' + i18n ("<br />Number of parameters:") + ',estimates.rsm$npar))\n'); // check if results are to be saved: if (save && save_name) { - echo ('# keep results in current workspace\n'); + comment ('keep results in current workspace'); echo ('.GlobalEnv$' + save_name + ' <- estimates.rsm\n'); } } diff --git a/rkward/plugins/analysis/irt/tests/eRm_waldtest.js b/rkward/plugins/analysis/irt/tests/eRm_waldtest.js index 3389157..9e4e49d 100644 --- a/rkward/plugins/analysis/irt/tests/eRm_waldtest.js +++ b/rkward/plugins/analysis/irt/tests/eRm_waldtest.js @@ -19,9 +19,9 @@ function calculate () { } function printout () { - echo ('rk.header ("Wald test (' + getValue("x") + ')")\n'); - echo ('rk.print ("Call:")\n'); + echo ('rk.header (' + i18n ("Wald test (%1)", getValue ("x")) + ')\n'); + echo ('rk.print (' + i18n ("Call:") + ')\n'); echo ('rk.print.literal (deparse(waldtest.res$call, width.cutoff=500))\n'); - echo ('rk.header ("Wald test on item level (z-values):", level=4)\n'); + echo ('rk.header (' + i18n ("Wald test on item level (z-values):") + ', level=4)\n'); echo ('rk.print(waldtest.res$coef.table)\n'); } diff --git a/rkward/plugins/analysis/irt/tests/ltm_cronbach_alpha.js b/rkward/plugins/analysis/irt/tests/ltm_cronbach_alpha.js index 4605608..6dd5fa8 100644 --- a/rkward/plugins/analysis/irt/tests/ltm_cronbach_alpha.js +++ b/rkward/plugins/analysis/irt/tests/ltm_cronbach_alpha.js @@ -65,18 +65,17 @@ function printout () { if (inp_items) inp_items = inp_items.replace(/\n/g,', ').replace(/(\w*)\[\["|"\]\]/g, ''); - echo ('rk.header ("Cronbach\'s alpha")\n'); - echo ('rk.print("for the \'' + getValue("x") + '\' data-set'); + header = new Header (i18n ("Cronbach\'s alpha")).add (i18n ("Dataset"), getValue ("x")); if (chk_select && inp_items) - echo (" (subset: "+inp_items+")"); - echo ('")\n'); - echo ('rk.print(paste("Items:",cronalpha.res$p,"<br />Sample units:",cronalpha.res$n,"<br /><strong>alpha:",round(cronalpha.res$alpha, digits=2),"</strong>'); + header.add (i18n ("Subset"), inp_items); + header.print (); + echo ('rk.print(paste(' + i18n ("Items:") + ',cronalpha.res$p,' + i18n ("<br />Sample units:") + ',cronalpha.res$n,"<br /><strong>alpha:",round(cronalpha.res$alpha, digits=2),"</strong>'); if (chk_standard) echo(" (standardized)"); echo ('"))\n'); - echo ('rk.print("Effects on alpha if items are removed:")\n'); + echo ('rk.print(' + i18n ("Effects on alpha if items are removed:") + ')\n'); echo ('rk.print(descript.res$alpha)\n'); if (chk_bsci) { - echo ('rk.print("' + (spin_ci * 100)+"%" + ' Confidence interval:")\n'); + echo ('rk.print(' + i18n ("%1% Confidence interval:", spin_ci * 100) + ')\n'); echo ('rk.print(cronalpha.res$ci)\n'); } } diff --git a/rkward/plugins/analysis/irt/tests/ltm_gof_rasch.js b/rkward/plugins/analysis/irt/tests/ltm_gof_rasch.js index d90fb6b..0e1e9e7 100644 --- a/rkward/plugins/analysis/irt/tests/ltm_gof_rasch.js +++ b/rkward/plugins/analysis/irt/tests/ltm_gof_rasch.js @@ -14,7 +14,7 @@ function calculate () { } function printout () { - echo ('rk.header ("Goodness of Fit for Rasch Models (' + getValue("x") + ')")\n'); + echo ('rk.header (' + i18n ("Goodness of Fit for Rasch Models (%1)", getValue ("x")) + ')\n'); echo ('rk.print ("Call:")\n'); echo ('rk.print.literal (deparse(GoFRasch.res$call, width.cutoff=500))\n'); echo ('rk.header ("Parametric Bootstrap test:", level=4)\n'); diff --git a/rkward/plugins/analysis/irt/tests/ltm_item_fit.js b/rkward/plugins/analysis/irt/tests/ltm_item_fit.js index 0783f20..e951a79 100644 --- a/rkward/plugins/analysis/irt/tests/ltm_item_fit.js +++ b/rkward/plugins/analysis/irt/tests/ltm_item_fit.js @@ -32,13 +32,13 @@ function calculate () { function printout () { var rad_pvalue = getValue("rad_pvalue"); - echo ('rk.header ("Item-fit statistics (' + getValue("x") + ')")\n'); - echo ('rk.print ("Call:")\n'); + echo ('rk.header (' + i18n ("Item-fit statistics (%1)", getValue("x")) + ')\n'); + echo ('rk.print (' + i18n ("Call:") + ')\n'); echo ('rk.print.literal (deparse(itemfit.res$call, width.cutoff=500))\n'); - echo ('rk.print ("Alternative: Items do not fit the model")\n'); - echo ('rk.print (paste("Ability Categories:", itemfit.res$G))\n'); + echo ('rk.print (' + i18n ("Alternative: Items do not fit the model") + ')\n'); + echo ('rk.print (paste(' + i18n ("Ability Categories:") + ', itemfit.res$G))\n'); if (rad_pvalue == "montecarlo") - echo ('rk.print (paste("Monte Carlo samples:", itemfit.res$B))\n'); - echo ('rk.header ("Item-Fit Statistics and P-values:", level=4)\n'); + echo ('rk.print (paste(' + i18n ("Monte Carlo samples:") + ', itemfit.res$B))\n'); + echo ('rk.header (' + i18n ("Item-Fit Statistics and P-values:") + ', level=4)\n'); echo ('rk.print(cbind("X^2"=round(itemfit.res$Tobs, digits=3), "Pr (>X^2)"=format(round(itemfit.res$p.values, digits=3), nsmall=3)))\n'); } diff --git a/rkward/plugins/analysis/irt/tests/ltm_person_fit.js b/rkward/plugins/analysis/irt/tests/ltm_person_fit.js index 645d6b6..4655d76 100644 --- a/rkward/plugins/analysis/irt/tests/ltm_person_fit.js +++ b/rkward/plugins/analysis/irt/tests/ltm_person_fit.js @@ -31,9 +31,9 @@ function calculate () { } function printout () { - echo ('rk.header ("Person-fit statistics (' + getValue("x") + ')")\n'); - echo ('rk.print ("Call:")\n'); + echo ('rk.header (' + i18n ("Person-fit statistics (%1)", getValue("x")) + ')\n'); + echo ('rk.print (' + i18n ("Call:") + ')\n'); echo ('rk.print.literal (deparse(personfit.res$call, width.cutoff=500))\n'); - echo ('rk.header ("Response patterns, person-fit statistics (L0, Lz) and probabilities for each response pattern (Pr):", level=4)\n'); + echo ('rk.header (' + i18n ("Response patterns, person-fit statistics (L0, Lz) and probabilities for each response pattern (Pr):") + ', level=4)\n'); echo ('rk.print(cbind(format(personfit.res$resp.patterns, nsmall=0), round(personfit.res$Tobs, digits=3), "Pr (<Lz)"=round(c(personfit.res$p.values), digits=3)))\n'); } diff --git a/rkward/plugins/analysis/irt/tests/ltm_unidimensional.js b/rkward/plugins/analysis/irt/tests/ltm_unidimensional.js index 79f4eaa..c168724 100644 --- a/rkward/plugins/analysis/irt/tests/ltm_unidimensional.js +++ b/rkward/plugins/analysis/irt/tests/ltm_unidimensional.js @@ -17,20 +17,20 @@ function printout () { var save = getValue("save_name.active"); var save_name = getValue("save_name"); - echo ('rk.header ("Unidimensionality check (' + getValue("x") + ')")\n'); - echo ('rk.print ("Call:")\n'); + echo ('rk.header (' + i18n ("Unidimensionality check (%1)", getValue("x")) + ')\n'); + echo ('rk.print (' + i18n ("Call:") + ')\n'); echo ('rk.print.literal (deparse(unidim.res$call, width.cutoff=500))\n'); - echo ('rk.header ("Matrix of tertachoric correlations:", level=4)\n'); + echo ('rk.header (' + i18n ("Matrix of tertachoric correlations:") + ', level=4)\n'); echo ('rk.print (unidim.res$Rho)\n'); - echo ('rk.header ("Unidimensionality Check using Modified Parallel Analysis:", level=4)\n'); - echo ('rk.print ("Alternative hypothesis: <em>The second eigenvalue of the observed data is substantially larger than the second eigenvalue of data under the assumed IRT model</em>")\n'); - echo ('rk.print (paste("Second eigenvalue in the observed data:", round(unidim.res$Tobs[2], digits=3)))\n'); - echo ('rk.print (paste("Average of second eigenvalues in Monte Carlo samples:", round(mean(unidim.res$T.boot[,2]), digits=3)))\n'); - echo ('rk.print (paste("Monte Carlo samples:", dim(unidim.res$T.boot)[1]))\n'); - echo ('rk.print (paste("p-value:", round(unidim.res$p.value, digits=3)))\n'); + echo ('rk.header (' + i18n ("Unidimensionality Check using Modified Parallel Analysis:") + ', level=4)\n'); + echo ('rk.print (' + i18n ("Alternative hypothesis: <em>The second eigenvalue of the observed data is substantially larger than the second eigenvalue of data under the assumed IRT model</em>") + ')\n'); + echo ('rk.print (paste(' + i18n ("Second eigenvalue in the observed data:") + ', round(unidim.res$Tobs[2], digits=3)))\n'); + echo ('rk.print (paste(' + i18n ("Average of second eigenvalues in Monte Carlo samples:") + ', round(mean(unidim.res$T.boot[,2]), digits=3)))\n'); + echo ('rk.print (paste(' + i18n ("Monte Carlo samples:") + ', dim(unidim.res$T.boot)[1]))\n'); + echo ('rk.print (paste(' + i18n ("p-value:") + ', round(unidim.res$p.value, digits=3)))\n'); // check if results are to be saved: if (save && save_name) { - echo ('# keep results in current workspace\n'); + comment ('keep results in current workspace'); echo ('.GlobalEnv$' + save_name + ' <- unidim.res\n'); } } diff --git a/tests/item_response_theory/Cronbach_alpha.rkcommands.R b/tests/item_response_theory/Cronbach_alpha.rkcommands.R index c56246e..64c84d1 100644 --- a/tests/item_response_theory/Cronbach_alpha.rkcommands.R +++ b/tests/item_response_theory/Cronbach_alpha.rkcommands.R @@ -5,8 +5,8 @@ require(ltm) cronalpha.res <- cronbach.alpha(subset(LSAT, select=c("Item 1", "Item 2", "Item 3", "Item 4", "Item 5")), CI=TRUE) descript.res <- descript(subset(LSAT, select=c("Item 1", "Item 2", "Item 3", "Item 4", "Item 5")), chi.squared=FALSE, B=1000) ## Print result -rk.header ("Cronbach's alpha") -rk.print("for the 'LSAT' data-set (subset: Item 1, Item 2, Item 3, Item 4, Item 5)") +rk.header ("Cronbach's alpha", parameters=list("Dataset"="LSAT", + "Subset"="Item 1, Item 2, Item 3, Item 4, Item 5")) rk.print(paste("Items:",cronalpha.res$p,"<br />Sample units:",cronalpha.res$n,"<br /><strong>alpha:",round(cronalpha.res$alpha, digits=2),"</strong>")) rk.print("Effects on alpha if items are removed:") rk.print(descript.res$alpha) diff --git a/tests/item_response_theory/Cronbach_alpha.rkout b/tests/item_response_theory/Cronbach_alpha.rkout index 9c4e4b4..c626323 100644 --- a/tests/item_response_theory/Cronbach_alpha.rkout +++ b/tests/item_response_theory/Cronbach_alpha.rkout @@ -1,7 +1,9 @@ <h1>Cronbach's alpha</h1> -DATE<br> - -<p class='character'>for the 'LSAT' data-set (subset: Item 1, Item 2, Item 3, Item 4, Item 5)</p> +<h2>Parameters</h2> +<ul><li>Dataset: LSAT</li> +<li>Subset: Item 1, Item 2, Item 3, Item 4, Item 5</li> +</ul> +DATE<br /> <p class='character'>Items: 5 <br />Sample units: 1000 <br /><strong>alpha: 0.29 </strong></p> @@ -49,7 +51,7 @@ DATE<br> <tr><td class=firstcolumn></td> <td class=cellinside>0.22</td> -<td class=cellinside>0.36</td></tr> +<td class=cellinside>0.37</td></tr> </tbody> </table> |
From: Yuri C. <yu...@uk...> - 2015-01-10 09:26:39
|
Git commit ccf4c123d650e90671a9c89063bfdbb367b2d8e5 by Yuri Chornoivan. Committed on 10/01/2015 at 09:26. Pushed by yurchor into branch 'master'. Fix typo M +1 -1 rkward/plugins/plots/box_plot.rkh http://commits.kde.org/rkward/ccf4c123d650e90671a9c89063bfdbb367b2d8e5 diff --git a/rkward/plugins/plots/box_plot.rkh b/rkward/plugins/plots/box_plot.rkh index 65c78e4..629d795 100644 --- a/rkward/plugins/plots/box_plot.rkh +++ b/rkward/plugins/plots/box_plot.rkh @@ -12,7 +12,7 @@ Choose numerical data to be plotted. Data can be organized in separate vectors, <caption id="tab_variables"/> <setting id="data_mode">Select the format of your data. This can either be separate numerical vectors, or a single outcome variable split by one or more grouping variables.</setting> <setting id="x">For separate variables mode: Select one or more numerical vectors.</setting> - <setting id="outcome">For single(grouped) variable mode: Select one numerical vectors as the outcome variable.</setting> + <setting id="outcome">For single(grouped) variable mode: Select one numerical vector as the outcome variable.</setting> <setting id="groups">For single(grouped) variable mode: Select one or more vectors by which to group the outcome variable. Group variables should have the same length as the outcome variable.</setting> <setting id="dodges">For single(grouped) variable mode: Dodging boxes within one or more groups can be a nice option when the outcome is split by several group variables. This allows you to select, across how many group variables, boxes should be dodged ("0" for no dodging, "1" to dodge only the first group variable).</setting> <setting id="names_mode">Method for assigning labels to the plot. "default" means, the labels are chosen automatically. If no labels are available, this will generally print the values. The other options allow you to specify the labels as literal string, or as an R statement (e.g. if the names are stored in a different variable in the workspace).</setting> |
From: Yuri C. <yu...@uk...> - 2015-01-10 06:55:01
|
Git commit d0ef58ca71cf6ab396691ff28e51d419c0c88e3c by Yuri Chornoivan. Committed on 10/01/2015 at 06:54. Pushed by yurchor into branch 'master'. Fix typos M +1 -1 rkward/plugins/plots.pluginmap M +1 -1 rkward/plugins/plots/barplot.js M +1 -1 rkward/plugins/plots/box_plot.rkh http://commits.kde.org/rkward/d0ef58ca71cf6ab396691ff28e51d419c0c88e3c diff --git a/rkward/plugins/plots.pluginmap b/rkward/plugins/plots.pluginmap index 39e9e7a..79ae5d8 100644 --- a/rkward/plugins/plots.pluginmap +++ b/rkward/plugins/plots.pluginmap @@ -4,7 +4,7 @@ <include file="pluginmap_meta.inc"/> <about name="Plots" - shortinfo="Plugins for procuding various plots. Part of the official RKWard distribution" + shortinfo="Plugins for producing various plots. Part of the official RKWard distribution" version="0.6.3" license="GPL" url="http://rkward.kde.org"> diff --git a/rkward/plugins/plots/barplot.js b/rkward/plugins/plots/barplot.js index ed00f8c..f987205 100644 --- a/rkward/plugins/plots/barplot.js +++ b/rkward/plugins/plots/barplot.js @@ -26,7 +26,7 @@ function doPrintout (full) { echo (getValue ('tabulate_options.code.calculate')); } else { echo ('x <- ' + varname + "\n"); - comment ('barplot is a bit picky about attributes, so we need to convert to vector explicitely'); + comment ('barplot is a bit picky about attributes, so we need to convert to vector explicitly'); echo ('if(!is.matrix(x)) x <- as.vector(x)\n'); echo ('if(!is.matrix(x) && is.data.frame(x)) x <- data.matrix(x)\n'); } diff --git a/rkward/plugins/plots/box_plot.rkh b/rkward/plugins/plots/box_plot.rkh index ad34db3..65c78e4 100644 --- a/rkward/plugins/plots/box_plot.rkh +++ b/rkward/plugins/plots/box_plot.rkh @@ -14,7 +14,7 @@ Choose numerical data to be plotted. Data can be organized in separate vectors, <setting id="x">For separate variables mode: Select one or more numerical vectors.</setting> <setting id="outcome">For single(grouped) variable mode: Select one numerical vectors as the outcome variable.</setting> <setting id="groups">For single(grouped) variable mode: Select one or more vectors by which to group the outcome variable. Group variables should have the same length as the outcome variable.</setting> - <setting id="dodges">For single(grouped) variable mode: Doding boxes within one or more groups can be a nice option when the outcome is split by several group variables. This allows you to select, across how many group variables, boxes should be doged ("0" for no dodging, "1" to dodge only the first group variable).</setting> + <setting id="dodges">For single(grouped) variable mode: Dodging boxes within one or more groups can be a nice option when the outcome is split by several group variables. This allows you to select, across how many group variables, boxes should be dodged ("0" for no dodging, "1" to dodge only the first group variable).</setting> <setting id="names_mode">Method for assigning labels to the plot. "default" means, the labels are chosen automatically. If no labels are available, this will generally print the values. The other options allow you to specify the labels as literal string, or as an R statement (e.g. if the names are stored in a different variable in the workspace).</setting> <setting id="boxwex">Allows to change the width of the boxes, relative to the entire plot.</setting> <caption id="tab_options"/> |
From: Yuri C. <yu...@uk...> - 2015-01-09 18:46:48
|
Git commit 0cdfb702a5b72ec006986ba1932c1a6e762e20dc by Yuri Chornoivan. Committed on 09/01/2015 at 18:45. Pushed by yurchor into branch 'master'. Fix typos M +1 -1 rkward/plugins/00saveload/import/import_stata.rkh M +1 -1 rkward/plugins/00saveload/save/write_csv.rkh M +1 -1 rkward/plugins/plots/histogram_options.rkh M +1 -1 rkward/plugins/plots/plot_options.xml M +1 -1 rkward/plugins/plots/plot_stepfun_options.rkh http://commits.kde.org/rkward/0cdfb702a5b72ec006986ba1932c1a6e762e20dc diff --git a/rkward/plugins/00saveload/import/import_stata.rkh b/rkward/plugins/00saveload/import/import_stata.rkh index 68210c7..287cd53 100644 --- a/rkward/plugins/00saveload/import/import_stata.rkh +++ b/rkward/plugins/00saveload/import/import_stata.rkh @@ -8,7 +8,7 @@ Import STATA data files. </summary> <usage> -Choose the STATA data file to import. Usually those files have the ending '*.dta. An R object containing the STATA data will be created. STATA files other than data files (i. e.:*.log, *.smcl, *.do, *.ado) are not supported. +Choose the STATA data file to import. Usually those files have the ending '*.dta'. An R object containing the STATA data will be created. STATA files other than data files (i. e.:*.log, *.smcl, *.do, *.ado) are not supported. </usage> <settings> diff --git a/rkward/plugins/00saveload/save/write_csv.rkh b/rkward/plugins/00saveload/save/write_csv.rkh index 94f872a..7289614 100644 --- a/rkward/plugins/00saveload/save/write_csv.rkh +++ b/rkward/plugins/00saveload/save/write_csv.rkh @@ -9,7 +9,7 @@ Export data to CSV or similar file formats. </summary> <usage> - Select a tabular data object (like a data frame or matrix) and chose a file to save to. All other options allow you to define the file format, handling of column and row names as well as special character handling. + Select a tabular data object (like a data frame or matrix) and choose a file to save to. All other options allow you to define the file format, handling of column and row names as well as special character handling. </usage> <!-- <section id="sct_EDITORDE" title="EDIT OR DELETE ME"> EDIT OR DELETE ME diff --git a/rkward/plugins/plots/histogram_options.rkh b/rkward/plugins/plots/histogram_options.rkh index de42216..6af40a8 100644 --- a/rkward/plugins/plots/histogram_options.rkh +++ b/rkward/plugins/plots/histogram_options.rkh @@ -13,7 +13,7 @@ <setting id="rightclosed">This is the <i>right</i> parameter.</setting> <setting id="include_lowest">This is the <i>include.lowest</i> parameter.</setting> <caption id="frame_breaks"/> - <setting id="histbreaksFunction">This is the <i>breaks</i> parameter to <b>hist</b>, unless either 'Integer numbers' or 'Vector of break points' is chosen. The 'Integer numbers' options sets the break points as the integers between the minimum and the maximum of the variable. The 'Vector of break points' options sets equally spaced break points in the range of the variable. The number of break points in this case is provided by 'Vector length' (see below).</setting> + <setting id="histbreaksFunction">This is the <i>breaks</i> parameter to <b>hist</b>, unless either 'Integer numbers' or 'Vector of break points' is chosen. The 'Integer numbers' option sets the break points as the integers between the minimum and the maximum of the variable. The 'Vector of break points' option sets equally spaced break points in the range of the variable. The number of break points in this case is provided by 'Vector length' (see below).</setting> <setting id="histbreaks_ncells">If 'A single number' is chosen in the above field, then this provides a suggestion to the number of cells. This is the <i>breaks</i> parameter with a single number argument.</setting> <setting id="histbreaks_veclength">If 'Vector of break points' is chosen in the above field, then this provides the length of the vector of equally spaced break points in the range of the variable. This is the <i>breaks</i> parameter with a vector argument. The actual sequence is calculated by an inline function call (see the generated code). The range of the variable is extended by 10% before obtaining the sequence, so that both the minimum and maximum points are included.</setting> <caption id="frame_histborderoptions"/> diff --git a/rkward/plugins/plots/plot_options.xml b/rkward/plugins/plots/plot_options.xml index fb60e7d..997450d 100644 --- a/rkward/plugins/plots/plot_options.xml +++ b/rkward/plugins/plots/plot_options.xml @@ -133,7 +133,7 @@ <option value="3" label="Always vertical " /> </dropdown> <row> - <input id="cexaxis" label="Tick label scale (relative to cex))" /> + <input id="cexaxis" label="Tick label scale (relative to cex)" /> </row> <stretch/> </frame> diff --git a/rkward/plugins/plots/plot_stepfun_options.rkh b/rkward/plugins/plots/plot_stepfun_options.rkh index 3384f4a..62d65de 100644 --- a/rkward/plugins/plots/plot_stepfun_options.rkh +++ b/rkward/plugins/plots/plot_stepfun_options.rkh @@ -30,7 +30,7 @@ <ul> <li><i>allow_addtoplot</i>: Setting this to "true" ("false") enables (disables) the display of the 'Add to current plot' checkbox.</li> <li><i>default_dopoints</i>: Setting this to "true" ("false") toggles the state of the 'Draw points' checkbox.</li> - <li><i>default_verticals</i>: Setting this to "true" ("false") toggles the state of the 'Draw verticals' checkbox.</li> + <li><i>default_verticals</i>: Setting this to "true" ("false") toggles the state of the 'Draw vertical lines' checkbox.</li> <li><i>allow_col01line</i>: Setting this to "true" ("false") enables (disables) the display of the two frames ('For y = 0 line' and 'For y = 1 line') for <i>col.01line</i> option to ecdf.</li> </ul> </technical> |
From: Thomas F. <tho...@ru...> - 2015-01-09 16:41:12
|
Git commit 7d4a8d0e24323935d3728b7fe047d41b2b0119a1 by Thomas Friedrichsmeier. Committed on 09/01/2015 at 16:40. Pushed by tfry into branch 'master'. Add .reviewboardrc A +3 -0 .reviewboardrc http://commits.kde.org/rkward/7d4a8d0e24323935d3728b7fe047d41b2b0119a1 diff --git a/.reviewboardrc b/.reviewboardrc new file mode 100644 index 0000000..1ad9e98 --- /dev/null +++ b/.reviewboardrc @@ -0,0 +1,3 @@ +REPOSITORY = "git://anongit.kde.org/rkward" +REVIEWBOARD_URL = "https://git.reviewboard.kde.org" +TARGET_GROUPS = "rkward" |
From: Thomas F. <tho...@ru...> - 2015-01-09 14:44:16
|
Git commit 3ff25b6103822af2becadbb456428d852b666fd4 by Thomas Friedrichsmeier. Committed on 09/01/2015 at 13:10. Pushed by tfry into branch 'master'. Add i18n()-calls to plot plugins' .js files. M +3 -3 rkward/plugins/plots/barplot.js M +1 -1 rkward/plugins/plots/barplot_embed.js M +11 -11 rkward/plugins/plots/box_plot.js M +2 -2 rkward/plugins/plots/cor_graph.js M +3 -3 rkward/plugins/plots/cor_graph.xml M +11 -9 rkward/plugins/plots/density_plot.js M +4 -4 rkward/plugins/plots/dotchart.js M +4 -1 rkward/plugins/plots/ecdf_plot.js M +2 -11 rkward/plugins/plots/histogram.js M +14 -25 rkward/plugins/plots/histogram_options.js M +3 -3 rkward/plugins/plots/pareto.js M +6 -6 rkward/plugins/plots/piechart.js M +1 -2 rkward/plugins/plots/plot.js M +9 -12 rkward/plugins/plots/scatterplot.js M +2 -2 rkward/plugins/plots/scatterplot_matrix.js M +2 -2 rkward/plugins/plots/scatterplot_matrix.xml M +3 -18 rkward/plugins/plots/sieve_plot.js M +5 -2 rkward/plugins/plots/stem.js M +3 -3 rkward/plugins/plots/stem.xml M +9 -6 rkward/plugins/plots/stripchart_plot.js M +1 -1 rkward/plugins/plots/stripchart_plot.xml M +9 -0 rkward/scriptbackends/common.js M +9 -9 tests/plots/boxplot.rkcommands.R M +8 -6 tests/plots/boxplot_grouped.rkcommands.R M +7 -1 tests/plots/density_plot.rkcommands.R M +7 -14 tests/plots/density_plot.rkout M +3 -1 tests/plots/ecdf_plot.rkcommands.R M +8 -1 tests/plots/histogram.rkcommands.R M +13 -18 tests/plots/histogram.rkout M +4 -5 tests/plots/scatterplot.rkcommands.R M +4 -1 tests/plots/scatterplot_matrix.rkcommands.R M +4 -4 tests/plots/scatterplot_matrix.rkout M +4 -2 tests/plots/stem_leaf_plot.rkcommands.R M +2 -2 tests/plots/stem_leaf_plot.rkout M +5 -1 tests/plots/stripchart.rkcommands.R M +2 -2 tests/plots/stripchart.rkout http://commits.kde.org/rkward/3ff25b6103822af2becadbb456428d852b666fd4 diff --git a/rkward/plugins/plots/barplot.js b/rkward/plugins/plots/barplot.js index 9174709..ed00f8c 100644 --- a/rkward/plugins/plots/barplot.js +++ b/rkward/plugins/plots/barplot.js @@ -11,7 +11,7 @@ function doPrintout (full) { var names_mode = getValue ("names_mode"); var tabulate = getValue ("tabulate.checked"); - var main_header = '"Variable"=rk.get.description (' + varname + ')'; + var main_header = i18n ("Variable") + '=rk.get.description (' + varname + ')'; if (tabulate) main_header = getValue ('tabulate_options.parameters'); var limit = getValue ("limit.checked"); @@ -26,7 +26,7 @@ function doPrintout (full) { echo (getValue ('tabulate_options.code.calculate')); } else { echo ('x <- ' + varname + "\n"); - echo ('# barplot is a bit picky about attributes, so we need to convert to vector explicitely\n'); + comment ('barplot is a bit picky about attributes, so we need to convert to vector explicitely'); echo ('if(!is.matrix(x)) x <- as.vector(x)\n'); echo ('if(!is.matrix(x) && is.data.frame(x)) x <- data.matrix(x)\n'); } @@ -42,7 +42,7 @@ function doPrintout (full) { } if (full) { - echo ('rk.header ("Barplot", parameters=list (' + main_header + limit_header + barplot_header + '))\n'); + echo ('rk.header (' + i18n ("Barplot") + ', parameters=list (' + main_header + limit_header + barplot_header + '))\n'); echo ('\n'); echo ('rk.graph.on ()\n'); } diff --git a/rkward/plugins/plots/barplot_embed.js b/rkward/plugins/plots/barplot_embed.js index cf4963d..3985d07 100644 --- a/rkward/plugins/plots/barplot_embed.js +++ b/rkward/plugins/plots/barplot_embed.js @@ -49,7 +49,7 @@ function printout () { echo (plot_pre); if (options['labels']) { - echo ('# adjust the range so that the labels will fit\n'); + comment ('adjust the range so that the labels will fit'); echo ('yrange <- range (' + options['xvar'] + ', na.rm=TRUE) * 1.2\n'); echo ('if (yrange[1] > 0) yrange[1] <- 0\n'); echo ('if (yrange[2] < 0) yrange[2] <- 0\n'); diff --git a/rkward/plugins/plots/box_plot.js b/rkward/plugins/plots/box_plot.js index f8906af..1a6bdae 100644 --- a/rkward/plugins/plots/box_plot.js +++ b/rkward/plugins/plots/box_plot.js @@ -27,9 +27,9 @@ function doPrintout (full) { var dodges = groups_a.slice (0, n_dodges); var groups = groups_a.slice (n_dodges); echo ('groups <- rk.list (' + dodges.concat (groups).join (", ") + ')\n'); - echo ('data_list <- split (' + getValue ("outcome") + ', groups) #split sample by grouping variables\n'); + echo ('data_list <- split (' + getValue ("outcome") + ', groups) '); comment ('split sample by grouping variables'); if (dodged) { - echo ('# adjust width and position of boxes to achieve dodging\n'); + comment ('adjust width and position of boxes to achieve dodging'); echo ('dodge_size <- nlevels (interaction (' + dodges.join (", ") + '))\n'); echo ('box_width <- ' + getValue ("boxwex") + ' / dodge_size\n'); boxwex = ', boxwex=box_width'; @@ -37,7 +37,7 @@ function doPrintout (full) { positions = ', at=box_positions, xlim=c(min(box_positions)-box_width, max(box_positions)+box_width)'; } } else { - echo ('data_list <- rk.list (' + getValue ("x").split ("\n").join (", ") + ') #convert single sample variables to list\n'); + echo ('data_list <- rk.list (' + getValue ("x").split ("\n").join (", ") + ') '); comment ('convert single sample variables to list'); } if (names_mode == "rexp") { echo ("names(data_list) <- " + getValue ("names_exp") + "\n"); @@ -47,9 +47,9 @@ function doPrintout (full) { if (full) { if (grouped_mode) { - echo ('rk.header ("Boxplot", list ("Outcome variable", rk.get.description (' + getValue ("outcome") + '), "Grouping variable(s)", paste (names (groups), collapse=", ")))\n'); + new Header (i18n ("Boxplot")).add (i18n ("Outcome variable"), noquote ('rk.get.description (' + getValue ("outcome") + ')')).add (i18n ("Grouping variable(s)"), noquote ("paste (names (groups), collapse=\", \")")).print (); } else { - echo ('rk.header ("Boxplot", list ("Variable(s)", paste (names (data_list), collapse=", ")))\n'); + new Header (i18n ("Boxplot")).add (i18n ("Variable(s)"), noquote ("paste (names (data_list), collapse=\", \")")).print (); } echo ('rk.graph.on()\n'); } @@ -57,17 +57,17 @@ function doPrintout (full) { echo ('try ({\n'); printIndentedUnlessEmpty ("\t", getValue ("plotoptions.code.preprocess"), '', '\n'); - echo (' boxplot (data_list' + boxwex + positions + ', notch = ' + getValue ("notch") + ', outline = ' + getValue("outline") + ', horizontal = ' + getValue("orientation") + getValue ("plotoptions.code.printout") + ') #actual boxplot function\n'); + echo (' boxplot (data_list' + boxwex + positions + ', notch = ' + getValue ("notch") + ', outline = ' + getValue("outline") + ', horizontal = ' + getValue("orientation") + getValue ("plotoptions.code.printout") + ') '); comment ("actual boxplot function"); if (do_mean) { var mean_fun = "mean, na.rm=TRUE"; if (getValue ("type_of_mean") =="geometric_mean") { - echo(' geo_mean <- function (x) {prod(na.omit(x))^(1/length(na.omit(x)))} #Calculate geometric mean\n'); + echo(' geo_mean <- function (x) {prod(na.omit(x))^(1/length(na.omit(x)))} '); comment ('Calculate geometric mean'); mean_fun = "geo_mean"; } else if (getValue ("type_of_mean") =="harmonic_mean") { - echo(' har_mean <- function (x) {(1 / mean(1 / na.omit(x)))} #Calculate harmonic mean\n'); + echo(' har_mean <- function (x) {(1 / mean(1 / na.omit(x)))} '); comment ('Calculate harmonic mean'); mean_fun = "har_mean"; } else if (getValue ("type_of_mean") =="interquartile_mean") { - echo(' interq_mean <- function (x) {sum(quantile(x, probs=c(0.25), na.rm=TRUE), quantile(x, probs=c(0.75), na.rm=TRUE)) / 2} #Calculate the interquartile mean\n'); + echo(' interq_mean <- function (x) {sum(quantile(x, probs=c(0.25), na.rm=TRUE), quantile(x, probs=c(0.75), na.rm=TRUE)) / 2} '); comment ('Calculate the interquartile mean'); mean_fun = "interq_mean"; } else { // arithmetic mean var trimp = getValue("trim"); // NOTE: avoid name clash with utility function trim()! @@ -75,9 +75,9 @@ function doPrintout (full) { } if (horizontal) { - echo (' points(1:length(data_list) ~ sapply(data_list, ' + mean_fun + '), pch=' + pch_mean + ', cex = ' + getValue ("cex_sd_mean") + getValue ("sd_mean_color.code.printout") + ') #calculates the mean for all data and adds a point at the corresponding position\n'); + echo (' points(1:length(data_list) ~ sapply(data_list, ' + mean_fun + '), pch=' + pch_mean + ', cex = ' + getValue ("cex_sd_mean") + getValue ("sd_mean_color.code.printout") + ') '); comment ('calculates the mean for all data and adds a point at the corresponding position'); } else { - echo (' points(sapply(data_list, ' + mean_fun + '), pch=' + pch_mean + ', cex = ' + getValue ("cex_sd_mean") + getValue ("sd_mean_color.code.printout") + ') #calculates the mean for all data and adds a point at the corresponding position\n'); + echo (' points(sapply(data_list, ' + mean_fun + '), pch=' + pch_mean + ', cex = ' + getValue ("cex_sd_mean") + getValue ("sd_mean_color.code.printout") + ') '); comment ('calculates the mean for all data and adds a point at the corresponding position'); } } diff --git a/rkward/plugins/plots/cor_graph.js b/rkward/plugins/plots/cor_graph.js index ea70b95..47abc3a 100644 --- a/rkward/plugins/plots/cor_graph.js +++ b/rkward/plugins/plots/cor_graph.js @@ -37,7 +37,7 @@ function doPrintout (full) { echo ('\n'); if (full) { - echo ('rk.header ("Correlation Matrix Plot", parameters=list ("Method", "' + getValue ("method") + '", "Exclusion", "' + getValue ("use") + '", "Precision", "' + getValue ("digits") + ' digits", "Scale text", "' + getValue ("scale") + '"))\n'); + new Header (i18n ("Correlation Matrix Plot")).addFromUI ("method").addFromUI ("use").addFromUI ("digits").addFromUI ("scale").print (); echo ('\n'); echo ('rk.graph.on ()\n'); } @@ -48,7 +48,7 @@ function doPrintout (full) { if (full) { echo ('rk.graph.off ()\n'); echo ('\n'); - echo ('rk.print("Legend:\\t\'***\': p < 0.001 -- \'**\': p < 0.01 -- \'*\': p < 0.05 -- \'.\'\': p < 0.1")\n'); + echo ('rk.print(' + i18n ("Legend:") + '\\t\'***\': p < 0.001 -- \'**\': p < 0.01 -- \'*\': p < 0.05 -- \'.\'\': p < 0.1")\n'); } } diff --git a/rkward/plugins/plots/cor_graph.xml b/rkward/plugins/plots/cor_graph.xml index 5bde111..99995a0 100644 --- a/rkward/plugins/plots/cor_graph.xml +++ b/rkward/plugins/plots/cor_graph.xml @@ -3,12 +3,12 @@ <code file="cor_graph.js" /> <help file="cor_graph.rkh" /> - <dialog label="Correlation Matrix Plot" > + <dialog label="Correlation Matrix Plot" > <tabbook> <tab label="Variables" id="tab_variables"> <row> <varselector id="vars"/> - <column> + <column> <varslot type="numeric" min_vars="1" multi="true" id="x" source="vars" required="true" label="variable(s):"/> <preview id="preview"/> </column> @@ -24,7 +24,7 @@ <option value="complete.obs" label="whole cases"/> <option value="pairwise.complete.obs" label="pairwise" checked="true"/> </radio> - <spinbox id="digits" label="Precision" type="integer" min="0" max="5" initial="3"/> + <spinbox id="digits" label="Precision (digits)" type="integer" min="0" max="5" initial="3"/> <checkbox id="scale" label="Scale text" value="TRUE" value_unchecked="FALSE" checked="true"><!-- i18n: Should text be scaled? --></checkbox> </tab> </tabbook> diff --git a/rkward/plugins/plots/density_plot.js b/rkward/plugins/plots/density_plot.js index 3b0334e..f619c49 100644 --- a/rkward/plugins/plots/density_plot.js +++ b/rkward/plugins/plots/density_plot.js @@ -36,17 +36,19 @@ function doPrintout (full) { density_call += ", adjust=" + adjust + ", kern=\"" + kern + "\", n=" + resolution + ", " + narm + ")"; var title = ""; - if (dodensity_plot) title = "Density Plot"; - else title = "Highest density regions"; + if (dodensity_plot) title = i18n ("Density Plot"); + else title = i18n ("Highest density regions"); if (full) { - echo ('rk.header ("' + title + '", list ("Variable", rk.get.description (' + x + ')'); - if (bw != "") { - echo (', "Band Width", "'); - echo (bw); - echo ('"'); - } - echo (', "Adjust", ' + adjust + ', "Remove Missing Values", ' + narm + ', "Length", length (' + x + '), "Resolution", ' + resolution + ', "Smoothing Kernel", "' + kern + '"))\n'); + header = new Header (title); + header.add (i18n ("Variable"), noquote ('rk.get.description (' + x + ')')); + header.add (i18n ("Length"), noquote ('length (' + x + ')')); + header.addFromUI ("adjust"); + header.addFromUI ("narm"); + header.addFromUI ("n"); + header.addFromUI ("kern"); + if (bw != "") header.addFromUI ("bw"); + header.print (); echo ('\n'); echo ('rk.graph.on ()\n'); } diff --git a/rkward/plugins/plots/dotchart.js b/rkward/plugins/plots/dotchart.js index c33fc79..35dd9ae 100644 --- a/rkward/plugins/plots/dotchart.js +++ b/rkward/plugins/plots/dotchart.js @@ -11,7 +11,7 @@ function doPrintout (full) { var names_mode = getValue ("names_mode"); var tabulate = getValue ("tabulate.checked"); - var main_header = '"Variable"=rk.get.description (' + vars + ')'; + var main_header = i18n ("Variable") + '=rk.get.description (' + vars + ')'; if (tabulate) main_header = getValue ('tabulate_options.parameters'); var limit = getValue ("limit.checked"); @@ -22,11 +22,11 @@ function doPrintout (full) { if (tabulate) { echo (getValue ('tabulate_options.code.calculate')); - echo ('n <- names (x); x <- as.numeric (x); names (x) <- n # dotchart() is somewhat picky about data type\n'); + echo ('n <- names (x); x <- as.numeric (x); names (x) <- n '); comment ('dotchart() is somewhat picky about data type'); } else { echo ('x <- ' + getValue ("x") + '\n'); echo ('if (!is.numeric (x)) {\n'); - echo (' warning ("Data is not numeric, but proceeding as requested.\\nDid you forget to check the tabulate option?")\n'); + echo (' warning (' + i18n ("Data is not numeric, but proceeding as requested.\\nDid you forget to check the tabulate option?") + ')\n'); echo ('}\n'); } @@ -36,7 +36,7 @@ function doPrintout (full) { echo ('\n'); if (full) { - echo ('rk.header ("Dot chart", parameters=list (' + main_header + limit_header + '))\n'); + echo ('rk.header (' + i18n ("Dot chart") + ', parameters=list (' + main_header + limit_header + '))\n'); echo ('\n'); echo ('rk.graph.on ()\n'); } diff --git a/rkward/plugins/plots/ecdf_plot.js b/rkward/plugins/plots/ecdf_plot.js index 62e4e3b..5c01df0 100644 --- a/rkward/plugins/plots/ecdf_plot.js +++ b/rkward/plugins/plots/ecdf_plot.js @@ -21,7 +21,10 @@ function doPrintout (full) { var x = getValue ("x"); if (full) { - echo ('rk.header ("Empirical Cumulative Distribution Function", list ("Variable", rk.get.description (' + x + '), "Minimum", yrange[1], "Maximum", yrange[2]))\n'); + new Header (i18n ("Empirical Cumulative Distribution Function")) + .add (i18n ("Variable"), noquote ('rk.get.description (' + x + ')')) + .add (i18n ("Minimum"), noquote ("yrange[1]")) + .add (i18n ("Maximum"), noquote ("yrange[2]")).print (); echo ('\n'); echo ('rk.graph.on ()\n'); } diff --git a/rkward/plugins/plots/histogram.js b/rkward/plugins/plots/histogram.js index eff6bcb..2334843 100644 --- a/rkward/plugins/plots/histogram.js +++ b/rkward/plugins/plots/histogram.js @@ -16,19 +16,10 @@ function doPrintout (full) { var x = getValue ("x"); if (full) { - echo ('rk.header ("Histogram", list ("Variable", rk.get.description (' + x + ') '); + echo ('rk.header (' + i18n ("Histogram") + ', list (' + i18n ("Variable") + '=rk.get.description (' + x + ')' + getValue ("histogram_opt.code.preprocess") + '))\n'); if ((densityscaled) && getValue ("density")) { - echo (', "Density bandwidth", "'); - echo (bw); - echo ('", "Density adjust", '); - echo (adjust); - echo (', "Density resolution", '); - echo (n); - echo (', "Density Remove missing values", '); - echo (narm); - echo (' '); + new Header (i18n ("Density curve", 3)).addFromUI ("bw").addFromUI ("adjust").addFromUI ("n").addFromUI ("narm").print (); } - echo (' ' + getValue ("histogram_opt.code.preprocess") + '))\n'); echo ('\n'); echo ('rk.graph.on ()\n'); } diff --git a/rkward/plugins/plots/histogram_options.js b/rkward/plugins/plots/histogram_options.js index 62bc1f6..afcf73d 100644 --- a/rkward/plugins/plots/histogram_options.js +++ b/rkward/plugins/plots/histogram_options.js @@ -6,47 +6,35 @@ var headeroptions; function makeCodes () { histcalcoptions = ", breaks="; histplotoptions = ""; - headeroptions = ""; var varname = getValue ("varname"); var histbreaks = getValue ("histbreaksFunction"); - headeroptions += ', "Break points", "'; + var header = new Header (); + var bp = i18n ("Break points"); if (histbreaks == "cells") { histcalcoptions += getValue ("histbreaks_ncells"); - headeroptions += 'Approximately ' + getValue ("histbreaks_ncells") + ' cells"'; + header.add (bp, i18n ("Approximately %1 cells", getValue ("histbreaks_ncells"))); } else if (histbreaks == "int") { histcalcoptions += "seq (floor (min (" + varname + ", na.rm=TRUE))-0.5, ceiling (max (" + varname + ", na.rm=TRUE))+0.5)"; - headeroptions += 'Integers"'; + header.add (bp, i18n ("Integers")); } else if (histbreaks == "vec") { histcalcoptions += "(function(x) {y = extendrange(x,f=0.1); seq(from=y[1], to=y[2], length=" + getValue ("histbreaks_veclength") + ")})(" + varname + ")"; - headeroptions += 'Equally spaced vector of length ' + getValue ("histbreaks_veclength") + '"'; + header.add (bp, i18n ("Equally spaced vector of length %1", getValue ("histbreaks_veclength"))); } else { histcalcoptions += "\"" + histbreaks + "\""; - headeroptions += histbreaks + '"'; + header.add (bp, histbreaks); } - var right = getValue ("rightclosed"); - if (!right) { - headeroptions += ', "Right closed", "FALSE"'; - histcalcoptions += ", right=FALSE"; - } else { - headeroptions += ', "Right closed", "TRUE"'; - } - - var inclowest = getValue ("include_lowest"); - if (!inclowest) { - headeroptions += ', "Include in lowest cell", "FALSE"'; - histcalcoptions += ", include.lowest=FALSE"; - } else { - headeroptions += ', "Include in lowest cell", "TRUE"'; - } + if (!getBoolean ("rightclosed")) histcalcoptions += ", right=FALSE"; + header.addFromUI ("rightclosed"); + if (!getBoolean ("include_lowest")) histcalcoptions += ", include.lowest=FALSE"; + header.addFromUI ("include_lowest"); - var freq = getValue ("freq"); - if (!freq) { + if (!getBoolean ("freq")) { histplotoptions += ", freq=FALSE"; - headeroptions += ', "Scale", "Density"'; + header.add (i18n ("Scale"), i18n ("Density")); } else { - headeroptions += ', "Scale", "Frequency"'; + header.add (i18n ("Scale"), i18n ("Frequency")); } var addbars = getValue ("addtoplot"); @@ -74,6 +62,7 @@ function makeCodes () { if (getValue ("usefillcol")) histfillcol = getValue ("histfillcol.code.printout"); histplotoptions += histbordercol + histfillcol; + headeroptions = ", " + header.extractParameters (); } function preprocess () { diff --git a/rkward/plugins/plots/pareto.js b/rkward/plugins/plots/pareto.js index 3510961..4ed891c 100644 --- a/rkward/plugins/plots/pareto.js +++ b/rkward/plugins/plots/pareto.js @@ -7,7 +7,7 @@ function calculate () { echo ('x <- ' + getValue ("x") + '\n'); echo ('title <- rk.get.description (' + getValue ("x") + ')\n'); echo ('if (!is.numeric (x)) {\n'); - echo (' warning ("Data is not numeric, but proceeding as requested.\\nDid you forget to check the tabulate option?")\n'); + echo (' warning (' + i18n ("Data is not numeric, but proceeding as requested.\\nDid you forget to check the tabulate option?") + ')\n'); echo ('}\n'); } else { echo (getValue ('tabulate_options.code.calculate')); @@ -32,9 +32,9 @@ function doPrintout (full) { var descriptives = getValue ("descriptives")=="TRUE"; if (full) { - echo ('rk.header ("Pareto chart", parameters=list ('); + echo ('rk.header (' + i18n ("Pareto chart") + ', parameters=list ('); if (getValue ("tabulate.checked")) echo (getValue ('tabulate_options.parameters')); - else echo ('"Variable"=title'); + else echo (i18n ("Variable") + '=title'); if (getValue ("limit.checked")) echo (', ' + getValue ('limit_options.parameters')); echo ('))\n'); echo ('\n'); diff --git a/rkward/plugins/plots/piechart.js b/rkward/plugins/plots/piechart.js index 2b091d8..6b46155 100644 --- a/rkward/plugins/plots/piechart.js +++ b/rkward/plugins/plots/piechart.js @@ -10,7 +10,7 @@ function doPrintout (full) { var vars = getValue ("x"); var tabulate = getValue ("tabulate.checked"); - var main_header = '"Variable"=rk.get.description (' + vars + ')'; + var main_header = i18n ("Variable") + '=rk.get.description (' + vars + ')'; if (tabulate) main_header = getValue ('tabulate_options.parameters'); var limit = getValue ("limit.checked"); @@ -24,11 +24,11 @@ function doPrintout (full) { var density_inc = getValue ("density_inc"); var col = getValue ("colors"); var clockwise = getValue ("clockwise"); - var clockwise_header = ""; + var clockwise_header = ", " + i18n ("Orientation") + '='; if (clockwise) { - clockwise_header = ', "Orientation"="Clockwise"'; + clockwise_header += i18n ("Clockwise"); } else { - clockwise_header = ', "Orientation"="Counter clockwise"'; + clockwise_header += i18n ("Counter clockwise"); } var names_mode = getValue ("names_mode"); @@ -49,7 +49,7 @@ function doPrintout (full) { } else { echo ('x <- ' + getValue ("x") + '\n'); echo ('if (!is.numeric (x)) {\n'); - echo (' warning ("Data is not numeric, but proceeding as requested.\\nDid you forget to check the tabulate option?")\n'); + echo (' warning (' + i18n ("Data is not numeric, but proceeding as requested.\\nDid you forget to check the tabulate option?") + ')\n'); echo ('}\n'); } @@ -59,7 +59,7 @@ function doPrintout (full) { echo ('\n'); if (full) { - echo ('rk.header ("Pie chart", parameters=list (' + main_header + limit_header + clockwise_header + '))\n'); + echo ('rk.header (' + i18n ("Pie chart") + ', parameters=list (' + main_header + limit_header + clockwise_header + '))\n'); echo ('\n'); echo ('rk.graph.on ()\n'); } diff --git a/rkward/plugins/plots/plot.js b/rkward/plugins/plots/plot.js index 1bc6f34..23a7f23 100644 --- a/rkward/plugins/plots/plot.js +++ b/rkward/plugins/plots/plot.js @@ -14,8 +14,7 @@ function doPrintout (full) { } if (full) { - - echo ('rk.header ("Generic Plot")\n'); + new Header (i18n ("Generic Plot")).print (); echo ('rk.graph.on ()\n'); } diff --git a/rkward/plugins/plots/scatterplot.js b/rkward/plugins/plots/scatterplot.js index 84b6dc1..6e5ccbe 100644 --- a/rkward/plugins/plots/scatterplot.js +++ b/rkward/plugins/plots/scatterplot.js @@ -1,9 +1,6 @@ -var x; -var y; - function calculate () { - x = str_replace ("\n", ",", trim (getValue ("x"))) ; - y = str_replace ("\n", ",", trim (getValue ("y"))) ; + var x = getList ("x").join (","); + var y = getList ("y").join (","); var type = ""; if (getValue ("manual_type.numeric")) { @@ -16,16 +13,16 @@ function calculate () { var cex = getValue ("cex"); // input - echo ('Xvars <- list(' + x + ')\n'); - echo ('Yvars <- list(' + y + ')\n'); + echo ('Xvars <- rk.list(' + x + ')\n'); + echo ('Yvars <- rk.list(' + y + ')\n'); echo ('\n'); // verification (is this needed?) ?> echo ('if (length(Xvars) != length(Yvars)) {\n'); - echo (' stop("Unequal number of X and Y variables given")\n'); + echo (' stop(' + i18n ("Unequal number of X and Y variables given") + ')\n'); echo ('}\n'); - echo ('# find range of X/Y values needed\n'); + comment ('find range of X/Y values needed'); echo ('Xrange <- range (c (Xvars), na.rm=TRUE)\n'); echo ('Yrange <- range (c (Yvars), na.rm=TRUE)\n'); echo ('\n'); @@ -46,9 +43,9 @@ function preview () { function doPrintout (full) { if (full) { - echo ('rk.header ("Scatterplot", parameters = list (\n'); - echo (' "X variables"=paste (rk.get.description (' + x + '), collapse=", "),\n'); - echo (' "Y variables"=paste (rk.get.description (' + y + '), collapse=", ")))\n'); + new Header (i18n ("Scatterplot")) + .add (i18n ("X variables"), noquote ('paste (names (Xvars), collapse=", ")')) + .add (i18n ("Y variables"), noquote ('paste (names (Yvars), collapse=", ")')).print (); echo ('\n'); echo ('rk.graph.on()\n'); echo ('\n'); diff --git a/rkward/plugins/plots/scatterplot_matrix.js b/rkward/plugins/plots/scatterplot_matrix.js index 1294a2f..653009a 100644 --- a/rkward/plugins/plots/scatterplot_matrix.js +++ b/rkward/plugins/plots/scatterplot_matrix.js @@ -13,12 +13,12 @@ function preview () { } function doPrintout (full) { - var vars = trim (getValue ("x")).replace (/\n/g, ","); + var vars = getList ("x").join (","); echo ('data <- data.frame (' + vars + ')\n'); echo ('\n'); if (full) { - echo ('rk.header ("Scatterplot Matrix", parameters=list ("Diagonal Panels", "' + getValue("diag") + '", "Plot points", "' + getValue ("plot_points") + '", "Smooth", "' + getValue ("smooth") + '", "Ellipses", "' + getValue ("ellipse") + ' at 0.5 and 0.9 levels."))\n'); + new Header (i18n ("Scatterplot Matrix")).addFromUI ("diag").addFromUI ("plot_points").addFromUI ("smooth").addFromUI ("ellipse").print (); echo ('\n'); echo ('rk.graph.on ()\n'); } diff --git a/rkward/plugins/plots/scatterplot_matrix.xml b/rkward/plugins/plots/scatterplot_matrix.xml index edc9502..ae39ddc 100644 --- a/rkward/plugins/plots/scatterplot_matrix.xml +++ b/rkward/plugins/plots/scatterplot_matrix.xml @@ -23,8 +23,8 @@ <option value="none" label="No plot"/> </radio> <checkbox id="plot_points" label="Plot points" value="TRUE" value_unchecked="FALSE" checked="true"/> - <checkbox id="smooth" label="Smooth" value="TRUE" value_unchecked="FALSE" checked="false"/> - <checkbox id="ellipse" label="Ellipse" value="TRUE" value_unchecked="FALSE" checked="false"/> + <checkbox id="smooth" label="Plot smooth" value="TRUE" value_unchecked="FALSE" checked="false"/> + <checkbox id="ellipse" label="Plot data concentration ellipses" value="TRUE" value_unchecked="FALSE" checked="false"/> </tab> </tabbook> </dialog> diff --git a/rkward/plugins/plots/sieve_plot.js b/rkward/plugins/plots/sieve_plot.js index b188f68..553d753 100644 --- a/rkward/plugins/plots/sieve_plot.js +++ b/rkward/plugins/plots/sieve_plot.js @@ -1,19 +1,7 @@ -/* ------- This file generated by php2js from PHP code. -------- -Please check this file by hand, and remove this notice, afterwards. -Messages: -Note: Control statement without braces. This is bad style. -Note: Control statement without braces. This is bad style. - ----------------------------- */ - -// globals -var undefined; - function preprocess () { echo ('require(vcd)\n'); } - function printout () { doPrintout (true); } @@ -27,12 +15,10 @@ function doPrintout (full) { var vars = getValue ("x"); var shade = getValue ("shade"); var sievetype = getValue ("sievetype"); - { - echo ('x <- ' + vars); - } - echo ('\n'); + + echo ('x <- ' + vars + '\n'); if (full) { - echo ('rk.header ("Extended Sieve Plot", parameters=list ("Variable", rk.get.description (' + vars + '), "shade", ' + shade + '))\n'); + new Header (i18n ("Extended Sieve Plot")).add (i18n ("Variable"), noquote ('rk.get.description (' + vars + ')')).addFromUI ("shade").print (); echo ('\n'); echo ('rk.graph.on ()\n'); } @@ -48,4 +34,3 @@ function doPrintout (full) { echo ('rk.graph.off ()\n'); } } - diff --git a/rkward/plugins/plots/stem.js b/rkward/plugins/plots/stem.js index a138660..59b87ad 100644 --- a/rkward/plugins/plots/stem.js +++ b/rkward/plugins/plots/stem.js @@ -4,8 +4,11 @@ function printout () { var width = getValue ("width"); var atom = getValue ("atom"); - echo ('rk.header ("Stem-and-Leaf Plot",\n'); - echo (' parameters=list ("Variable", paste (rk.get.description (' + x + ')), "Plot Length", "' + scale + '","Plot Width", "' + width + '", "Tolerance", "' + atom + '"))\n'); + new Header (i18n ("Stem-and-Leaf Plot")) + .add (i18n ("Variable"), noquote ('paste (rk.get.description (' + x + '))')) + .addFromUI ("scale") + .addFromUI ("width") + .addFromUI ("atom").print (); echo ('\n'); echo ('rk.print.literal(capture.output(stem(' + x + ', scale = ' + scale + ', width = ' + width + ', atom = ' + atom + ')))\n'); } diff --git a/rkward/plugins/plots/stem.xml b/rkward/plugins/plots/stem.xml index ab32e77..066ece4 100644 --- a/rkward/plugins/plots/stem.xml +++ b/rkward/plugins/plots/stem.xml @@ -15,9 +15,9 @@ </row> </tab> <tab id="tab_options" label="Options"> - <spinbox type="real" id="scale" label="scale" initial="1"/> - <spinbox type="real" id="width" label="width" initial="80"/> - <spinbox type="real" id="atom" label="atom" initial="0.00000001"/> + <spinbox type="real" id="scale" label="Plot length (scale)" initial="1"/> + <spinbox type="real" id="width" label="Plot width" initial="80"/> + <spinbox type="real" id="atom" label="Tolerance" initial="0.00000001"/> </tab> </tabbook> </dialog> diff --git a/rkward/plugins/plots/stripchart_plot.js b/rkward/plugins/plots/stripchart_plot.js index 7a5610a..e7027da 100644 --- a/rkward/plugins/plots/stripchart_plot.js +++ b/rkward/plugins/plots/stripchart_plot.js @@ -8,22 +8,25 @@ function preview () { function doPrintout (full) { var opts = ""; - var params = ""; var x = getValue ("x"); var g = getValue ("g"); var method = '"' + getValue ("method") + '"'; if (method == "\"jitter\"") { opts += ", jitter = " + getValue ("jitter"); - params += ", \"Jitter\" = " + getValue ("jitter"); } else if (method == "\"stack\"") { opts += ", offset = " + getValue ("offset"); - params += ", \"Offset\" = " + getValue ("offset"); } - var orientation = getValue ("orientation"); - if (orientation == "Vertical") opts += ", vertical = TRUE"; + if (getValue ("orientation") == "Vertical") opts += ", vertical = TRUE"; if (full) { - echo ('rk.header ("Stripchart", list ("Variable"=rk.get.description (' + x + '), "Group"=rk.get.description (' + g + '), "Method"=' + method + params + ', "Orientation"="' + orientation + '"))\n'); + header = new Header (i18n ("Stripchart")) + .add (i18n ("Variable"), noquote ('rk.get.description (' + x + ')')) + .add (i18n ("Group"), noquote ('rk.get.description (' + g + ')')) + .addFromUI ("method"); + if (method == "\"jitter\"") header.addFromUI ("jitter"); + else if (method == "\"stack\"") header.addFromUI ("offset"); + header.addFromUI ("orientation"); + header.print (); echo ('\n'); echo ('rk.graph.on ()\n'); } diff --git a/rkward/plugins/plots/stripchart_plot.xml b/rkward/plugins/plots/stripchart_plot.xml index 865a1b4..6e751a2 100644 --- a/rkward/plugins/plots/stripchart_plot.xml +++ b/rkward/plugins/plots/stripchart_plot.xml @@ -36,7 +36,7 @@ <option value="stack" label="Stack"/> </radio> <spinbox label="Jitter" id="jitter" initial="0.1" /> - <spinbox label="offset" id="offset" initial="0.33333333333" /> + <spinbox label="Offset" id="offset" initial="0.33333333333" /> <stretch/> </column> <column> diff --git a/rkward/scriptbackends/common.js b/rkward/scriptbackends/common.js index d3c30e6..bc2e4ca 100644 --- a/rkward/scriptbackends/common.js +++ b/rkward/scriptbackends/common.js @@ -124,6 +124,15 @@ Header = function (title, level) { this.print = function (indentation) { makeHeaderCode (this.title, this.parameters, this.level, indentation); } + this.extractParameters = function (indentation) { + if (typeof (indentation) == 'undefined') indentation = ""; + var ret = ""; + for (var p = 0; p < this.parameters.length; p += 2) { + if (p) ret += ",\n" + indentation + "\t"; + ret += quote (this.parameters[p]) + "=" + quote (this.parameters[p+1]); + } + return ret; + } } getValue = function (id) { diff --git a/tests/plots/boxplot.rkcommands.R b/tests/plots/boxplot.rkcommands.R index b3eda95..54a4627 100644 --- a/tests/plots/boxplot.rkcommands.R +++ b/tests/plots/boxplot.rkcommands.R @@ -1,23 +1,23 @@ local({ ## Print result -data_list <- rk.list (women[["weight"]], women[["height"]]) #convert single sample variables to list -rk.header ("Boxplot", list ("Variable(s)", paste (names (data_list), collapse=", "))) +data_list <- rk.list (women[["weight"]], women[["height"]]) # convert single sample variables to list +rk.header ("Boxplot", parameters=list("Variable(s)"=paste (names (data_list), collapse=", "))) rk.graph.on() try ({ - boxplot (data_list, notch = FALSE, outline = TRUE, horizontal = FALSE) #actual boxplot function - points(sapply(data_list, mean, na.rm=TRUE), pch=15, cex = 1.00, col="blue") #calculates the mean for all data and adds a point at the corresponding position + boxplot (data_list, notch = FALSE, outline = TRUE, horizontal = FALSE) # actual boxplot function + points(sapply(data_list, mean, na.rm=TRUE), pch=15, cex = 1.00, col="blue") # calculates the mean for all data and adds a point at the corresponding position }) rk.graph.off () }) local({ ## Print result -data_list <- rk.list (women[["weight"]], women[["height"]]) #convert single sample variables to list -rk.header ("Boxplot", list ("Variable(s)", paste (names (data_list), collapse=", "))) +data_list <- rk.list (women[["weight"]], women[["height"]]) # convert single sample variables to list +rk.header ("Boxplot", parameters=list("Variable(s)"=paste (names (data_list), collapse=", "))) rk.graph.on() try ({ - boxplot (data_list, notch = FALSE, outline = TRUE, horizontal = FALSE) #actual boxplot function - geo_mean <- function (x) {prod(na.omit(x))^(1/length(na.omit(x)))} #Calculate geometric mean - points(sapply(data_list, geo_mean), pch=15, cex = 1.00, col="blue") #calculates the mean for all data and adds a point at the corresponding position + boxplot (data_list, notch = FALSE, outline = TRUE, horizontal = FALSE) # actual boxplot function + geo_mean <- function (x) {prod(na.omit(x))^(1/length(na.omit(x)))} # Calculate geometric mean + points(sapply(data_list, geo_mean), pch=15, cex = 1.00, col="blue") # calculates the mean for all data and adds a point at the corresponding position sd_low <- (sapply(data_list, mean, na.rm = TRUE)) - (sapply(data_list,sd,na.rm = TRUE)) sd_high <- (sapply(data_list, mean, na.rm = TRUE)) + (sapply(data_list,sd,na.rm = TRUE)) points(sd_low, pch=3, cex = 1.00, col="blue") diff --git a/tests/plots/boxplot_grouped.rkcommands.R b/tests/plots/boxplot_grouped.rkcommands.R index fb32a93..78ce053 100644 --- a/tests/plots/boxplot_grouped.rkcommands.R +++ b/tests/plots/boxplot_grouped.rkcommands.R @@ -1,26 +1,28 @@ local({ ## Print result groups <- rk.list (warpbreaks[["tension"]], warpbreaks[["wool"]]) -data_list <- split (warpbreaks[["breaks"]], groups) #split sample by grouping variables -rk.header ("Boxplot", list ("Outcome variable", rk.get.description (warpbreaks[["breaks"]]), "Grouping variable(s)", paste (names (groups), collapse=", "))) +data_list <- split (warpbreaks[["breaks"]], groups) # split sample by grouping variables +rk.header ("Boxplot", parameters=list("Outcome variable"=rk.get.description (warpbreaks[["breaks"]]), + "Grouping variable(s)"=paste (names (groups), collapse=", "))) rk.graph.on() try ({ - boxplot (data_list, notch = FALSE, outline = FALSE, horizontal = TRUE) #actual boxplot function + boxplot (data_list, notch = FALSE, outline = FALSE, horizontal = TRUE) # actual boxplot function }) rk.graph.off () }) local({ ## Print result groups <- rk.list (warpbreaks[["tension"]], warpbreaks[["wool"]]) -data_list <- split (warpbreaks[["breaks"]], groups) #split sample by grouping variables +data_list <- split (warpbreaks[["breaks"]], groups) # split sample by grouping variables # adjust width and position of boxes to achieve dodging dodge_size <- nlevels (interaction (warpbreaks[["tension"]])) box_width <- 0.80 / dodge_size box_positions <- (rep (1:(length (data_list) / dodge_size), each=dodge_size) + (1:dodge_size)*(box_width)) -rk.header ("Boxplot", list ("Outcome variable", rk.get.description (warpbreaks[["breaks"]]), "Grouping variable(s)", paste (names (groups), collapse=", "))) +rk.header ("Boxplot", parameters=list("Outcome variable"=rk.get.description (warpbreaks[["breaks"]]), + "Grouping variable(s)"=paste (names (groups), collapse=", "))) rk.graph.on() try ({ - boxplot (data_list, boxwex=box_width, at=box_positions, xlim=c(min(box_positions)-box_width, max(box_positions)+box_width), notch = FALSE, outline = FALSE, horizontal = TRUE) #actual boxplot function + boxplot (data_list, boxwex=box_width, at=box_positions, xlim=c(min(box_positions)-box_width, max(box_positions)+box_width), notch = FALSE, outline = FALSE, horizontal = TRUE) # actual boxplot function }) rk.graph.off () }) diff --git a/tests/plots/density_plot.rkcommands.R b/tests/plots/density_plot.rkcommands.R index 41b0e96..4e2e24e 100644 --- a/tests/plots/density_plot.rkcommands.R +++ b/tests/plots/density_plot.rkcommands.R @@ -2,7 +2,13 @@ local({ ## Prepare require(hdrcde) ## Print result -rk.header ("Highest density regions", list ("Variable", rk.get.description (women[["height"]]), "Band Width", "nrd0", "Adjust", 1.00, "Remove Missing Values", na.rm=TRUE, "Length", length (women[["height"]]), "Resolution", 512.00, "Smoothing Kernel", "gaussian")) +rk.header ("Highest density regions", parameters=list("Variable"=rk.get.description (women[["height"]]), + "Length"=length (women[["height"]]), + "Adjust Bandwidth"="1.00", + "Remove Missing Values"="yes", + "Resolution"="512.00", + "Smoothing Kernel"="gaussian (default)", + "Bandwidth"="nrd0")) rk.graph.on () try ({ diff --git a/tests/plots/density_plot.rkout b/tests/plots/density_plot.rkout index 43802f5..97a620d 100644 --- a/tests/plots/density_plot.rkout +++ b/tests/plots/density_plot.rkout @@ -1,19 +1,12 @@ <h1>Highest density regions</h1> <h2>Parameters</h2> -<ul><li>: Variable</li> -<li>: height</li> -<li>: Band Width</li> -<li>: nrd0</li> -<li>: Adjust</li> -<li>: 1</li> -<li>: Remove Missing Values</li> -<li>na.rm: TRUE</li> -<li>: Length</li> -<li>: 15</li> -<li>: Resolution</li> -<li>: 512</li> -<li>: Smoothing Kernel</li> -<li>: gaussian</li> +<ul><li>Variable: height</li> +<li>Length: 15</li> +<li>Adjust Bandwidth: 1.00</li> +<li>Remove Missing Values: yes</li> +<li>Resolution: 512.00</li> +<li>Smoothing Kernel: gaussian (default)</li> +<li>Bandwidth: nrd0</li> </ul> DATE<br /> <img src="graph.png" width="480" height="480"><br> diff --git a/tests/plots/ecdf_plot.rkcommands.R b/tests/plots/ecdf_plot.rkcommands.R index a95343e..6e92a6e 100644 --- a/tests/plots/ecdf_plot.rkcommands.R +++ b/tests/plots/ecdf_plot.rkcommands.R @@ -4,7 +4,9 @@ yrange <- range (swiss[["Catholic"]], na.rm=TRUE) data.mean <- mean (swiss[["Catholic"]], na.rm=TRUE) data.sd <- sd (swiss[["Catholic"]], na.rm=TRUE) ## Print result -rk.header ("Empirical Cumulative Distribution Function", list ("Variable", rk.get.description (swiss[["Catholic"]]), "Minimum", yrange[1], "Maximum", yrange[2])) +rk.header ("Empirical Cumulative Distribution Function", parameters=list("Variable"=rk.get.description (swiss[["Catholic"]]), + "Minimum"=yrange[1], + "Maximum"=yrange[2])) rk.graph.on () try ({ diff --git a/tests/plots/histogram.rkcommands.R b/tests/plots/histogram.rkcommands.R index ea012b1..27e11f7 100644 --- a/tests/plots/histogram.rkcommands.R +++ b/tests/plots/histogram.rkcommands.R @@ -1,6 +1,13 @@ local({ ## Print result -rk.header ("Histogram", list ("Variable", rk.get.description (swiss[["Education"]]) , "Density bandwidth", "nrd", "Density adjust", 4.00, "Density resolution", 512.00, "Density Remove missing values", na.rm=TRUE , "Break points", "Equally spaced vector of length 6", "Right closed", "TRUE", "Include in lowest cell", "TRUE", "Scale", "Density")) +rk.header ("Histogram", list ("Variable"=rk.get.description (swiss[["Education"]]), "Break points"="Equally spaced vector of length 6", + "Right closed"="yes", + "Include in lowest cell"="yes", + "Scale"="Density")) +rk.header ("Density curve", parameters=list("Bandwidth"="nrd", + "Adjust Bandwidth"="4.00", + "resolution"="512.00", + "Remove Missing Values"="yes")) rk.graph.on () try ({ diff --git a/tests/plots/histogram.rkout b/tests/plots/histogram.rkout index a3e1ec5..7f7603c 100644 --- a/tests/plots/histogram.rkout +++ b/tests/plots/histogram.rkout @@ -1,23 +1,18 @@ <h1>Histogram</h1> <h2>Parameters</h2> -<ul><li>: Variable</li> -<li>: Education</li> -<li>: Density bandwidth</li> -<li>: nrd</li> -<li>: Density adjust</li> -<li>: 4</li> -<li>: Density resolution</li> -<li>: 512</li> -<li>: Density Remove missing values</li> -<li>na.rm: TRUE</li> -<li>: Break points</li> -<li>: Equally spaced vector of length 6</li> -<li>: Right closed</li> -<li>: TRUE</li> -<li>: Include in lowest cell</li> -<li>: TRUE</li> -<li>: Scale</li> -<li>: Density</li> +<ul><li>Variable: Education</li> +<li>Break points: Equally spaced vector of length 6</li> +<li>Right closed: yes</li> +<li>Include in lowest cell: yes</li> +<li>Scale: Density</li> +</ul> +DATE<br /> +<h1>Density curve</h1> +<h2>Parameters</h2> +<ul><li>Bandwidth: nrd</li> +<li>Adjust Bandwidth: 4.00</li> +<li>resolution: 512.00</li> +<li>Remove Missing Values: yes</li> </ul> DATE<br /> <img src="graph.png" width="480" height="480"><br> diff --git a/tests/plots/scatterplot.rkcommands.R b/tests/plots/scatterplot.rkcommands.R index a0a4d55..5eaa175 100644 --- a/tests/plots/scatterplot.rkcommands.R +++ b/tests/plots/scatterplot.rkcommands.R @@ -1,7 +1,7 @@ local({ ## Compute -Xvars <- list(women[["weight"]],swiss[["Education"]]) -Yvars <- list(women[["height"]],swiss[["Catholic"]]) +Xvars <- rk.list(women[["weight"]],swiss[["Education"]]) +Yvars <- rk.list(women[["height"]],swiss[["Catholic"]]) if (length(Xvars) != length(Yvars)) { stop("Unequal number of X and Y variables given") @@ -15,9 +15,8 @@ col <- rep (c ('black', 'red'), length.out=length (Xvars)); cex <- rep (1, length.out=length (Xvars)); pch <- rep (1, length.out=length (Xvars)); ## Print result -rk.header ("Scatterplot", parameters = list ( - "X variables"=paste (rk.get.description (women[["weight"]],swiss[["Education"]]), collapse=", "), - "Y variables"=paste (rk.get.description (women[["height"]],swiss[["Catholic"]]), collapse=", "))) +rk.header ("Scatterplot", parameters=list("X variables"=paste (names (Xvars), collapse=", "), + "Y variables"=paste (names (Yvars), collapse=", "))) rk.graph.on() diff --git a/tests/plots/scatterplot_matrix.rkcommands.R b/tests/plots/scatterplot_matrix.rkcommands.R index 207ae19..23a0f05 100644 --- a/tests/plots/scatterplot_matrix.rkcommands.R +++ b/tests/plots/scatterplot_matrix.rkcommands.R @@ -4,7 +4,10 @@ require(car) ## Print result data <- data.frame (swiss) -rk.header ("Scatterplot Matrix", parameters=list ("Diagonal Panels", "histogram", "Plot points", "TRUE", "Smooth", "FALSE", "Ellipses", "FALSE at 0.5 and 0.9 levels.")) +rk.header ("Scatterplot Matrix", parameters=list("Diagonal panels"="Histogram", + "Plot points"="yes", + "Plot smooth"="no", + "Plot data concentration ellipses"="no")) rk.graph.on () try (scatterplotMatrix(data, diagonal="histogram", plot.points=TRUE, smooth=FALSE, ellipse=FALSE)) diff --git a/tests/plots/scatterplot_matrix.rkout b/tests/plots/scatterplot_matrix.rkout index 0929c60..07aaaf3 100644 --- a/tests/plots/scatterplot_matrix.rkout +++ b/tests/plots/scatterplot_matrix.rkout @@ -1,9 +1,9 @@ <h1>Scatterplot Matrix</h1> <h2>Parameters</h2> -<ul><li>Diagonal Panels: histogram</li> -<li>Plot points: TRUE</li> -<li>Smooth: FALSE</li> -<li>Ellipses: FALSE at 0.5 and 0.9 levels.</li> +<ul><li>Diagonal panels: Histogram</li> +<li>Plot points: yes</li> +<li>Plot smooth: no</li> +<li>Plot data concentration ellipses: no</li> </ul> DATE<br /> <img src="graph.png" width="480" height="480"><br> diff --git a/tests/plots/stem_leaf_plot.rkcommands.R b/tests/plots/stem_leaf_plot.rkcommands.R index bb7901f..9b4d2b3 100644 --- a/tests/plots/stem_leaf_plot.rkcommands.R +++ b/tests/plots/stem_leaf_plot.rkcommands.R @@ -1,7 +1,9 @@ local({ ## Print result -rk.header ("Stem-and-Leaf Plot", - parameters=list ("Variable", paste (rk.get.description (swiss[["Fertility"]])), "Plot Length", "1.50","Plot Width", "80.00", "Tolerance", "0.01")) +rk.header ("Stem-and-Leaf Plot", parameters=list("Variable"=paste (rk.get.description (swiss[["Fertility"]])), + "Plot length (scale)"="1.50", + "Plot width"="80.00", + "Tolerance"="0.01")) rk.print.literal(capture.output(stem(swiss[["Fertility"]], scale = 1.50, width = 80.00, atom = 0.01))) }) diff --git a/tests/plots/stem_leaf_plot.rkout b/tests/plots/stem_leaf_plot.rkout index 322abdb..9376b7d 100644 --- a/tests/plots/stem_leaf_plot.rkout +++ b/tests/plots/stem_leaf_plot.rkout @@ -1,8 +1,8 @@ <h1>Stem-and-Leaf Plot</h1> <h2>Parameters</h2> <ul><li>Variable: Fertility</li> -<li>Plot Length: 1.50</li> -<li>Plot Width: 80.00</li> +<li>Plot length (scale): 1.50</li> +<li>Plot width: 80.00</li> <li>Tolerance: 0.01</li> </ul> DATE<br /> diff --git a/tests/plots/stripchart.rkcommands.R b/tests/plots/stripchart.rkcommands.R index d9c34be..4b2b483 100644 --- a/tests/plots/stripchart.rkcommands.R +++ b/tests/plots/stripchart.rkcommands.R @@ -1,6 +1,10 @@ local({ ## Print result -rk.header ("Stripchart", list ("Variable"=rk.get.description (warpbreaks[["breaks"]]), "Group"=rk.get.description (warpbreaks[["tension"]]), "Method"="stack", "Offset" = 0.50, "Orientation"="Horizontal")) +rk.header ("Stripchart", parameters=list("Variable"=rk.get.description (warpbreaks[["breaks"]]), + "Group"=rk.get.description (warpbreaks[["tension"]]), + "Treatment of identical values"="Stack", + "Offset"="0.50", + "Orientation"="Horizontal")) rk.graph.on () try ({ diff --git a/tests/plots/stripchart.rkout b/tests/plots/stripchart.rkout index c2d4a8f..72fb199 100644 --- a/tests/plots/stripchart.rkout +++ b/tests/plots/stripchart.rkout @@ -2,8 +2,8 @@ <h2>Parameters</h2> <ul><li>Variable: breaks</li> <li>Group: tension</li> -<li>Method: stack</li> -<li>Offset: 0.5</li> +<li>Treatment of identical values: Stack</li> +<li>Offset: 0.50</li> <li>Orientation: Horizontal</li> </ul> DATE<br /> |
From: Thomas F. <tho...@ru...> - 2015-01-09 14:44:16
|
Git commit 25ea2ab308722289b9c629f5fcba6d381e6a8c21 by Thomas Friedrichsmeier. Committed on 09/01/2015 at 14:43. Pushed by tfry into branch 'master'. Extract messages from plot plugins. M +2 -0 Messages.sh M +1 -1 rkward/plugins/plots.pluginmap M +1 -1 rkward/plugins/plots/barplot.rkh M +1 -1 rkward/plugins/plots/barplot.xml M +1 -1 rkward/plugins/plots/box_plot.rkh M +1 -1 scripts/update_plugin_messages.py http://commits.kde.org/rkward/25ea2ab308722289b9c629f5fcba6d381e6a8c21 diff --git a/Messages.sh b/Messages.sh index 0b36280..5483cdf 100755 --- a/Messages.sh +++ b/Messages.sh @@ -16,4 +16,6 @@ python scripts/update_plugin_messages.py --extract-only --outdir=$podir rkward/p python scripts/update_plugin_messages.py --extract-only --outdir=$podir rkward/plugins/import_export.pluginmap # extract messages from data plugins: >> rkward__data.pot python scripts/update_plugin_messages.py --extract-only --outdir=$podir rkward/plugins/data.pluginmap +# extract messages from data plugins: >> rkward__plots.pot +python scripts/update_plugin_messages.py --extract-only --outdir=$podir rkward/plugins/plots.pluginmap # messages of embedded plugins are extracted implicitly, as part of the above extraction calls: >> rkward__embedded.pot diff --git a/rkward/plugins/plots.pluginmap b/rkward/plugins/plots.pluginmap index 38c1573..39e9e7a 100644 --- a/rkward/plugins/plots.pluginmap +++ b/rkward/plugins/plots.pluginmap @@ -1,6 +1,6 @@ <!DOCTYPE rkpluginmap> -<document base_prefix="plots/" namespace="rkward" id="plots"> +<document base_prefix="plots/" namespace="rkward" id="plots" po_id="plots"> <include file="pluginmap_meta.inc"/> <about name="Plots" diff --git a/rkward/plugins/plots/barplot.rkh b/rkward/plugins/plots/barplot.rkh index 2316bea..8179592 100644 --- a/rkward/plugins/plots/barplot.rkh +++ b/rkward/plugins/plots/barplot.rkh @@ -20,7 +20,7 @@ Choose a matrix, vector or a factor to be plotted. Further options are available <setting id="names_mode">Method for assigning labels to the plot. "default" means, the labels are chosen automatically. If no labels are available, this will generally print the values. The other options allow you to specify the labels as literal string, or as an R statement (e.g. if the names are stored in a different variable in the workspace).</setting> <caption id="tab_options"/> - <setting id="barplot_embed" title="Barplot Options">Since these settings are reused in further plugins, they are documented on a page of their own: See <link href="rkward://component/barplot_embed"/>.</setting> + <setting id="barplot_embed">Since these settings are reused in further plugins, they are documented on a page of their own: See <link href="rkward://component/barplot_embed"/>.</setting> </settings> <related> <ul> diff --git a/rkward/plugins/plots/barplot.xml b/rkward/plugins/plots/barplot.xml index 6c6b1d8..c950616 100644 --- a/rkward/plugins/plots/barplot.xml +++ b/rkward/plugins/plots/barplot.xml @@ -60,7 +60,7 @@ <input id="names_custom" label="Labels (separated by ';')" initial="First label;Second label"/> </tab> <tab label="Options" id="tab_options"> - <embed id="barplot_embed" component="rkward::barplot_embed"/> + <embed id="barplot_embed" component="rkward::barplot_embed" label="Barplot Options"/> <stretch/> </tab> </tabbook> diff --git a/rkward/plugins/plots/box_plot.rkh b/rkward/plugins/plots/box_plot.rkh index b36cf05..ad34db3 100644 --- a/rkward/plugins/plots/box_plot.rkh +++ b/rkward/plugins/plots/box_plot.rkh @@ -16,7 +16,7 @@ Choose numerical data to be plotted. Data can be organized in separate vectors, <setting id="groups">For single(grouped) variable mode: Select one or more vectors by which to group the outcome variable. Group variables should have the same length as the outcome variable.</setting> <setting id="dodges">For single(grouped) variable mode: Doding boxes within one or more groups can be a nice option when the outcome is split by several group variables. This allows you to select, across how many group variables, boxes should be doged ("0" for no dodging, "1" to dodge only the first group variable).</setting> <setting id="names_mode">Method for assigning labels to the plot. "default" means, the labels are chosen automatically. If no labels are available, this will generally print the values. The other options allow you to specify the labels as literal string, or as an R statement (e.g. if the names are stored in a different variable in the workspace).</setting> - <setting id="Box width">Allows to change the width of the boxes, relative to the entire plot.</setting> + <setting id="boxwex">Allows to change the width of the boxes, relative to the entire plot.</setting> <caption id="tab_options"/> <setting id="orientation">Orientation of the plot: horizontal or vertical.</setting> <setting id="notch">Whether to draw notches</setting> diff --git a/scripts/update_plugin_messages.py b/scripts/update_plugin_messages.py index 4deb68b..01d8abb 100755 --- a/scripts/update_plugin_messages.py +++ b/scripts/update_plugin_messages.py @@ -125,7 +125,7 @@ def getFileContext (element, attribute=""): refer_to = "" if ((element.tagName in referring_elements) and (element.hasAttribute ("id"))): if (not (element.getAttribute ("id") in infile["id_labels"])): - sys.stderr.write ("WARNING in " + infile["infile"] + ": Reference to unknown (or unnamed) element id '" + element.getAttribute ("id") + "'\n") + sys.stderr.write ("WARNING in " + infile["infile"] + ", line " + str (getLineOf (element)) + ": Reference to unknown (or unnamed) element id '" + element.getAttribute ("id") + "'\n") else: refer_to = " (refers to element labelled " + quote (infile["id_labels"][element.getAttribute ("id")]) + ")" tag_stack = [getElementShort (element, attribute)] |
From: Thomas F. <tho...@ru...> - 2015-01-08 21:14:53
|
Git commit 9fab0e9422077f8a743119f008bc5f5e70ee90af by Thomas Friedrichsmeier. Committed on 08/01/2015 at 18:58. Pushed by tfry into branch 'master'. Better behavior for <matrix> with (now somewhat mis-named option) fixed_width="true"; add min_rows, and min_columns attributes. M +1 -0 ChangeLog M +10 -2 doc/rkwardplugins/index.docbook M +17 -12 rkward/plugin/rkmatrixinput.cpp M +1 -0 rkward/plugin/rkmatrixinput.h http://commits.kde.org/rkward/9fab0e9422077f8a743119f008bc5f5e70ee90af diff --git a/ChangeLog b/ChangeLog index 6491636..5e5ecfb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +- <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 - Add R function rk.set.plugin.status() to allow further customization of loaded plugins (hiding of individual menu entries) diff --git a/doc/rkwardplugins/index.docbook b/doc/rkwardplugins/index.docbook index 134146b..5d686c7 100644 --- a/doc/rkwardplugins/index.docbook +++ b/doc/rkwardplugins/index.docbook @@ -3068,14 +3068,22 @@ made checkable, thus acting like a simple checkbox at the same time. <listitem><para>Number of columns in the matrix. Has no effect for allow_user_resize_columns="true". <note><para>This can also be controlled by setting the "columns" property".</para></note> (optional, defaults to 2).</para></listitem> </varlistentry> <varlistentry> - <term><parameter>fixed_width</parameter></term> - <listitem><para>Force the GUI element to stay at its initial width. Do not use in combination with matrices, where the number of columns may change in any way. Useful, esp. when creating a vector input element (rows="1"). With this option set to true, no vertical scroll bar will be shown, even in the matrix exceeds the available height (as this would affect the width). (optional, defaults to false).</para></listitem> + <term><parameter>min_rows</parameter></term> + <listitem><para>Minimum number of rows in the matrix. The matrix will refuse shrink below this size. (optional, defaults to 0; see also: <parameter>allow_missings</parameter>.).</para></listitem> + </varlistentry> + <varlistentry> + <term><parameter>min_columns</parameter></term> + <listitem><para>Minimum number of columns in the matrix. The matrix will refuse shrink below this size. (optional, defaults to 0; see also: <parameter>allow_missings</parameter>.).</para></listitem> </varlistentry> <varlistentry> <term><parameter>fixed_height</parameter></term> <listitem><para>Force the GUI element to stay at its initial height. Do not use in combination with matrices, where the number of rows may change in any way. Useful, esp. when creating a vector input element (columns="1"). With this option set to true, no horizontal scroll bar will be shown, even in the matrix exceeds the available width (as this would affect the height). (optional, defaults to false).</para></listitem> </varlistentry> <varlistentry> + <term><parameter>fixed_width</parameter></term> + <listitem><para>Slightly misnamed: Assume the column count will not change. The last (or typically only) column will be stretched to take up the available width. Do not use in combination with matrices, where the number of columns may change in any way. Useful, esp. when creating a vector input element (rows="1"). (optional, defaults to false).</para></listitem> + </varlistentry> + <varlistentry> <term><parameter>horiz_headers</parameter></term> <listitem><para>Strings to ues for the horiztonal header, separated by ";". The header will be hidden, if set to "". (optional, defaults to column number).</para></listitem> </varlistentry> diff --git a/rkward/plugin/rkmatrixinput.cpp b/rkward/plugin/rkmatrixinput.cpp index 1d768dd..001b459 100644 --- a/rkward/plugin/rkmatrixinput.cpp +++ b/rkward/plugin/rkmatrixinput.cpp @@ -34,6 +34,8 @@ RKMatrixInput::RKMatrixInput (const QDomElement& element, RKComponent* parent_component, QWidget* parent_widget) : RKComponent (parent_component, parent_widget) { RK_TRACE (PLUGIN); + is_valid = true; + // get xml-helper XMLHelper *xml = parent_component->xmlHelper (); @@ -59,6 +61,9 @@ RKMatrixInput::RKMatrixInput (const QDomElement& element, RKComponent* parent_co max = FLT_MAX; } + min_rows = xml->getIntAttribute (element, "min_rows", 0, DL_INFO); + min_columns = xml->getIntAttribute (element, "min_columns", 0, DL_INFO); + // Note: string type matrix allows missings, implicitly (treating them as empty strings) allow_missings = xml->getBoolAttribute (element, "allow_missings", false, DL_INFO); if (mode == String) allow_missings = true; @@ -67,8 +72,8 @@ RKMatrixInput::RKMatrixInput (const QDomElement& element, RKComponent* parent_co trailing_rows = allow_user_resize_rows ? 1 : 0; trailing_columns = allow_user_resize_columns ? 1 : 0; - row_count = new RKComponentPropertyInt (this, false, xml->getIntAttribute (element, "rows", 2, DL_INFO)); - column_count = new RKComponentPropertyInt (this, false, xml->getIntAttribute (element, "columns", 2, DL_INFO)); + row_count = new RKComponentPropertyInt (this, false, xml->getIntAttribute (element, "rows", qMax (2, min_rows), DL_INFO)); + column_count = new RKComponentPropertyInt (this, false, xml->getIntAttribute (element, "columns", qMax (2, min_columns), DL_INFO)); tsv_data = new RKComponentPropertyBase (this, false); row_count->setInternal (true); addChild ("rows", row_count); @@ -91,9 +96,7 @@ RKMatrixInput::RKMatrixInput (const QDomElement& element, RKComponent* parent_co display->setModel (model); display->setAlternatingRowColors (true); if (xml->getBoolAttribute (element, "fixed_width", false, DL_INFO)) { - int max_col = column_count->intValue () - 1; - display->setVerticalScrollBarPolicy (Qt::ScrollBarAlwaysOff); - display->setFixedWidth (display->verticalHeader ()->width () + display->columnViewportPosition (max_col) + display->columnWidth (max_col) + display->verticalHeader ()->fontMetrics ().width ("0")); + display->horizontalHeader ()->setStretchLastSection (true); } if (xml->getBoolAttribute (element, "fixed_height", false, DL_INFO)) { int max_row = row_count->intValue () - 1; @@ -199,7 +202,7 @@ void RKMatrixInput::updateColumn (int column) { // check for trailing empty rows: int last_row = col.storage.size (); - while ((--last_row >= 0) && col.storage[last_row].isEmpty ()) { // strip empty trailing strings + while ((--last_row >= min_rows) && col.storage[last_row].isEmpty ()) { // strip empty trailing strings col.storage.pop_back (); } @@ -244,9 +247,10 @@ void RKMatrixInput::updateAll () { for (int i = columns.size () - 1; i >= 0; --i) { max_row = qMax (max_row, columns[i].storage.size () - 1); } - if (max_row != row_count->intValue () - 1) { - row_count->setIntValue (max_row + 1); - } + } + max_row = qMax (min_rows - 1, max_row); + if (max_row != row_count->intValue () - 1) { + row_count->setIntValue (max_row + 1); } int max_col = column_count->intValue () - 1; @@ -256,9 +260,10 @@ void RKMatrixInput::updateAll () { break; } } - if (max_col != column_count->intValue () - 1) { - column_count->setIntValue (max_col + 1); - } + } + max_col = qMax (min_columns - 1, max_col); + if (max_col != column_count->intValue () - 1) { + column_count->setIntValue (max_col + 1); } QStringList tsv; diff --git a/rkward/plugin/rkmatrixinput.h b/rkward/plugin/rkmatrixinput.h index 30b7d91..6606f2f 100644 --- a/rkward/plugin/rkmatrixinput.h +++ b/rkward/plugin/rkmatrixinput.h @@ -67,6 +67,7 @@ private: bool allow_user_resize_columns; int trailing_rows; int trailing_columns; + int min_rows, min_columns; bool isValueValid (const QString &value) const; void updateAll (); |
From: Yuri C. <yu...@uk...> - 2015-01-08 19:48:37
|
Git commit 3f6221bfde50aa8ba149eae6543e0a086c14196d by Yuri Chornoivan. Committed on 08/01/2015 at 19:48. Pushed by yurchor into branch 'master'. Fix typo M +1 -1 rkward/plugins/00saveload/import/import_csv.rkh http://commits.kde.org/rkward/3f6221bfde50aa8ba149eae6543e0a086c14196d diff --git a/rkward/plugins/00saveload/import/import_csv.rkh b/rkward/plugins/00saveload/import/import_csv.rkh index 89d100e..566acbf 100644 --- a/rkward/plugins/00saveload/import/import_csv.rkh +++ b/rkward/plugins/00saveload/import/import_csv.rkh @@ -23,7 +23,7 @@ Choose the CSV file to import. An R object containing the data will be created. <caption id="tab_rows"/> <setting id="rowname">How to determine row names? Either the rows can be numbered 1...n. Or you can specify a single column containing the row names (typically the first). Or you can provide a character vector of names.</setting> <setting id="nomrow">See above. The column containing the row names, given either as a number, or as a column name (in the latter case, make sure to quote the name)</setting> - <setting id="rownames">See above. A vector of column names (e.g. c ("row1", "row2", ..., "rown"), but you can also specify the name of an R object containing the names to use)</setting> + <setting id="rownames">See above. A vector of row names (e.g. c ("row1", "row2", ..., "rown"), but you can also specify the name of an R object containing the names to use)</setting> <caption id="tab_columns"/> <setting id="colname">Use default column names (possibly read from first row of file), or use specific names?</setting> |
From: Yuri C. <yu...@uk...> - 2015-01-08 08:13:06
|
Git commit bae82f98551d257e6648420d409f8980941d0609 by Yuri Chornoivan. Committed on 08/01/2015 at 08:12. Pushed by yurchor into branch 'master'. Fix typos M +1 -1 rkward/plugins/00saveload/import/import_csv.rkh M +1 -1 rkward/plugins/00saveload/import/import_csv.xml M +4 -4 rkward/plugins/00saveload/save/write_csv.rkh M +1 -1 rkward/plugins/data/one_var_tabulation.rkh M +2 -2 rkward/plugins/plots/histogram_options.rkh M +2 -2 rkward/plugins/plots/plot_options.rkh M +1 -1 rkward/plugins/plots/plot_stepfun_options.rkh M +4 -4 rkward/plugins/rkwarddev_scripts/write_csv.R M +1 -1 rkward/plugins/x11device/export.rkh M +1 -1 rkward/plugins/x11device/export.xml M +1 -1 rkward/plugins/x11device/grid.rkh http://commits.kde.org/rkward/bae82f98551d257e6648420d409f8980941d0609 diff --git a/rkward/plugins/00saveload/import/import_csv.rkh b/rkward/plugins/00saveload/import/import_csv.rkh index 44a8c30..89d100e 100644 --- a/rkward/plugins/00saveload/import/import_csv.rkh +++ b/rkward/plugins/00saveload/import/import_csv.rkh @@ -11,7 +11,7 @@ Choose the CSV file to import. An R object containing the data will be created. <settings> <caption id="tab_general"/> <setting id="file">The filename of the file to import</setting> - <setting id="quick">Select from one of the predefined (most common formats), or select "custom", to specify field separator and decimal separtor, below.</setting> + <setting id="quick">Select from one of the predefined (most common formats), or select "custom", to specify field separator and decimal separator, below.</setting> <setting id="header">Whether the first row of the file contains should be interpreted as column names</setting> <setting id="dec">Decimal character used in the imported file</setting> <setting id="custom_dec">If you selected "other" above, specify the character, here.</setting> diff --git a/rkward/plugins/00saveload/import/import_csv.xml b/rkward/plugins/00saveload/import/import_csv.xml index 7f5fe1e..64aa0d0 100644 --- a/rkward/plugins/00saveload/import/import_csv.xml +++ b/rkward/plugins/00saveload/import/import_csv.xml @@ -65,7 +65,7 @@ <browser id="file" type="file" label="File name"/> <dropdown id="quick" label="Data format" > <option value="csv" label="Comma separated values (CSV)" checked="true" /> - <option value="csv2" label="Semicolo separated values, comma as decimal separator (CSV2)" /> + <option value="csv2" label="Semicolon separated values, comma as decimal separator (CSV2)" /> <option value="delim" label="Tab separated values (TAB)" /> <option value="delim2" label="Tab separated values, comma as decimal separator (TAB2)" /> <option value="table" label="Custom"/> diff --git a/rkward/plugins/00saveload/save/write_csv.rkh b/rkward/plugins/00saveload/save/write_csv.rkh index 2924036..94f872a 100644 --- a/rkward/plugins/00saveload/save/write_csv.rkh +++ b/rkward/plugins/00saveload/save/write_csv.rkh @@ -28,17 +28,17 @@ Should existing files be overwritten or the data appended? If this is greyed out, the selected preset sets this for you. </setting> <setting id="quick"> - Select one of the default file formats here. They will set some of the options (like field separator and decimal point) with resonable defaults. Use the custom format if you need more control. + Select one of the default file formats here. They will set some of the options (like field separator and decimal point) with reasonable defaults. Use the custom format if you need more control. </setting> <caption id="frm_rDPPCCCOFT" /> <setting id="dec"> - Specify the desirend decimal point character. If this is greyed out, the selected preset sets this for you. + Specify the desired decimal point character. If this is greyed out, the selected preset sets this for you. </setting> <setting id="custom_dec"> Use this value as the custom decimal point character. </setting> <setting id="sep"> - Specify the desirend field separator character. If this is greyed out, the selected preset sets this for you. + Specify the desired field separator character. If this is greyed out, the selected preset sets this for you. </setting> <setting id="custom_sep"> Use this value as the custom field separator character. @@ -71,7 +71,7 @@ Check this to have all string values quoted. </setting> <setting id="qmethod"> - Controls how existing quotes in values are handled -- they can either be escaped or double qouted. If this is greyed out, the selected preset sets this for you. + Controls how existing quotes in values are handled -- they can either be escaped or double quoted. If this is greyed out, the selected preset sets this for you. </setting> <setting id="na"> Set the character to indicate missing data. diff --git a/rkward/plugins/data/one_var_tabulation.rkh b/rkward/plugins/data/one_var_tabulation.rkh index 18a9eca..9e2f4a8 100644 --- a/rkward/plugins/data/one_var_tabulation.rkh +++ b/rkward/plugins/data/one_var_tabulation.rkh @@ -1,7 +1,7 @@ <!DOCTYPE rkhelp> <document> <summary> - Generic tabulation plugin (single outcome vector). This plugin is designed to be embeded into other plugins. + Generic tabulation plugin (single outcome vector). This plugin is designed to be embedded into other plugins. </summary> <usage> diff --git a/rkward/plugins/plots/histogram_options.rkh b/rkward/plugins/plots/histogram_options.rkh index d1f0b24..de42216 100644 --- a/rkward/plugins/plots/histogram_options.rkh +++ b/rkward/plugins/plots/histogram_options.rkh @@ -4,7 +4,7 @@ This plugin provides various options for <b>hist</b> or <b>plot.histogram</b>. </summary> <usage> - This plugin is mostly used as an embeded plugin. All the GUI elements here set various parameters to either hist or plot.histogram functions. For parameter specific help see the respective R references. Few parameter combinations might not produce any sensible plot, so read the R references to make a judicious choice of parameters. + This plugin is mostly used as an embedded plugin. All the GUI elements here set various parameters to either hist or plot.histogram functions. For parameter specific help see the respective R references. Few parameter combinations might not produce any sensible plot, so read the R references to make a judicious choice of parameters. </usage> <settings> <setting id="addtoplot">Check this box if the histogram is to be added to the current plot. This is the <i>add</i> parameter.</setting> @@ -25,7 +25,7 @@ <setting id="angle">This is the <i>angle</i> parameter.</setting> <caption id="frame_histfilloptions"/> <setting id="usefillcol">Check this box to use a fill color for the histogram bars.</setting> - <setting id="histfillcol">This is the <i>col</i> parameter. The embeding plugin might set a default color. If it is empty, then <i>col</i> is not used in the code, otherwise the chosen color is used to fill the bars.</setting> + <setting id="histfillcol">This is the <i>col</i> parameter. The embedding plugin might set a default color. If it is empty, then <i>col</i> is not used in the code, otherwise the chosen color is used to fill the bars.</setting> </settings> <related> <ul> diff --git a/rkward/plugins/plots/plot_options.rkh b/rkward/plugins/plots/plot_options.rkh index 652f47c..fe16fa4 100644 --- a/rkward/plugins/plots/plot_options.rkh +++ b/rkward/plugins/plots/plot_options.rkh @@ -1,7 +1,7 @@ <!DOCTYPE rkhelp> <document> <summary> - Generic plot options plugin. More often than not, this plugin is embeded into other plugins. As a result, not all the features explained here are available in a specific embeded situation. When a particular feature is available, it is explained as below. + Generic plot options plugin. More often than not, this plugin is embedded into other plugins. As a result, not all the features explained here are available in a specific embedded situation. When a particular feature is available, it is explained as below. </summary> <usage> @@ -68,7 +68,7 @@ <li><i>allow_ylim</i>: Setting this to "true" ("false") enables (disables) the display of 'Min Y value' and 'Max Y value' input boxes.</li> <li><i>allow_type</i>: Setting this to "true" ("false") enables (disables) the display of the 'Points / Lines' tab.</li> <li><i>allow_aspect</i>: Setting this to "true" ("false") enables (disables) the display of the 'Aspect ratio' tab.</li> - <li><i>allow_grid</i>: Setting this to "true" ("false") enables (disables) the display of the 'Grid' tab. If "true", the actual code for grid options can be extracted from code.calculate (see below) which in turn extracts it from grid_options.code.printout. Specifically, if the plot options plugin is embeded using an id="plot_options" then the following call:<br> + <li><i>allow_grid</i>: Setting this to "true" ("false") enables (disables) the display of the 'Grid' tab. If "true", the actual code for grid options can be extracted from code.calculate (see below) which in turn extracts it from grid_options.code.printout. Specifically, if the plot options plugin is embedded using an id="plot_options" then the following call:<br> printIndented ("\t", getRK_val ("plot_options.code.calculate"));</br><br> after the plotting function should do the job.</br></li> </ul> diff --git a/rkward/plugins/plots/plot_stepfun_options.rkh b/rkward/plugins/plots/plot_stepfun_options.rkh index 10e7c8c..3384f4a 100644 --- a/rkward/plugins/plots/plot_stepfun_options.rkh +++ b/rkward/plugins/plots/plot_stepfun_options.rkh @@ -4,7 +4,7 @@ Various graphical parameters for <b>plot.stepfun</b>. For detailed description of the individual parameters see the R reference on 'plot.stepfun'. </summary> <usage> - This is supposed to be used as an embeded plugin. All the elements are arguments to the plot.stepfun function. This plugin is useful in constructing <b>ecdf</b> plots. + This is supposed to be used as an embedded plugin. All the elements are arguments to the plot.stepfun function. This plugin is useful in constructing <b>ecdf</b> plots. </usage> <settings> <setting id="addtoplot">This is the <i>add</i> argument. This option might be disabled by the embedding plugin.</setting> diff --git a/rkward/plugins/rkwarddev_scripts/write_csv.R b/rkward/plugins/rkwarddev_scripts/write_csv.R index 69290be..ff5e8aa 100644 --- a/rkward/plugins/rkwarddev_scripts/write_csv.R +++ b/rkward/plugins/rkwarddev_scripts/write_csv.R @@ -75,7 +75,7 @@ etc.drop.format <- rk.XML.dropdown("File format", "Custom"=c(val="table") ), id.name="quick", - help="Select one of the default file formats here. They will set some of the options (like field separator and decimal point) with resonable defaults. Use the custom format if you need more control." + help="Select one of the default file formats here. They will set some of the options (like field separator and decimal point) with reasonable defaults. Use the custom format if you need more control." ) etc.frame.characters <- rk.XML.frame( @@ -88,7 +88,7 @@ etc.frame.characters <- rk.XML.frame( etc.radio.decimal.opt.other <- rk.XML.option("Custom (specify below)", val="other", id.name="decOther") ), id.name="dec", - help="Specify the desirend decimal point character. If this is greyed out, the selected preset sets this for you." + help="Specify the desired decimal point character. If this is greyed out, the selected preset sets this for you." ), rk.XML.stretch(), etc.input.decimal <- rk.XML.input("", required=TRUE, id="custom_dec", @@ -105,7 +105,7 @@ etc.frame.characters <- rk.XML.frame( etc.radio.field.opt.other <- rk.XML.option("Custom (specify below)", val="other", id.name="sepOther") ), id.name="sep", - help="Specify the desirend field separator character. If this is greyed out, the selected preset sets this for you." + help="Specify the desired field separator character. If this is greyed out, the selected preset sets this for you." ), rk.XML.stretch(), etc.input.field <- rk.XML.input("", required=TRUE, id="custom_sep", @@ -126,7 +126,7 @@ etc.frame.specialChars <- rk.XML.frame( etc.radio.quote.opt.double <- rk.XML.option("Double", val="double", id.name="qmethodDbl") ), id.name="qmethod", - help="Controls how existing quotes in values are handled -- they can either be escaped or double qouted. If this is greyed out, the selected preset sets this for you." + help="Controls how existing quotes in values are handled -- they can either be escaped or double quoted. If this is greyed out, the selected preset sets this for you." ) ), rk.XML.col( diff --git a/rkward/plugins/x11device/export.rkh b/rkward/plugins/x11device/export.rkh index 009ce46..db67e33 100644 --- a/rkward/plugins/x11device/export.rkh +++ b/rkward/plugins/x11device/export.rkh @@ -35,7 +35,7 @@ <setting id="ps_horiz">Available only for Postscript/Ghostscript exporting, this is the <i>horizontal</i> parameter.</setting> <setting id="family">This is the <i>family</i> parameter to <b>postscript</b>. Be sure to choose a family that is available on the machine. The 'URW' class of font families require ghostscript. When in doubt leave this as 'Default', the default family (Helvectica) will be used. See the R reference on postscript for more details.</setting> <setting id="encoding">This is the <i>encoding</i> parameter to <b>postscript</b>. Be sure to choose an encoding compatible with the chosen font family. When in doubt leave this as 'Default', the default encoding (ISOLatin1) will be used. See the R reference on postscript for more details.</setting> - <setting id="autotitle">Uncheck this box, to specify a custom title to the graphics file. Note that this is not displayed on the plot, but rather it is embeded inside the graphics file. This is the <i>title</i> parameter to <b>postscript</b>.</setting> + <setting id="autotitle">Uncheck this box, to specify a custom title to the graphics file. Note that this is not displayed on the plot, but rather it is embedded inside the graphics file. This is the <i>title</i> parameter to <b>postscript</b>.</setting> <caption id="frame_gsoptions"/> <setting id="gsformat">File format to use. Only the most common ones are listed, but many more are supported by ghostscript. Select "Other" and see the option below to use these formats.</setting> diff --git a/rkward/plugins/x11device/export.xml b/rkward/plugins/x11device/export.xml index 0351585..eddc129 100644 --- a/rkward/plugins/x11device/export.xml +++ b/rkward/plugins/x11device/export.xml @@ -162,7 +162,7 @@ </dropdown> </row> </frame> - <frame id="title_properties" label="Title embeded in file"> + <frame id="title_properties" label="Title embedded in file"> <row> <column> <checkbox id="autotitle" value="1" value_unchecked="0" checked="true" label="Default Title"/> diff --git a/rkward/plugins/x11device/grid.rkh b/rkward/plugins/x11device/grid.rkh index 30c1417..94f1951 100644 --- a/rkward/plugins/x11device/grid.rkh +++ b/rkward/plugins/x11device/grid.rkh @@ -4,7 +4,7 @@ Various parameters for the <b>grid</b>. For detailed description of the individual parameters see the R reference on 'grid'. Note that this works only when standard (traditional S) graphics functions (see library(help="graphics")) are used to construct the plot. This does not work for trellis graphics devices (see <link href="rkward://rhelp/Lattice"/> for some information). </summary> <usage> - This may or may not be used as an embeded plugin. When used on a trellis device the produced error message is displayed. + This may or may not be used as an embedded plugin. When used on a trellis device the produced error message is displayed. </usage> <settings> <setting id="nx">This is the <i>nx</i> argument. The default is NULL, in which case, the vertical lines are drawn at the xaxis ticks. Select None to not draw the vertical lines. Select 'Specify below' to provide a specified (to be specified below) number of vertical lines in the grid.</setting> |
From: Thomas F. <tho...@ru...> - 2015-01-07 21:22:20
|
Git commit e4d85443cd85f30bfa642868d54e676b86e8a14f by Thomas Friedrichsmeier. Committed on 07/01/2015 at 19:26. Pushed by tfry into branch 'master'. Add i18n() to "Descriptive Statistics" plugin M +19 -29 rkward/plugins/descriptive/descriptive_statistics.js M +14 -16 tests/analysis_plugins/descriptive_stats.rkcommands.R M +7 -2 tests/analysis_plugins/descriptive_stats.rkout http://commits.kde.org/rkward/e4d85443cd85f30bfa642868d54e676b86e8a14f diff --git a/rkward/plugins/descriptive/descriptive_statistics.js b/rkward/plugins/descriptive/descriptive_statistics.js index c825ce6..9bbe711 100644 --- a/rkward/plugins/descriptive/descriptive_statistics.js +++ b/rkward/plugins/descriptive/descriptive_statistics.js @@ -3,79 +3,69 @@ var mad_type; var constMad; function calculate () { - var vars = trim (getValue ("x")).split ("\n").join (", "); + var vars = getList ("x"); constMad = getValue ("constMad"); mad_type = getValue ("mad_type"); - echo ('vars <- rk.list (' + vars + ')\n'); - echo ('results <- data.frame (\'Object\'=I(names (vars)))\n'); + echo ('vars <- rk.list (' + vars.join (", ") + ')\n'); + echo ('results <- data.frame (' + i18n ("Object") + '=I(names (vars)))\n'); echo ('for (i in 1:length (vars)) {\n'); echo (' var <- vars[[i]]\n'); echo ('\n'); - echo (' # we wrap each single call in a "try" statement to always continue on errors.\n'); + comment ('we wrap each single call in a "try" statement to always continue on errors.', '\t'); if (getValue ("mean")) { // trim is the fraction (0 to 0.5) of observations to be trimmed from each end of x before the mean is computed - echo (' results[i, \'mean\'] <- try (mean (var, trim = ' + getValue ("trim") + ', na.rm=TRUE))\n'); + echo (' results[i, ' + i18n ("mean") + '] <- try (mean (var, trim = ' + getValue ("trim") + ', na.rm=TRUE))\n'); } if (getValue ("geo_mean")) { // compute the geometric mean - echo (' results[i, \'geometric mean\'] <- try (prod (na.omit(var))^(1 / length (na.omit(var))))\n'); + echo (' results[i, ' + i18n ("geometric mean") + '] <- try (prod (na.omit(var))^(1 / length (na.omit(var))))\n'); } if (getValue ("interquantile_mean")) { // compute the quartile (25% and 75%) mean - echo (' results[i, \'interquantile mean\'] <- try (sum(quantile(var, probs=c(0.25), na.rm=T), quantile(var, probs=c(0.75), na.rm=TRUE)) / 2)\n'); + echo (' results[i, ' + i18n ("interquantile mean") + '] <- try (sum(quantile(var, probs=c(0.25), na.rm=T), quantile(var, probs=c(0.75), na.rm=TRUE)) / 2)\n'); } if (getValue ("harmonic_mean")) { // compute the harmonic mean - echo (' results[i, \'harmonic mean\'] <- try (1 / mean(1 / na.omit(var)))\n'); + echo (' results[i, ' + i18n ("harmonic mean") + '] <- try (1 / mean(1 / na.omit(var)))\n'); } if (getValue ("median")) { - echo (' results[i, \'median\'] <- try (median (var, na.rm=TRUE))\n'); + echo (' results[i, ' + i18n ("median") + '] <- try (median (var, na.rm=TRUE))\n'); } if (getValue ("range")) { echo (' try ({\n'); echo (' range <- try (range (var, na.rm=TRUE))\n'); - echo (' results[i, \'min\'] <- range[1]\n'); - echo (' results[i, \'max\'] <- range[2]\n'); + echo (' results[i, ' + i18n ("min") + '] <- range[1]\n'); + echo (' results[i, ' + i18n ("max") + '] <- range[2]\n'); echo (' })\n'); } if (getValue ("sd")) { - echo (' results[i, \'standard deviation\'] <- try (sd (var, na.rm=TRUE))\n'); + echo (' results[i, ' + i18n ("standard deviation") + '] <- try (sd (var, na.rm=TRUE))\n'); } if (getValue ("sum")) { - echo (' results[i, \'sum\'] <- try (sum (var, na.rm=TRUE))\n'); + echo (' results[i, ' + i18nc ("noun", "sum") + '] <- try (sum (var, na.rm=TRUE))\n'); } if (getValue ("prod")) { - echo (' results[i, \'product\'] <- try (prod (var, na.rm=TRUE))\n'); + echo (' results[i, ' + i18n ("product") + '] <- try (prod (var, na.rm=TRUE))\n'); } if (getValue ("mad")) { - echo (' results[i, \'Median Absolute Deviation\'] <- try (mad (var, constant = ' + constMad); + echo (' results[i, ' + i18n ("Median Absolute Deviation") + '] <- try (mad (var, constant = ' + constMad); if (mad_type == "low") echo (", low=TRUE"); else if (mad_type == "high") echo (", high=TRUE"); echo (', na.rm=TRUE))\n'); } if (getValue ("length")) { - echo (' results[i, \'length of sample\'] <- length (var)\n'); - echo (' results[i, \'number of NAs\'] <- sum (is.na(var))\n'); + echo (' results[i, ' + i18n ("length of sample") + '] <- length (var)\n'); + echo (' results[i, ' + i18n ("number of NAs") + '] <- sum (is.na(var))\n'); } echo ('}\n'); } function printout () { - echo ('rk.header ("Descriptive statistics", parameters=list (\n'); - echo (' "Trim of mean", ' + getValue ("trim")); + new Header (i18n ("Descriptive statistics")).addFromUI ("trim").print (); if (getValue ("mad")) { - echo (',\n'); - echo (' "Median Absolute Deviation",\n'); - echo (' paste ("constant:", ' + constMad + ', '); - if (mad_type == "low") echo ('"lo-median"'); - else if (mad_type == "high") echo ('"hi-median"'); - else echo ('"average"' + ')'); + new Header (i18n ("Median Absolute Deviation"), 3).addFromUI ("constMad").addFromUI ("mad_type").print (); } - echo ('))\n'); - echo ('\n'); echo ('rk.results (results)\n'); if (getValue ("save_to_file")) echo ('write.csv(file="' + getValue ("file") + '", results)\n'); } - - diff --git a/tests/analysis_plugins/descriptive_stats.rkcommands.R b/tests/analysis_plugins/descriptive_stats.rkcommands.R index eeff8dd..f30f24c 100644 --- a/tests/analysis_plugins/descriptive_stats.rkcommands.R +++ b/tests/analysis_plugins/descriptive_stats.rkcommands.R @@ -1,30 +1,28 @@ local({ ## Compute vars <- rk.list (women[["height"]], test10z) -results <- data.frame ('Object'=I(names (vars))) +results <- data.frame ("Object"=I(names (vars))) for (i in 1:length (vars)) { var <- vars[[i]] # we wrap each single call in a "try" statement to always continue on errors. - results[i, 'mean'] <- try (mean (var, trim = 0.00, na.rm=TRUE)) - results[i, 'median'] <- try (median (var, na.rm=TRUE)) + results[i, "mean"] <- try (mean (var, trim = 0.00, na.rm=TRUE)) + results[i, "median"] <- try (median (var, na.rm=TRUE)) try ({ range <- try (range (var, na.rm=TRUE)) - results[i, 'min'] <- range[1] - results[i, 'max'] <- range[2] + results[i, "min"] <- range[1] + results[i, "max"] <- range[2] }) - results[i, 'standard deviation'] <- try (sd (var, na.rm=TRUE)) - results[i, 'sum'] <- try (sum (var, na.rm=TRUE)) - results[i, 'product'] <- try (prod (var, na.rm=TRUE)) - results[i, 'Median Absolute Deviation'] <- try (mad (var, constant = 1.4628, na.rm=TRUE)) - results[i, 'length of sample'] <- length (var) - results[i, 'number of NAs'] <- sum (is.na(var)) + results[i, "standard deviation"] <- try (sd (var, na.rm=TRUE)) + results[i, "sum"] <- try (sum (var, na.rm=TRUE)) + results[i, "product"] <- try (prod (var, na.rm=TRUE)) + results[i, "Median Absolute Deviation"] <- try (mad (var, constant = 1.4628, na.rm=TRUE)) + results[i, "length of sample"] <- length (var) + results[i, "number of NAs"] <- sum (is.na(var)) } ## Print result -rk.header ("Descriptive statistics", parameters=list ( - "Trim of mean", 0.00, - "Median Absolute Deviation", - paste ("constant:", 1.4628, "average"))) - +rk.header ("Descriptive statistics", parameters=list("Trim of mean"="0.00")) +rk.header ("Median Absolute Deviation", parameters=list("Constant"="1.4628", + "Treatment of even sample sizes"="use average"), level=3) rk.results (results) }) diff --git a/tests/analysis_plugins/descriptive_stats.rkout b/tests/analysis_plugins/descriptive_stats.rkout index e49af52..c6f73c8 100644 --- a/tests/analysis_plugins/descriptive_stats.rkout +++ b/tests/analysis_plugins/descriptive_stats.rkout @@ -1,9 +1,14 @@ <h1>Descriptive statistics</h1> <h2>Parameters</h2> -<ul><li>Trim of mean: 0</li> -<li>Median Absolute Deviation: constant: 1.4628 average</li> +<ul><li>Trim of mean: 0.00</li> </ul> DATE<br /> +<h3>Median Absolute Deviation</h3> +<h4>Parameters</h4> +<ul><li>Constant: 1.4628</li> +<li>Treatment of even sample sizes: use average</li> +</ul> +<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> |
From: Thomas F. <tho...@ru...> - 2015-01-07 21:22:20
|
Git commit d8ed35d56b896a77f97d2fd759d903f5081972df by Thomas Friedrichsmeier. Committed on 07/01/2015 at 21:21. Pushed by tfry into branch 'master'. Some tweaks to <matrix> element M +4 -4 doc/rkwardplugins/index.docbook M +5 -1 rkward/plugin/rkmatrixinput.cpp http://commits.kde.org/rkward/d8ed35d56b896a77f97d2fd759d903f5081972df diff --git a/doc/rkwardplugins/index.docbook b/doc/rkwardplugins/index.docbook index 6fe22aa..134146b 100644 --- a/doc/rkwardplugins/index.docbook +++ b/doc/rkwardplugins/index.docbook @@ -3069,19 +3069,19 @@ made checkable, thus acting like a simple checkbox at the same time. </varlistentry> <varlistentry> <term><parameter>fixed_width</parameter></term> - <listitem><para>Force the GUI element to stay at its initial width. Do not use in combindation with matrices, where the number of columns may change in any way. Useful, esp. when creating a vector input element (rows="1"). (optional, defaults to false).</para></listitem> + <listitem><para>Force the GUI element to stay at its initial width. Do not use in combination with matrices, where the number of columns may change in any way. Useful, esp. when creating a vector input element (rows="1"). With this option set to true, no vertical scroll bar will be shown, even in the matrix exceeds the available height (as this would affect the width). (optional, defaults to false).</para></listitem> </varlistentry> <varlistentry> <term><parameter>fixed_height</parameter></term> - <listitem><para>Force the GUI element to stay at its initial height. Do not use in combindation with matrices, where the number of rows may change in any way. Useful, esp. when creating a vector input element (columns="1"). (optional, defaults to false).</para></listitem> + <listitem><para>Force the GUI element to stay at its initial height. Do not use in combination with matrices, where the number of rows may change in any way. Useful, esp. when creating a vector input element (columns="1"). With this option set to true, no horizontal scroll bar will be shown, even in the matrix exceeds the available width (as this would affect the height). (optional, defaults to false).</para></listitem> </varlistentry> <varlistentry> <term><parameter>horiz_headers</parameter></term> - <listitem><para>Strings to ues for the horiztonal header, separated by ";". (optional, defaults to column number).</para></listitem> + <listitem><para>Strings to ues for the horiztonal header, separated by ";". The header will be hidden, if set to "". (optional, defaults to column number).</para></listitem> </varlistentry> <varlistentry> <term><parameter>vert_headers</parameter></term> - <listitem><para>Strings to ues for the vertical header, separated by ";". (optional, defaults to row number).</para></listitem> + <listitem><para>Strings to ues for the vertical header, separated by ";". The header will be hidden, if set to "". (optional, defaults to row number).</para></listitem> </varlistentry> </variablelist></para></listitem> </varlistentry> diff --git a/rkward/plugin/rkmatrixinput.cpp b/rkward/plugin/rkmatrixinput.cpp index 652e5f0..1d768dd 100644 --- a/rkward/plugin/rkmatrixinput.cpp +++ b/rkward/plugin/rkmatrixinput.cpp @@ -2,7 +2,7 @@ rkmatrixinput - description ------------------- begin : Tue Oct 09 2012 - copyright : (C) 2012 by Thomas Friedrichsmeier + copyright : (C) 2012, 2015 by Thomas Friedrichsmeier email : tf...@us... ***************************************************************************/ @@ -83,17 +83,21 @@ RKMatrixInput::RKMatrixInput (const QDomElement& element, RKComponent* parent_co model = new RKMatrixInputModel (this); QString headers = xml->getStringAttribute (element, "horiz_headers", QString (), DL_INFO); if (!headers.isEmpty ()) model->horiz_header = headers.split (';'); + else if (!headers.isNull ()) display->horizontalHeader ()->hide (); // attribute explicitly set to "" headers = xml->getStringAttribute (element, "vert_headers", QString (), DL_INFO); if (!headers.isEmpty ()) model->vert_header = headers.split (';'); + else if (!headers.isNull ()) display->verticalHeader ()->hide (); updateAll (); display->setModel (model); display->setAlternatingRowColors (true); if (xml->getBoolAttribute (element, "fixed_width", false, DL_INFO)) { int max_col = column_count->intValue () - 1; + display->setVerticalScrollBarPolicy (Qt::ScrollBarAlwaysOff); display->setFixedWidth (display->verticalHeader ()->width () + display->columnViewportPosition (max_col) + display->columnWidth (max_col) + display->verticalHeader ()->fontMetrics ().width ("0")); } if (xml->getBoolAttribute (element, "fixed_height", false, DL_INFO)) { int max_row = row_count->intValue () - 1; + display->setHorizontalScrollBarPolicy (Qt::ScrollBarAlwaysOff); display->setFixedHeight (display->horizontalHeader ()->height () + display->rowViewportPosition (max_row) + display->rowHeight (max_row)); } |
From: Thomas F. <tho...@ru...> - 2015-01-07 09:07:15
|
Git commit d9b79205a988ccf3fdaa35666dc38eb2349d039c by Thomas Friedrichsmeier. Committed on 07/01/2015 at 09:05. Pushed by tfry into branch 'master'. Fix a bug when extracting messages from inlined UI logic, and add message extraction for "data" and "embedded" plugins. M +3 -0 Messages.sh M +1 -1 scripts/update_plugin_messages.py http://commits.kde.org/rkward/d9b79205a988ccf3fdaa35666dc38eb2349d039c diff --git a/Messages.sh b/Messages.sh index 0c9e8d4..0b36280 100755 --- a/Messages.sh +++ b/Messages.sh @@ -14,3 +14,6 @@ python scripts/update_plugin_messages.py --extract-only --default_po=pages --out python scripts/update_plugin_messages.py --extract-only --outdir=$podir rkward/plugins/analysis.pluginmap # extract messages from import_export plugins: >> rkward__import_export.pot python scripts/update_plugin_messages.py --extract-only --outdir=$podir rkward/plugins/import_export.pluginmap +# extract messages from data plugins: >> rkward__data.pot +python scripts/update_plugin_messages.py --extract-only --outdir=$podir rkward/plugins/data.pluginmap +# messages of embedded plugins are extracted implicitly, as part of the above extraction calls: >> rkward__embedded.pot diff --git a/scripts/update_plugin_messages.py b/scripts/update_plugin_messages.py index 376982a..4deb68b 100755 --- a/scripts/update_plugin_messages.py +++ b/scripts/update_plugin_messages.py @@ -153,7 +153,7 @@ def stripLineDummy (text): def getLineOf (element, default=-1): if element.hasAttribute (LINE_DUMMY_ATTR): - return element.getAttribute (LINE_DUMMY_ATTR) + return int (element.getAttribute (LINE_DUMMY_ATTR)) return default # Normalizes larger text fragments. TODO: Do we want to protect <pre>-blocks? |
From: Thomas F. <tho...@ru...> - 2015-01-07 09:07:15
|
Git commit 2c0e450476bbf88679fcfe4eaf6ec29d07a34287 by Thomas Friedrichsmeier. Committed on 07/01/2015 at 08:40. Pushed by tfry into branch 'master'. Add i18n()-calls to data plugins. M +6 -6 rkward/plugins/data/one_var_tabulation.xml M +7 -3 rkward/plugins/data/recode_categorical.js M +1 -1 rkward/plugins/data/sort.xml M +1 -1 rkward/plugins/data/sort2.xml M +6 -6 tests/data_plugin_tests/recode_categorical.rkcommands.R http://commits.kde.org/rkward/2c0e450476bbf88679fcfe4eaf6ec29d07a34287 diff --git a/rkward/plugins/data/one_var_tabulation.xml b/rkward/plugins/data/one_var_tabulation.xml index c9fe04b..a59532f 100644 --- a/rkward/plugins/data/one_var_tabulation.xml +++ b/rkward/plugins/data/one_var_tabulation.xml @@ -5,7 +5,7 @@ <logic> <external id="outvar" default="x"/> <external id="titlevar" default="title"/> - <external id="fun_label" default=""Frequency""/> + <external id="fun_label"/> <external id="parameters"/> <set id="varsource.visible" to="false"/> @@ -23,22 +23,22 @@ var stat = gui.getValue ("stat.string"); var label; if (stat == "freq") { - label = "Frequency"; + label = i18n ("Frequency"); } else { var obj = makeRObject (gui.getValue ("outcome.available")); if (stat == "sum") { - label = "Sum of " + obj.objectname; + label = i18n ("Sum of %1", obj.objectname); } else if (stat == "custom") { - label = gui.getValue ("custom_stat.text") + " of " + obj.objectname; + label = i18nc ("(function name) of (object name)", "%1 of %2", gui.getValue ("custom_stat.text"), obj.objectname); } } - gui.setValue ("fun_label", quote (label)); + gui.setValue ("fun_label", label); updateDescription (); } gui.addChangeCommand ("groups.available", "updateDescription ()"); updateDescription = function () { - gui.setValue ("parameters", '"Tabulation groups"=paste (names (groups), collapse=" by "), "Tabulation statistic"=' + gui.getValue ("fun_label")); + gui.setValue ("parameters", i18n ("Tabulation groups") + '=paste (names (groups), collapse=' + i18nc ("Tabulate X by Y [by Z [...]]", " by ") + '), ' + i18n ("Tabulation statistic") + '=' + gui.getValue ("fun_label")); } updateFunLabel (); ]]></script> diff --git a/rkward/plugins/data/recode_categorical.js b/rkward/plugins/data/recode_categorical.js index 72cb1aa..385a13d 100644 --- a/rkward/plugins/data/recode_categorical.js +++ b/rkward/plugins/data/recode_categorical.js @@ -13,7 +13,7 @@ function calculate () { // initialize output vector to defaults echo ('input <- ' + input + '\n'); if (is_factor) { - echo ('# Use as.character() as intermediate data format, to support adding and dropping levels\n'); + comment ('Use as.character() as intermediate data format, to support adding and dropping levels'); echo ('recoded <- as.character ('); } else { echo ('recoded <- as.' + datamode + ' ('); @@ -66,7 +66,7 @@ function calculate () { // Produce warnings (or should it be errors?) if (dupes.length > 0) { - echo ('\nwarning ("Some input values were specified more than once: ", ' + quote (dupes.join (', ')) + ')\n'); + echo ('\nwarning (' + i18n ("Some input values were specified more than once: ") + ', ' + quote (dupes.join (', ')) + ')\n'); } // Set data type and assign to output variable in GlobalEnv @@ -77,5 +77,9 @@ function calculate () { function printout () { // TODO: Number of differences always shows as 0, if storing to same object... - makeHeaderCode ('Recode categorical data', new Array ('Input variable', input, 'Output variable', output, 'Number of differences after recoding', noquote ('sum (' + input + ' != ' + output + ', na.rm=TRUE) + sum (is.na (' + input + ') != is.na (' + output + '))'))); + new Header (i18n ("Recode categorical data")) + .add (i18n ("Input variable"), input) + .add (i18n ("Output variable"), output) + .add (i18n ("Number of differences after recoding"), noquote ('sum (' + input + ' != ' + output + ', na.rm=TRUE) + sum (is.na (' + input + ') != is.na (' + output + '))')) + .print (); } diff --git a/rkward/plugins/data/sort.xml b/rkward/plugins/data/sort.xml index 91be2f7..bdbd9d8 100644 --- a/rkward/plugins/data/sort.xml +++ b/rkward/plugins/data/sort.xml @@ -31,7 +31,7 @@ gui.setValue ("notice.text", ""); } else { // Not very elegant, but does the trick - gui.setValue ("notice.text", "Sorting this type of object is not supported in this plugin"); + gui.setValue ("notice.text", i18n ("Sorting this type of object is not supported in this plugin")); } } ]]></script> diff --git a/rkward/plugins/data/sort2.xml b/rkward/plugins/data/sort2.xml index d87e02c..404012f 100644 --- a/rkward/plugins/data/sort2.xml +++ b/rkward/plugins/data/sort2.xml @@ -25,7 +25,7 @@ gui.setValue ("notice.text", ""); } else { // Not very elegant, but does the trick - gui.setValue ("notice.text", "Sorting this type of object is not supported in this plugin"); + gui.setValue ("notice.text", i18n ("Sorting this type of object is not supported in this plugin")); } } ]]></script> diff --git a/tests/data_plugin_tests/recode_categorical.rkcommands.R b/tests/data_plugin_tests/recode_categorical.rkcommands.R index 6e5f14f..63041a4 100644 --- a/tests/data_plugin_tests/recode_categorical.rkcommands.R +++ b/tests/data_plugin_tests/recode_categorical.rkcommands.R @@ -13,9 +13,9 @@ recoded[input == "L"] <- "low" recoded[input %in% c("M","H")] <- "midorhigh" .GlobalEnv$recoded <- as.factor (recoded) ## Print result -rk.header("Recode categorical data", parameters=list("Input variable", "warpbreaks[[\"tension\"]]", - "Output variable", "recoded", - "Number of differences after recoding", sum (warpbreaks[["tension"]] != recoded, na.rm=TRUE) + sum (is.na (warpbreaks[["tension"]]) != is.na (recoded)))) +rk.header ("Recode categorical data", parameters=list("Input variable"="warpbreaks[[\"tension\"]]", + "Output variable"="recoded", + "Number of differences after recoding"=sum (warpbreaks[["tension"]] != recoded, na.rm=TRUE) + sum (is.na (warpbreaks[["tension"]]) != is.na (recoded)))) }) local ({ x <- {e <- withnas; if (is.factor (e)) {levels (e)} else {sort (unique (e, nmax=10000))}} @@ -34,7 +34,7 @@ recoded[is.na (input)] <- TRUE warning ("Some input values were specified more than once: ", "\"9\", \"10\"") .GlobalEnv$recoded2 <- recoded ## Print result -rk.header("Recode categorical data", parameters=list("Input variable", "withnas", - "Output variable", "recoded2", - "Number of differences after recoding", sum (withnas != recoded2, na.rm=TRUE) + sum (is.na (withnas) != is.na (recoded2)))) +rk.header ("Recode categorical data", parameters=list("Input variable"="withnas", + "Output variable"="recoded2", + "Number of differences after recoding"=sum (withnas != recoded2, na.rm=TRUE) + sum (is.na (withnas) != is.na (recoded2)))) }) |
From: Thomas F. <tho...@ru...> - 2015-01-07 09:07:12
|
Git commit dd393ba30811931452b87e57eb9d4f527e3ac7d7 by Thomas Friedrichsmeier. Committed on 07/01/2015 at 09:02. Pushed by tfry into branch 'master'. Make sure to acutally include embedded.pluginmap, where needed. Also give it po_id for message extraction. (Actually, probably it is not needed everywhere, so far, but the idea is for these to be general-purpose plugins that can be used, everywhere, and will always be loaded). M +1 -0 rkward/plugins/analysis.pluginmap M +2 -1 rkward/plugins/data.pluginmap M +1 -0 rkward/plugins/distributions.pluginmap M +1 -1 rkward/plugins/embedded.pluginmap M +1 -0 rkward/plugins/import_export.pluginmap M +1 -0 rkward/plugins/irt.pluginmap M +1 -1 rkward/plugins/menu.pluginmap M +1 -0 rkward/plugins/plots.pluginmap M +2 -0 rkward/plugins/under_development.pluginmap http://commits.kde.org/rkward/dd393ba30811931452b87e57eb9d4f527e3ac7d7 diff --git a/rkward/plugins/analysis.pluginmap b/rkward/plugins/analysis.pluginmap index c1c8da9..39b6ec3 100644 --- a/rkward/plugins/analysis.pluginmap +++ b/rkward/plugins/analysis.pluginmap @@ -13,6 +13,7 @@ <insert snippet="rkward_version_guard"/> <require file="menu.pluginmap"/> + <require file="embedded.pluginmap"/> <components> <component type="standard" id="basic_statistics" file="uni1.2/description.xml" label="Basic Statistics" /> diff --git a/rkward/plugins/data.pluginmap b/rkward/plugins/data.pluginmap index a48c77e..abb61dc 100644 --- a/rkward/plugins/data.pluginmap +++ b/rkward/plugins/data.pluginmap @@ -1,6 +1,6 @@ <!DOCTYPE rkpluginmap> -<document base_prefix="" namespace="rkward" id="data"> +<document base_prefix="" namespace="rkward" id="data" po_id="data"> <include file="pluginmap_meta.inc"/> <about name="Data transformation and conversion" @@ -13,6 +13,7 @@ <insert snippet="rkward_version_guard"/> <require file="menu.pluginmap"/> + <require file="embedded.pluginmap"/> <components> <component type="standard" id="generate_random" file="data/generate_random.xml" label="Generate random data" /> diff --git a/rkward/plugins/distributions.pluginmap b/rkward/plugins/distributions.pluginmap index 921afe3..2ac743b 100644 --- a/rkward/plugins/distributions.pluginmap +++ b/rkward/plugins/distributions.pluginmap @@ -13,6 +13,7 @@ <insert snippet="rkward_version_guard"/> <require file="../menu.pluginmap"/> + <require file="../embedded.pluginmap"/> <components> <!-- tests --> diff --git a/rkward/plugins/embedded.pluginmap b/rkward/plugins/embedded.pluginmap index 30b504e..b1f57fa 100644 --- a/rkward/plugins/embedded.pluginmap +++ b/rkward/plugins/embedded.pluginmap @@ -1,6 +1,6 @@ <!DOCTYPE rkpluginmap> -<document base_prefix="" namespace="rkward" id="embedded" priority="hidden"> +<document base_prefix="" namespace="rkward" id="embedded" priority="hidden" po_id="embedded"> <include file="pluginmap_meta.inc"/> <about name="Embedded plugins" diff --git a/rkward/plugins/import_export.pluginmap b/rkward/plugins/import_export.pluginmap index fa386b8..c75550d 100644 --- a/rkward/plugins/import_export.pluginmap +++ b/rkward/plugins/import_export.pluginmap @@ -13,6 +13,7 @@ <insert snippet="rkward_version_guard"/> <require file="../menu.pluginmap"/> + <require file="../embedded.pluginmap"/> <components> <component type="standard" id="load_r_object" file="import/load_data.xml" label="Load R data file" /> diff --git a/rkward/plugins/irt.pluginmap b/rkward/plugins/irt.pluginmap index 95ba9cc..3a7e575 100644 --- a/rkward/plugins/irt.pluginmap +++ b/rkward/plugins/irt.pluginmap @@ -13,6 +13,7 @@ <insert snippet="rkward_version_guard"/> <require file="menu.pluginmap"/> + <require file="embedded.pluginmap"/> <components> <component type="standard" id="par_est_rasch" file="analysis/irt/dichotomous/par_est_rasch.xml" label="Rasch model fit" /> diff --git a/rkward/plugins/menu.pluginmap b/rkward/plugins/menu.pluginmap index bd96ea9..5b23ee5 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"> +<document base_prefix="" namespace="rkward" id="rkward_menu_hierarchy" priority="hidden" po_id="embedded"> <include file="pluginmap_meta.inc"/> <about name="Menu structure definition" diff --git a/rkward/plugins/plots.pluginmap b/rkward/plugins/plots.pluginmap index 235873b..38c1573 100644 --- a/rkward/plugins/plots.pluginmap +++ b/rkward/plugins/plots.pluginmap @@ -13,6 +13,7 @@ <insert snippet="rkward_version_guard"/> <require file="../menu.pluginmap"/> + <require file="../embedded.pluginmap"/> <components> <component type="standard" id="barplot" file="barplot.xml" label="Barplot" /> diff --git a/rkward/plugins/under_development.pluginmap b/rkward/plugins/under_development.pluginmap index c9aac2b..04e3ea8 100644 --- a/rkward/plugins/under_development.pluginmap +++ b/rkward/plugins/under_development.pluginmap @@ -13,6 +13,8 @@ <insert snippet="rkward_version_guard"/> <require file="menu.pluginmap"/> + <require file="embedded.pluginmap"/> + <components> <component type="standard" id="simple_anova" file="simple_anova/description.xml" label="Simple Anova" /> <component type="standard" id="sieve_plot" file="plots/sieve_plot.xml" label="Extended Sieve Plot" /> |
From: Thomas F. <tho...@ru...> - 2015-01-07 09:07:10
|
Git commit b859d7636b3a728e481a071054fd09e4e4a7050e by Thomas Friedrichsmeier. Committed on 07/01/2015 at 07:57. Pushed by tfry into branch 'master'. Fix validity-check and requiredness-handling for <valueslot> M +1 -0 ChangeLog M +1 -2 rkward/plugin/rkcomponentproperties.cpp M +1 -1 rkward/plugin/rkvarslot.cpp M +1 -1 rkward/plugins/data/recode_categorical.xml http://commits.kde.org/rkward/b859d7636b3a728e481a071054fd09e4e4a7050e diff --git a/ChangeLog b/ChangeLog index 76743f7..6491636 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +- Fixed: <valueslot>s were quirky with respect to showing as invalid - Fix a hang-on-exit issue - Add R function rk.set.plugin.status() to allow further customization of loaded plugins (hiding of individual menu entries) - Pluginmap-management was reworked, partially, and moved to Settings->Manage R packages and plugins diff --git a/rkward/plugin/rkcomponentproperties.cpp b/rkward/plugin/rkcomponentproperties.cpp index 017db0a..5807e76 100644 --- a/rkward/plugin/rkcomponentproperties.cpp +++ b/rkward/plugin/rkcomponentproperties.cpp @@ -173,8 +173,7 @@ void RKComponentPropertyAbstractList::setAllowedLength ( int min_num_items, int RKComponentPropertyAbstractList::min_num_items = min_num_items; RKComponentPropertyAbstractList::min_num_items_if_any = min_num_items_if_any; RKComponentPropertyAbstractList::max_num_items = max_num_items; - - // TODO: re-validize? + is_valid = checkListLength (); } bool RKComponentPropertyAbstractList::checkListLength () { diff --git a/rkward/plugin/rkvarslot.cpp b/rkward/plugin/rkvarslot.cpp index 2d17973..83a4ca1 100644 --- a/rkward/plugin/rkvarslot.cpp +++ b/rkward/plugin/rkvarslot.cpp @@ -101,11 +101,11 @@ RKVarSlot::RKVarSlot (const QDomElement &element, RKComponent *parent_component, if (mode == Varslot) { // initialize filters static_cast<RKComponentPropertyRObjects*> (available)->setClassFilter (xml->getStringAttribute (element, "classes", QString (), DL_INFO).split (" ", QString::SkipEmptyParts)); - setRequired (xml->getBoolAttribute (element, "required", false, DL_INFO)); static_cast<RKComponentPropertyRObjects*> (available)->setTypeFilter (xml->getStringAttribute (element, "types", QString::null, DL_INFO).split (" ", QString::SkipEmptyParts)); static_cast<RKComponentPropertyRObjects*> (available)->setDimensionFilter (xml->getIntAttribute (element, "num_dimensions", 0, DL_INFO), xml->getIntAttribute (element, "min_length", 0, DL_INFO), xml->getIntAttribute (element, "max_length", INT_MAX, DL_INFO)); } available->setStripDuplicates (!xml->getBoolAttribute (element, "allow_duplicates", false, DL_INFO)); + setRequired (xml->getBoolAttribute (element, "required", false, DL_INFO)); connect (available, SIGNAL (valueChanged(RKComponentPropertyBase*)), this, SLOT (availablePropertyChanged(RKComponentPropertyBase*))); availablePropertyChanged (available); // initialize diff --git a/rkward/plugins/data/recode_categorical.xml b/rkward/plugins/data/recode_categorical.xml index 2df0a9b..bc86dcb 100644 --- a/rkward/plugins/data/recode_categorical.xml +++ b/rkward/plugins/data/recode_categorical.xml @@ -80,7 +80,7 @@ </radio> <row> <embed id="levels" component="rkward::level_select"/> - <valueslot multi="true" min_vars="1" id="values" label="" source="levels.selector"/> + <valueslot multi="true" required="true" min_vars="1" id="values" label="" source="levels.selector"/> </row> </column> <column> |
From: Thomas F. <tho...@ru...> - 2015-01-06 20:49:55
|
Git commit 6eafe7b6dea7f631c6ca3400d55670433d104a47 by Thomas Friedrichsmeier. Committed on 06/01/2015 at 20:48. Pushed by tfry into branch 'master'. Extract messages from import_export plugins M +2 -0 Messages.sh M +4 -4 i18n/Messages.standalone.sh M +1 -1 rkward/plugins/import_export.pluginmap http://commits.kde.org/rkward/6eafe7b6dea7f631c6ca3400d55670433d104a47 diff --git a/Messages.sh b/Messages.sh index c0a83d2..0c9e8d4 100755 --- a/Messages.sh +++ b/Messages.sh @@ -12,3 +12,5 @@ $XGETTEXT `find rkward -name \*.cpp -o -name \*.h -name \*.c` rc.cpp -o $podir/r python scripts/update_plugin_messages.py --extract-only --default_po=pages --outdir=$podir rkward/pages/*.rkh # extract messages from analysis plugins: >> rkward__analysis.pot python scripts/update_plugin_messages.py --extract-only --outdir=$podir rkward/plugins/analysis.pluginmap +# extract messages from import_export plugins: >> rkward__import_export.pot +python scripts/update_plugin_messages.py --extract-only --outdir=$podir rkward/plugins/import_export.pluginmap diff --git a/i18n/Messages.standalone.sh b/i18n/Messages.standalone.sh index c14349d..4d2402a 100755 --- a/i18n/Messages.standalone.sh +++ b/i18n/Messages.standalone.sh @@ -9,9 +9,9 @@ cd ${BASEDIR}/.. /bin/sh Messages.sh rm rc.cpp -echo "Extracting messages from plugins" -cd ${BASEDIR} +#echo "Extracting messages from plugins" +#cd ${BASEDIR} # For testing purposes, extract analysis.pluginmap, only -python ../scripts/update_plugin_messages.py --extract-only --outdir=../i18n/ plugins/analysis.pluginmap +#python ../scripts/update_plugin_messages.py --extract-only --outdir=../i18n/ plugins/analysis.pluginmap #python ../scripts/extract_plugin_messages.py --outdir=../po/plugins/ --default_po=testing plugins/under_development.pluginmap -echo "Done" +#echo "Done" diff --git a/rkward/plugins/import_export.pluginmap b/rkward/plugins/import_export.pluginmap index cd5bca5..fa386b8 100644 --- a/rkward/plugins/import_export.pluginmap +++ b/rkward/plugins/import_export.pluginmap @@ -1,6 +1,6 @@ <!DOCTYPE rkpluginmap> -<document base_prefix="00saveload/" namespace="rkward" id="import_export"> +<document base_prefix="00saveload/" namespace="rkward" id="import_export" po_id="import_export"> <include file="pluginmap_meta.inc"/> <about name="Data Import and Export" |
From: Thomas F. <tho...@ru...> - 2015-01-06 20:49:49
|
Git commit 63d5d7f6430710c0c85fc2ccf2de6075d89f6601 by Thomas Friedrichsmeier. Committed on 06/01/2015 at 20:47. Pushed by tfry into branch 'master'. Fix broken reference M +1 -2 rkward/plugins/00saveload/import/load_data.rkh http://commits.kde.org/rkward/63d5d7f6430710c0c85fc2ccf2de6075d89f6601 diff --git a/rkward/plugins/00saveload/import/load_data.rkh b/rkward/plugins/00saveload/import/load_data.rkh index 6108184..00e8d44 100644 --- a/rkward/plugins/00saveload/import/load_data.rkh +++ b/rkward/plugins/00saveload/import/load_data.rkh @@ -12,8 +12,7 @@ Be sure to save your workspace before using this plugin, as your variables will <settings> <setting id="file">The filename of the file to load</setting> - <setting id="other_env">Should the data be loaded into another (specified environment) instead of the global environment?</setting> - <setting id="envir">Only applicable, if the above option is checked. Name of the environment to load the data to. If this does not yet exist, it will be created. If it already exists, it will be overwritten completely, i.e. deleting all objects inside it!</setting> + <setting id="envir">Check this option (and specify an environment), in order to load the data into an environment other than .GlobalEnv. If the specified environment does not yet exist, it will be created. If it already exists, it will be overwritten completely, i.e. deleting all objects inside it!</setting> </settings> <related> <ul> |
From: m.eik m. <mei...@un...> - 2015-01-06 20:43:59
|
Git commit 1b1512a24882316608c6c0d0bd33afea78658767 by m.eik michalke. Committed on 06/01/2015 at 20:36. Pushed by meikm into branch 'master'. fix a issue with global JS variables M +3 -0 packages/rkwarddev/ChangeLog M +2 -4 packages/rkwarddev/R/rk.JS.doc.R http://commits.kde.org/rkward/1b1512a24882316608c6c0d0bd33afea78658767 diff --git a/packages/rkwarddev/ChangeLog b/packages/rkwarddev/ChangeLog index a761708..b0a91ff 100644 --- a/packages/rkwarddev/ChangeLog +++ b/packages/rkwarddev/ChangeLog @@ -62,6 +62,9 @@ changed: - rk.JS.doc() now uses a more robust method to set global variables, namely by defining an additional function setGlobalVars() and calling that inside preprocess() + - due to changes needed for i18n and rk.JS.header() to work, check your + "result.header" values, there might be quote issues. for the most part, + remove quotes you added for rkwarddev >= 0.05-0 removed: - the functions rk.set.language() rk.get.language() were no longer useful and therefore removed diff --git a/packages/rkwarddev/R/rk.JS.doc.R b/packages/rkwarddev/R/rk.JS.doc.R index 9bbf9d5..127d580 100644 --- a/packages/rkwarddev/R/rk.JS.doc.R +++ b/packages/rkwarddev/R/rk.JS.doc.R @@ -65,14 +65,12 @@ rk.JS.doc <- function(require=c(), variables=NULL, globals=NULL, results.header= addSetGlobalVars <- FALSE # some data transformation - if(all(sapply(variables, function(x){inherits(x, "rk.JS.var")}))){ + if(!is.null(variables) & all(sapply(variables, function(x){inherits(x, "rk.JS.var")}))){ variables <- rk.paste.JS( paste0(unlist(sapply(variables, function(x){rk.paste.JS(x, var=FALSE)}))) ) } else {} - if(inherits(variables, "rk.JS.var")){ - } else {} - if(all(sapply(globals, function(x){inherits(x, "rk.JS.var")}))){ + if(!is.null(globals) & all(sapply(globals, function(x){inherits(x, "rk.JS.var")}))){ globalNames <- paste0("var ", unlist(sapply(globals, function(x){paste.JS.var(x, names.only=TRUE)})), ";", collapse="\n") globalFunction <- paste0( "function setGlobalVars(){\n", |
From: m.eik m. <mei...@un...> - 2015-01-06 20:43:59
|
Git commit 2a7c45b02699db86ef9b0a536249223c2ea99270 by m.eik michalke. Committed on 06/01/2015 at 20:39. Pushed by meikm into branch 'master'. Merge branch 'master' of git.kde.org:rkward Conflicts: packages/rkwarddev/ChangeLog M +3 -1 packages/rkwarddev/ChangeLog http://commits.kde.org/rkward/2a7c45b02699db86ef9b0a536249223c2ea99270 diff --cc packages/rkwarddev/ChangeLog index b0a91ff,0822bf7..ad5cbc2 --- a/packages/rkwarddev/ChangeLog +++ b/packages/rkwarddev/ChangeLog @@@ -62,9 -62,8 +62,11 @@@ changed - rk.JS.doc() now uses a more robust method to set global variables, namely by defining an additional function setGlobalVars() and calling that inside preprocess() + - due to changes needed for i18n and rk.JS.header() to work, check your + "result.header" values, there might be quote issues. for the most part, + remove quotes you added for rkwarddev >= 0.05-0 + - updated the generation of author and maintainer fileds in DESCRIPTIONs + made by rk.plugin.skeleton(), borrowing get.authors() from roxyPackage removed: - the functions rk.set.language() rk.get.language() were no longer useful and therefore removed |
From: Thomas F. <tho...@ru...> - 2015-01-06 20:27:06
|
Git commit 67cbb201be9a6bcee825ffd797aa133e2db16742 by Thomas Friedrichsmeier. Committed on 06/01/2015 at 20:25. Pushed by tfry into branch 'master'. Add i18n to import_export plugins (.js files; messages not yet extracted), and adjust tests. M +3 -3 rkward/plugins/00saveload/import/convert_encoding.js M +2 -2 rkward/plugins/00saveload/import/import_csv.js M +3 -3 rkward/plugins/00saveload/import/import_spss.js M +3 -3 rkward/plugins/00saveload/import/import_stata.js M +9 -6 rkward/plugins/00saveload/import/import_xls.js M +1 -1 rkward/plugins/00saveload/import/load_data.js M +1 -1 rkward/plugins/00saveload/import/source.js M +3 -8 rkward/plugins/00saveload/save/save.js M +1 -1 rkward/plugins/00saveload/save/skeleton/code.js M +1 -1 rkward/plugins/00saveload/save/write.js M +1 -1 rkward/plugins/00saveload/save/write_table.js M +2 -2 tests/import_export_plugins/import_csv.rkcommands.R M +2 -2 tests/import_export_plugins/import_csv.rkout M +1 -2 tests/import_export_plugins/import_spss.messages.txt M +2 -2 tests/import_export_plugins/import_spss.rkcommands.R M +2 -2 tests/import_export_plugins/import_spss.rkout M +2 -2 tests/import_export_plugins/import_stata.rkcommands.R M +2 -2 tests/import_export_plugins/import_stata.rkout M +2 -2 tests/import_export_plugins/load_r_object.rkcommands.R M +1 -1 tests/import_export_plugins/load_r_object.rkout M +2 -2 tests/import_export_plugins/load_source.rkcommands.R M +2 -2 tests/import_export_plugins/load_source.rkout M +2 -2 tests/import_export_plugins/package_skeleton.rkcommands.R M +1 -1 tests/import_export_plugins/package_skeleton.rkout M +4 -4 tests/import_export_plugins/save_r_object.rkcommands.R M +4 -4 tests/import_export_plugins/save_r_object.rkout M +2 -2 tests/import_export_plugins/write_csv.rkcommands.R M +2 -2 tests/import_export_plugins/write_table.rkcommands.R M +1 -1 tests/import_export_plugins/write_table.rkout M +2 -2 tests/import_export_plugins/write_vector_matrix.rkcommands.R M +1 -1 tests/import_export_plugins/write_vector_matrix.rkout http://commits.kde.org/rkward/67cbb201be9a6bcee825ffd797aa133e2db16742 diff --git a/rkward/plugins/00saveload/import/convert_encoding.js b/rkward/plugins/00saveload/import/convert_encoding.js index 09376ee..20fdc0a 100644 --- a/rkward/plugins/00saveload/import/convert_encoding.js +++ b/rkward/plugins/00saveload/import/convert_encoding.js @@ -1,7 +1,7 @@ function makeEncodingPreprocessCode () { if (!getValue ("do_locale_conversion")) return; echo ('\n'); - echo ('# helper function to convert all strings to the current encoding\n'); + comment ('helper function to convert all strings to the current encoding'); echo ('iconv.recursive <- function (x, from) {\n'); echo (' attribs <- attributes (x);\n'); echo (' if (is.character (x)) {\n'); @@ -9,7 +9,7 @@ function makeEncodingPreprocessCode () { echo (' } else if (is.list (x)) {\n'); echo (' x <- lapply (x, function (sub) iconv.recursive (sub, from))\n'); echo (' }\n'); - echo (' # convert factor levels and all other attributes\n'); + comment ('convert factor levels and all other attributes', '\t'); echo (' attributes (x) <- lapply (attribs, function (sub) iconv.recursive (sub, from))\n'); echo (' x\n'); echo ('}\n'); @@ -23,6 +23,6 @@ function makeEncodingCall (varname) { from_locale = getValue ("user_encoding"); } echo ('\n'); - echo ('# convert all strings to the current encoding\n'); + comment ('convert all strings to the current encoding'); echo (varname + ' <- iconv.recursive (' + varname + ', from="' + from_locale + '")\n'); } \ No newline at end of file diff --git a/rkward/plugins/00saveload/import/import_csv.js b/rkward/plugins/00saveload/import/import_csv.js index 160af54..3b1a3b3 100644 --- a/rkward/plugins/00saveload/import/import_csv.js +++ b/rkward/plugins/00saveload/import/import_csv.js @@ -29,7 +29,7 @@ function calculate () { //doing what is left echo (' na.strings = "' + getValue("na") + '", nrows = ' + getValue("nrows") + ', skip = ' + getValue("skip") + ', check.names = ' + getValue("checkname") + ', strip.white = ' + getValue("stripwhite") + ', blank.lines.skip = ' + getValue("blanklinesskip") + getValue("allow_escapes") + getValue("flush") + getValue("strings_as_factors") + ')\n'); echo ('\n'); - echo ('# copy from the local environment to globalenv()\n'); + comment ('copy from the local environment to globalenv()'); echo ('.GlobalEnv$' + getValue("name") + ' <- imported\n'); if (getValue ("doedit")) { echo ('\n'); @@ -38,6 +38,6 @@ function calculate () { } function printout () { - makeHeaderCode ("Import text / csv data", new Array("File" , getValue ("file"), "Import as", getValue ("name"))); + new Header (i18n ("Import text / csv data")).addFromUI ("file").addFromUI ("name").print (); } diff --git a/rkward/plugins/00saveload/import/import_spss.js b/rkward/plugins/00saveload/import/import_spss.js index 5dba0aa..2c5b8ae 100644 --- a/rkward/plugins/00saveload/import/import_spss.js +++ b/rkward/plugins/00saveload/import/import_spss.js @@ -27,7 +27,7 @@ function calculate () { makeEncodingCall ('data'); if (getValue ("convert_var_labels")) { echo ('\n'); - echo ('# set variable labels for use in RKWard\n'); + comment ('set variable labels for use in RKWard'); echo ('labels <- attr (data, "variable.labels");\n'); echo ('if (!is.null (labels)) {\n'); echo (' for (i in 1:length (labels)) {\n'); @@ -39,13 +39,13 @@ function calculate () { echo ('}\n'); } echo ('\n'); - echo ('.GlobalEnv$' + object + ' <- data # assign to globalenv()\n'); + echo ('.GlobalEnv$' + object + ' <- data '); comment ('assign to globalenv()'); if (getValue ("doedit") && data_frame) { echo ('rk.edit (.GlobalEnv$' + object + ')\n'); } } function printout () { - makeHeaderCode ("Import SPSS data", new Array("File", getValue ("file"), "Import as", getValue ("saveto"))); + new Header (i18n ("Import SPSS data")).addFromUI ("file").addFromUI ("saveto").print (); } diff --git a/rkward/plugins/00saveload/import/import_stata.js b/rkward/plugins/00saveload/import/import_stata.js index 5bdb3a5..ae85ffe 100644 --- a/rkward/plugins/00saveload/import/import_stata.js +++ b/rkward/plugins/00saveload/import/import_stata.js @@ -37,7 +37,7 @@ function calculate () { echo ('data <- read.dta ("' + getValue ("file") + '"' + options + ')\n'); makeEncodingCall ('data'); echo ('\n'); - echo ('# set variable labels for use in RKWard\n'); + comment ('set variable labels for use in RKWard'); echo ('labels <- attr (data, "var.labels")\n'); echo ('if (!is.null (labels)) {\n'); echo (' for (i in 1:length (labels)) {\n'); @@ -48,13 +48,13 @@ function calculate () { echo (' }\n'); echo ('}\n'); echo ('\n'); - echo ('.GlobalEnv$' + object + ' <- data # assign to globalenv()\n'); + echo ('.GlobalEnv$' + object + ' <- data '); comment ('assign to globalenv()'); if (getValue ("doedit") ) { echo ('rk.edit (.GlobalEnv$' + object + ')\n'); } } function printout () { - makeHeaderCode ("Import Stata File", new Array("File", getValue ("file"), "Imported to", getValue ("saveto"))); + new Header (i18n ("Import Stata File")).addFromUI ("file").addFromUI ("saveto").print (); } diff --git a/rkward/plugins/00saveload/import/import_xls.js b/rkward/plugins/00saveload/import/import_xls.js index ffcfa11..a44ebbe 100644 --- a/rkward/plugins/00saveload/import/import_xls.js +++ b/rkward/plugins/00saveload/import/import_xls.js @@ -20,17 +20,20 @@ function calculate () { echo ('data <- read.xls ("' + getValue ("file") + '", sheet="' + sheet + '"' + options + ', '); echo (' nrows=' + getValue ("nrows") + ', skip=' + getValue ("skip") + ', na.string="'+ getValue ("na") +'"' + getValue("strings_as_factors") + ', check.names = ' + getValue("checkname") + ', strip.white = ' + getValue("stripwhite") + ')\n'); - echo ('.GlobalEnv$' + object + ' <- data # assign to globalenv()\n'); + echo ('.GlobalEnv$' + object + ' <- data '); comment ('assign to globalenv()'); if (getValue ("doedit") ) { echo ('rk.edit (.GlobalEnv$' + object + ')\n'); } } function printout () { - makeHeaderCode ("Import Microsoft EXCEL sheet", new Array("File", getValue ("file"), "Imported to", getValue ("saveto"), - "Imported Sheet", getValue ("sheetname"), "First row as header", getValue ("header"), - "Max number of rows to skip (-1 for no limit)", getValue ("skip"), - "Number of lines to read (-1 for no limit)", getValue ("nrows"), - "Character for missing values", getValue ("na"))); + new Header (i18n ("Import Microsoft EXCEL sheet")) + .addFromUI ("file") + .addFromUI ("saveto") + .addFromUI ("sheetname") + .addFromUI ("header") + .addFromUI ("skip") + .addFromUI ("nrows") + .addFromUI ("na").print (); } diff --git a/rkward/plugins/00saveload/import/load_data.js b/rkward/plugins/00saveload/import/load_data.js index 3b40678..a3c9477 100644 --- a/rkward/plugins/00saveload/import/load_data.js +++ b/rkward/plugins/00saveload/import/load_data.js @@ -17,7 +17,7 @@ function calculate () { } function printout () { - makeHeaderCode ("Load data", new Array("File", getValue ("file"), "Import to environment", envir)); + new Header (i18n ("Load data")).addFromUI ("file").add (i18n ("Import to environment"), envir).print (); } diff --git a/rkward/plugins/00saveload/import/source.js b/rkward/plugins/00saveload/import/source.js index 4a642a2..092f8af 100644 --- a/rkward/plugins/00saveload/import/source.js +++ b/rkward/plugins/00saveload/import/source.js @@ -19,7 +19,7 @@ function calculate () { } function printout () { - makeHeaderCode ("Source R file", new Array("File", getValue ("file"))); + new Header (i18n ("Source R file")).addFromUI ("file").print (); } diff --git a/rkward/plugins/00saveload/save/save.js b/rkward/plugins/00saveload/save/save.js index 56d4790..64d60f3 100644 --- a/rkward/plugins/00saveload/save/save.js +++ b/rkward/plugins/00saveload/save/save.js @@ -1,9 +1,5 @@ -// globals -var data; -var file; - function calculate(){ - file = getValue("file"); + var file = getValue("file"); // read in variables from dialog var ascii = getValue("ascii"); var compress = getValue("compress"); @@ -11,7 +7,7 @@ function calculate(){ var xzextreme = getValue("xzextreme"); // the R code to be evaluated - data = getValue("data").split("\n").join(", "); + var data = getValue("data").split("\n").join(", "); echo("save(" + data); if(file) { echo(",\n\tfile=\"" + file + "\""); @@ -30,7 +26,6 @@ function calculate(){ } function printout(){ - // printout the results - makeHeaderCode ("Save R objects", new Array("File", file, "Variables", data)); + new Header (i18n ("Save R objects")).addFromUI ("file").addFromUI ("data").print (); } diff --git a/rkward/plugins/00saveload/save/skeleton/code.js b/rkward/plugins/00saveload/save/skeleton/code.js index 208edd8..5b048a5 100644 --- a/rkward/plugins/00saveload/save/skeleton/code.js +++ b/rkward/plugins/00saveload/save/skeleton/code.js @@ -5,6 +5,6 @@ function calculate () { } function printout () { - makeHeaderCode ("Create package skeleton", new Array("Name", getValue ("name"), "Directory", getValue ("path"))); + new Header (i18n ("Create package skeleton")).addFromUI ("name").addFromUI ("path").print (); } diff --git a/rkward/plugins/00saveload/save/write.js b/rkward/plugins/00saveload/save/write.js index 60db98f..10847c1 100644 --- a/rkward/plugins/00saveload/save/write.js +++ b/rkward/plugins/00saveload/save/write.js @@ -8,6 +8,6 @@ function calculate () { } function printout () { - makeHeaderCode ("Write Variables", new Array("File", getValue ("file"), "Data", getValue ("data"))); + new Header (i18n ("Write Variables")).addFromUI ("file").addFromUI ("data").print (); } diff --git a/rkward/plugins/00saveload/save/write_table.js b/rkward/plugins/00saveload/save/write_table.js index 5c7dda4..e109973 100644 --- a/rkward/plugins/00saveload/save/write_table.js +++ b/rkward/plugins/00saveload/save/write_table.js @@ -7,6 +7,6 @@ function calculate () { } function printout () { - makeHeaderCode ("Write as table", new Array("File", getValue ("file"), "Data", getValue ("data"))); + new Header (i18n ("Write as table")).addFromUI ("file").addFromUI ("data").print (); } diff --git a/tests/import_export_plugins/import_csv.rkcommands.R b/tests/import_export_plugins/import_csv.rkcommands.R index 5f644dc..f0e42cb 100644 --- a/tests/import_export_plugins/import_csv.rkcommands.R +++ b/tests/import_export_plugins/import_csv.rkcommands.R @@ -5,6 +5,6 @@ imported <- read.csv (file="women.csv", row.names=1, na.strings = "NA", nrows = # copy from the local environment to globalenv() .GlobalEnv$women <- imported ## Print result -rk.header("Import text / csv data", parameters=list("File", "women.csv", - "Import as", "women")) +rk.header ("Import text / csv data", parameters=list("File name"="women.csv", + "Object to save to"="women")) }) diff --git a/tests/import_export_plugins/import_csv.rkout b/tests/import_export_plugins/import_csv.rkout index e475a62..fbefe8d 100644 --- a/tests/import_export_plugins/import_csv.rkout +++ b/tests/import_export_plugins/import_csv.rkout @@ -1,6 +1,6 @@ <h1>Import text / csv data</h1> <h2>Parameters</h2> -<ul><li>File: women.csv</li> -<li>Import as: women</li> +<ul><li>File name: women.csv</li> +<li>Object to save to: women</li> </ul> DATE<br /> diff --git a/tests/import_export_plugins/import_spss.messages.txt b/tests/import_export_plugins/import_spss.messages.txt index a590d52..c0a0975 100644 --- a/tests/import_export_plugins/import_spss.messages.txt +++ b/tests/import_export_plugins/import_spss.messages.txt @@ -1,3 +1,2 @@ -Warning message: -In read.spss("import_export_plugins_testfile.sav", to.data.frame = TRUE, : +Warning in read.spss("import_export_plugins_testfile.sav", to.data.frame = TRUE, : import_export_plugins_testfile.sav: position 1: Variable name character 4 is lowercase letter � diff --git a/tests/import_export_plugins/import_spss.rkcommands.R b/tests/import_export_plugins/import_spss.rkcommands.R index dffa75d..520d57f 100644 --- a/tests/import_export_plugins/import_spss.rkcommands.R +++ b/tests/import_export_plugins/import_spss.rkcommands.R @@ -17,6 +17,6 @@ if (!is.null (labels)) { .GlobalEnv$my.spss.data <- data # assign to globalenv() ## Print result -rk.header("Import SPSS data", parameters=list("File", "import_export_plugins_testfile.sav", - "Import as", "my.spss.data")) +rk.header ("Import SPSS data", parameters=list("File name"="import_export_plugins_testfile.sav", + "Object to save to"="my.spss.data")) }) diff --git a/tests/import_export_plugins/import_spss.rkout b/tests/import_export_plugins/import_spss.rkout index 2724a7b..8d42faf 100644 --- a/tests/import_export_plugins/import_spss.rkout +++ b/tests/import_export_plugins/import_spss.rkout @@ -1,7 +1,7 @@ <h1>Import SPSS data</h1> <h2>Parameters</h2> -<ul><li>File: import_export_plugins_testfile.sav</li> -<li>Import as: my.spss.data</li> +<ul><li>File name: import_export_plugins_testfile.sav</li> +<li>Object to save to: my.spss.data</li> </ul> DATE<br /> diff --git a/tests/import_export_plugins/import_stata.rkcommands.R b/tests/import_export_plugins/import_stata.rkcommands.R index 1b0b680..d122765 100644 --- a/tests/import_export_plugins/import_stata.rkcommands.R +++ b/tests/import_export_plugins/import_stata.rkcommands.R @@ -33,6 +33,6 @@ if (!is.null (labels)) { .GlobalEnv$my.stata.data <- data # assign to globalenv() ## Print result -rk.header("Import Stata File", parameters=list("File", "import_export_plugins_testfile.dta", - "Imported to", "my.stata.data")) +rk.header ("Import Stata File", parameters=list("File name"="import_export_plugins_testfile.dta", + "Object to save to"="my.stata.data")) }) diff --git a/tests/import_export_plugins/import_stata.rkout b/tests/import_export_plugins/import_stata.rkout index 1aa2c3a..814ce12 100644 --- a/tests/import_export_plugins/import_stata.rkout +++ b/tests/import_export_plugins/import_stata.rkout @@ -1,7 +1,7 @@ <h1>Import Stata File</h1> <h2>Parameters</h2> -<ul><li>File: import_export_plugins_testfile.dta</li> -<li>Imported to: my.stata.data</li> +<ul><li>File name: import_export_plugins_testfile.dta</li> +<li>Object to save to: my.stata.data</li> </ul> DATE<br /> diff --git a/tests/import_export_plugins/load_r_object.rkcommands.R b/tests/import_export_plugins/load_r_object.rkcommands.R index 071a358..617cf5a 100644 --- a/tests/import_export_plugins/load_r_object.rkcommands.R +++ b/tests/import_export_plugins/load_r_object.rkcommands.R @@ -2,6 +2,6 @@ local({ ## Compute load (file="women.RData", envir=globalenv()) ## Print result -rk.header("Load data", parameters=list("File", "women.RData", - "Import to environment", "globalenv()")) +rk.header ("Load data", parameters=list("R data file to load"="women.RData", + "Import to environment"="globalenv()")) }) diff --git a/tests/import_export_plugins/load_r_object.rkout b/tests/import_export_plugins/load_r_object.rkout index dd0035c..c44a620 100644 --- a/tests/import_export_plugins/load_r_object.rkout +++ b/tests/import_export_plugins/load_r_object.rkout @@ -1,6 +1,6 @@ <h1>Load data</h1> <h2>Parameters</h2> -<ul><li>File: women.RData</li> +<ul><li>R data file to load: women.RData</li> <li>Import to environment: globalenv()</li> </ul> DATE<br /> diff --git a/tests/import_export_plugins/load_source.rkcommands.R b/tests/import_export_plugins/load_source.rkcommands.R index 8a20ade..2bb4ad4 100644 --- a/tests/import_export_plugins/load_source.rkcommands.R +++ b/tests/import_export_plugins/load_source.rkcommands.R @@ -2,11 +2,11 @@ local({ ## Compute source (file="source.R", local=TRUE, verbose=FALSE, print.eval=FALSE, chdir=FALSE) ## Print result -rk.header("Source R file", parameters=list("File", "source.R")) +rk.header ("Source R file", parameters=list("File name"="source.R")) }) local({ ## Compute source (file="source.R", local=FALSE, echo=TRUE, max.deparse.length=150, verbose=FALSE, print.eval=FALSE, chdir=FALSE) ## Print result -rk.header("Source R file", parameters=list("File", "source.R")) +rk.header ("Source R file", parameters=list("File name"="source.R")) }) diff --git a/tests/import_export_plugins/load_source.rkout b/tests/import_export_plugins/load_source.rkout index 12a74a6..f07106c 100644 --- a/tests/import_export_plugins/load_source.rkout +++ b/tests/import_export_plugins/load_source.rkout @@ -1,6 +1,6 @@ <h1>Source R file</h1> <h2>Parameters</h2> -<ul><li>File: source.R</li> +<ul><li>File name: source.R</li> </ul> DATE<br /> <h2>Messages, warnings, or errors:</h2> @@ -8,7 +8,7 @@ DATE<br /> </pre> <h1>Source R file</h1> <h2>Parameters</h2> -<ul><li>File: source.R</li> +<ul><li>File name: source.R</li> </ul> DATE<br /> <h2>Messages, warnings, or errors:</h2> diff --git a/tests/import_export_plugins/package_skeleton.rkcommands.R b/tests/import_export_plugins/package_skeleton.rkcommands.R index 68b4b52..1ee3bd4 100644 --- a/tests/import_export_plugins/package_skeleton.rkcommands.R +++ b/tests/import_export_plugins/package_skeleton.rkcommands.R @@ -2,6 +2,6 @@ local({ ## Compute package.skeleton(name="anRpackage", list=c('skel.func1','skel.func2'), path=".", force= TRUE) ## Print result -rk.header("Create package skeleton", parameters=list("Name", "anRpackage", - "Directory", ".")) +rk.header ("Create package skeleton", parameters=list("Package name"="anRpackage", + "Directory"=".")) }) diff --git a/tests/import_export_plugins/package_skeleton.rkout b/tests/import_export_plugins/package_skeleton.rkout index ce09a54..79bc7fc 100644 --- a/tests/import_export_plugins/package_skeleton.rkout +++ b/tests/import_export_plugins/package_skeleton.rkout @@ -1,6 +1,6 @@ <h1>Create package skeleton</h1> <h2>Parameters</h2> -<ul><li>Name: anRpackage</li> +<ul><li>Package name: anRpackage</li> <li>Directory: .</li> </ul> DATE<br /> diff --git a/tests/import_export_plugins/save_r_object.rkcommands.R b/tests/import_export_plugins/save_r_object.rkcommands.R index 1ac0fa7..a06b9f7 100644 --- a/tests/import_export_plugins/save_r_object.rkcommands.R +++ b/tests/import_export_plugins/save_r_object.rkcommands.R @@ -7,8 +7,8 @@ save(testx, compression_level=6) ## Print result -rk.header("Save R objects", parameters=list("File", "x.RData", - "Variables", "testx")) +rk.header ("Save R objects", parameters=list("File name"="x.RData", + "Object"="testx")) }) local({ ## Compute @@ -18,6 +18,6 @@ save(testy, compression_level=-9) ## Print result -rk.header("Save R objects", parameters=list("File", "y.RData", - "Variables", "testy")) +rk.header ("Save R objects", parameters=list("File name"="y.RData", + "Object"="testy")) }) diff --git a/tests/import_export_plugins/save_r_object.rkout b/tests/import_export_plugins/save_r_object.rkout index 6879230..602f6b0 100644 --- a/tests/import_export_plugins/save_r_object.rkout +++ b/tests/import_export_plugins/save_r_object.rkout @@ -1,12 +1,12 @@ <h1>Save R objects</h1> <h2>Parameters</h2> -<ul><li>File: x.RData</li> -<li>Variables: testx</li> +<ul><li>File name: x.RData</li> +<li>Object: testx</li> </ul> DATE<br /> <h1>Save R objects</h1> <h2>Parameters</h2> -<ul><li>File: y.RData</li> -<li>Variables: testy</li> +<ul><li>File name: y.RData</li> +<li>Object: testy</li> </ul> DATE<br /> diff --git a/tests/import_export_plugins/write_csv.rkcommands.R b/tests/import_export_plugins/write_csv.rkcommands.R index a6c4d11..8284149 100644 --- a/tests/import_export_plugins/write_csv.rkcommands.R +++ b/tests/import_export_plugins/write_csv.rkcommands.R @@ -1,5 +1,5 @@ local({ -## Berechne +## Compute # some options can't be changed with write.csv() and are set to these values: # append=FALSE, sep=",", dec=".", col.names=NA, qmethod="double" @@ -9,7 +9,7 @@ local({ fileEncoding="" ) -## Drucke Ergebnisse +## Print result rk.header ("Export Table / CSV files", parameters=list("File"="data", "Data"="women")) }) diff --git a/tests/import_export_plugins/write_table.rkcommands.R b/tests/import_export_plugins/write_table.rkcommands.R index 610437d..516a7e9 100644 --- a/tests/import_export_plugins/write_table.rkcommands.R +++ b/tests/import_export_plugins/write_table.rkcommands.R @@ -2,6 +2,6 @@ local({ ## Compute write.table ( x = women , file = "data" , append = FALSE ,quote = TRUE , sep = '\t' , eol = "\n" , na = "NA" , dec = '.' , row.names = FALSE , col.names = TRUE , qmethod= 'escape' ) ## Print result -rk.header("Write as table", parameters=list("File", "data", - "Data", "women")) +rk.header ("Write as table", parameters=list("Name of the file"="data", + "Data"="women")) }) diff --git a/tests/import_export_plugins/write_table.rkout b/tests/import_export_plugins/write_table.rkout index b973e8f..1344a60 100644 --- a/tests/import_export_plugins/write_table.rkout +++ b/tests/import_export_plugins/write_table.rkout @@ -1,6 +1,6 @@ <h1>Write as table</h1> <h2>Parameters</h2> -<ul><li>File: data</li> +<ul><li>Name of the file: data</li> <li>Data: women</li> </ul> DATE<br /> diff --git a/tests/import_export_plugins/write_vector_matrix.rkcommands.R b/tests/import_export_plugins/write_vector_matrix.rkcommands.R index ea3bea1..a1234bd 100644 --- a/tests/import_export_plugins/write_vector_matrix.rkcommands.R +++ b/tests/import_export_plugins/write_vector_matrix.rkcommands.R @@ -2,6 +2,6 @@ local({ ## Compute write (x=testx, file="data", ncolumns=2, append=FALSE, sep=",") ## Print result -rk.header("Write Variables", parameters=list("File", "data", - "Data", "testx")) +rk.header ("Write Variables", parameters=list("File name"="data", + "Data"="testx")) }) diff --git a/tests/import_export_plugins/write_vector_matrix.rkout b/tests/import_export_plugins/write_vector_matrix.rkout index 5c59ca2..fd15e2b 100644 --- a/tests/import_export_plugins/write_vector_matrix.rkout +++ b/tests/import_export_plugins/write_vector_matrix.rkout @@ -1,6 +1,6 @@ <h1>Write Variables</h1> <h2>Parameters</h2> -<ul><li>File: data</li> +<ul><li>File name: data</li> <li>Data: testx</li> </ul> DATE<br /> |