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: Yuri C. <yu...@uk...> - 2015-02-05 06:51:52
|
Git commit 27341fd81207b2d3350a4f6afad0b4dc5c7e6fc4 by Yuri Chornoivan. Committed on 05/02/2015 at 06:51. Pushed by yurchor into branch 'master'. Some more fixes in docs M +22 -22 doc/rkwardplugins/index.docbook http://commits.kde.org/rkward/27341fd81207b2d3350a4f6afad0b4dc5c7e6fc4 diff --git a/doc/rkwardplugins/index.docbook b/doc/rkwardplugins/index.docbook index 8c8bdd3..5df1ecb 100644 --- a/doc/rkwardplugins/index.docbook +++ b/doc/rkwardplugins/index.docbook @@ -426,10 +426,10 @@ This is a guide to writing plugins for &rkward;. </para> <programlisting> <tab label="Options"> - <check box id="varequal" label="assume equal variances" value=", var.equal=TRUE"/> + <checkbox id="varequal" label="assume equal variances" value=", var.equal=TRUE"/> </programlisting> <para> - By default elements will be placed top-to-bottom like in a <command><column></command>. Since that is what we want here, we don't have to explicitly state a <command><row></command> or <command><column></command> layout. The first element we define is a check box. Just like the <command><radio></command><command><option></command>s, the check box has a <parameter>label</parameter> and a <parameter>value</parameter>. The <parameter>value</parameter> is what gets returned, if the check box is checked. Of course the check box also needs an <parameter>id</parameter>. + By default elements will be placed top-to-bottom like in a <command><column></command>. Since that is what we want here, we don't have to explicitly state a <command><row></command> or <command><column></command> layout. The first element we define is a checkbox. Just like the <command><radio></command><command><option></command>s, the checkbox has a <parameter>label</parameter> and a <parameter>value</parameter>. The <parameter>value</parameter> is what gets returned, if the check box is checked. Of course the checkbox also needs an <parameter>id</parameter>. </para> <programlisting> <frame label="Confidence Interval" id="frame_conf_int"> @@ -438,15 +438,15 @@ This is a guide to writing plugins for &rkward;. Here's yet another layout element: In order to signal that the two elements below belong together, we draw a <command><frame></command> (box). That frame may have a <parameter>label</parameter> (caption). Since the frame is just a passive layout element, it does not need an <parameter>id</parameter>, we still define one here, as we'll refer to it later, when defining an additional wizard interface. </para> <programlisting> - <check box id="confint" label="print confidence interval" value="1" checked="true"/> + <checkbox id="confint" label="print confidence interval" value="1" checked="true"/> <spinbox type="real" id="conflevel" label="confidence level" min="0" max="1" initial="0.95"/> </frame> </programlisting> <para> - Inside the <command><frame></command> we place another <command><check box></command> (using <parameter>checked=</parameter><replaceable>"true"</replaceable>, we signal that check box should be checked by default), and a <command><spinbox></command>. The spinbox allows the user to select a value between <replaceable>"min"</replaceable> and <replaceable>"max"</replaceable> with the default/initial value <replaceable>"0.95"</replaceable>. Setting the <parameter>type</parameter> to <replaceable>"real"</replaceable> signals that real numbers are accepted as opposed to <parameter>type=</parameter><replaceable>"integer"</replaceable> which would accept integers only. + Inside the <command><frame></command> we place another <command><checkbox></command> (using <parameter>checked=</parameter><replaceable>"true"</replaceable>, we signal that check box should be checked by default), and a <command><spinbox></command>. The spinbox allows the user to select a value between <replaceable>"min"</replaceable> and <replaceable>"max"</replaceable> with the default/initial value <replaceable>"0.95"</replaceable>. Setting the <parameter>type</parameter> to <replaceable>"real"</replaceable> signals that real numbers are accepted as opposed to <parameter>type=</parameter><replaceable>"integer"</replaceable> which would accept integers only. </para> <note><para> - It is also possible, and often preferable, to make the <command><frame></command> itself checkable, instead of adding a <command><check box></command> inside. See the reference for details. This is not done here, for illustrational purposes. + It is also possible, and often preferable, to make the <command><frame></command> itself checkable, instead of adding a <command><checkbox></command> inside. See the reference for details. This is not done here, for illustrational purposes. </para></note> <programlisting> </tab> @@ -513,12 +513,12 @@ This is a guide to writing plugins for &rkward;. </para> <sect2 id="radio_vs_checkbox_vs_dropdown"> - <title><radio> vs. <check box> vs. <dropdown></title> + <title><radio> vs. <checkbox> vs. <dropdown></title> <para> - The three elements <command><radio></command>, <command><check box></command>, <command><dropdown></command>, all serve a similar function: To select one out of several options. Obviously, a check box only allows to chose between two options: checked or not checked, so you cannot use it, if there are more than two options to chose from. But when to use which of the elements? Some rules of thumb: + The three elements <command><radio></command>, <command><checkbox></command>, <command><dropdown></command>, all serve a similar function: To select one out of several options. Obviously, a check box only allows to choose between two options: checked or not checked, so you cannot use it, if there are more than two options to chose from. But when to use which of the elements? Some rules of thumb: </para> <para> - If you find yourself creating a <command><radio></command> or <command><dropdown></command> with only two options, ask yourself, whether the question is essentially a yes / no type of question. E.g. a choice between <quote>adjust results</quote> and <quote>do not adjust results</quote>, or between <quote>remove missing values</quote> and <quote>keep missing values</quote>. In this case a <command><check box></command> is the best choice: It uses little space, will have the least words of labels, and is easiest to read for the user. There are very few situations where you should chose a <command><radio></command> over a <command><check box></command>, when there are only two options. An example of that might be: <quote>Method of calculation: 'pearson'/'spearman'</quote>. Here, more methods might be thinkable, and they don't really form a pair of opposites. + If you find yourself creating a <command><radio></command> or <command><dropdown></command> with only two options, ask yourself, whether the question is essentially a yes / no type of question. E.g. a choice between <quote>adjust results</quote> and <quote>do not adjust results</quote>, or between <quote>remove missing values</quote> and <quote>keep missing values</quote>. In this case a <command><checkbox></command> is the best choice: It uses little space, will have the least words of labels, and is easiest to read for the user. There are very few situations where you should chose a <command><radio></command> over a <command><checkbox></command>, when there are only two options. An example of that might be: <quote>Method of calculation: 'pearson'/'spearman'</quote>. Here, more methods might be thinkable, and they don't really form a pair of opposites. </para> <para> Chosing between a <command><radio></command> and a <command><dropdown></command> is mostly a question of space. The <command><dropdown></command> has the advantage of using little space, even if there are a lot of options to chose from. On the other hand, a <command><radio></command> has the advantage of making all possible choices visible to the user at once, without clicking on the dropdown arrow. Generally, if there are six or more options to chose from, a <command><dropdown></command> is preferable. If there are five or less options, a <command><radio></command> is the better choice. @@ -571,7 +571,7 @@ function calculate () { res <- t.test ( </screen> <para> - as plain text. Next we need to fill in the value, the user selected as the first variable. We fetch this using <function>getString ("x")</function>, and append it to the string to be <quote>echoed</quote>. This prints out the value of the GUI-element with <parameter>id=</parameter><replaceable>"x"</replaceable>: our first <command><check box></command>. Next, we append a ', ', and do the same to fetch the value of the element <replaceable>"y"</replaceable> - the second <command><check box></command>. For the hypothesis (the <command><radio></command> group), and the equal variances <command><check box></command>, the procedure is very similar. + as plain text. Next we need to fill in the value, the user selected as the first variable. We fetch this using <function>getString ("x")</function>, and append it to the string to be <quote>echoed</quote>. This prints out the value of the GUI-element with <parameter>id=</parameter><replaceable>"x"</replaceable>: our first <command><checkbox></command>. Next, we append a ', ', and do the same to fetch the value of the element <replaceable>"y"</replaceable> - the second <command><checkbox></command>. For the hypothesis (the <command><radio></command> group), and the equal variances <command><checkbox></command>, the procedure is very similar. </para> <para> Note that instead of concatenating the output snippets with <quote>+</quote>, you can also use several <function>echo()</function> statments. Everything is printed on a single line. To produce a line break in the generated code, insert a <replaceable>"\n"</replaceable> in the echoed string. In theory, you can even produce many lines with a single echo-statement, but please keep it to one line (or less) of generated code per <function>echo()</function>. @@ -675,7 +675,7 @@ if (my.rotation > wobble.rotation.limit (x)) { <sect2 id="policysimplicity"> <title>Dealing with complex options</title> <para> - Many plugins can do more than one thing. For instance, the <quote>Descriptive Statistics</quote> plugin can compute mean, range, sum, product, median, length, &etc; However, typically the user will only chose to have some of those calculations performed. In this case, please try to keep the generated code as simple as possible. It should only contain portions relevant to the options that are actually selected. To achieve this, here is an example of a common design patterns as you would use it (in JS; here, "domean", "domedian", and "dosd" would be <check box> elements): + Many plugins can do more than one thing. For instance, the <quote>Descriptive Statistics</quote> plugin can compute mean, range, sum, product, median, length, &etc; However, typically the user will only chose to have some of those calculations performed. In this case, please try to keep the generated code as simple as possible. It should only contain portions relevant to the options that are actually selected. To achieve this, here is an example of a common design patterns as you would use it (in JS; here, "domean", "domedian", and "dosd" would be <checkbox> elements): </para> <programlisting> function calculate () { @@ -1888,8 +1888,8 @@ x </components ...> an <replaceable>i18n_context</replaceable> like this: </para> <programlisting> -<check box id="scale" label="Scale" i18n_context="Show the scale"/> -<check box id="scale" label="Scale" i18n_context="Scale the plot"/> +<checkbox id="scale" label="Scale" i18n_context="Show the scale"/> +<checkbox id="scale" label="Scale" i18n_context="Scale the plot"/> </programlisting> <para> Providing <replaceable>i18n_context</replaceable> will cause the two strings to be translated separately. Otherwise they would share a single translation. In addition, the context @@ -2263,7 +2263,7 @@ standards for each defined suite. <chapter id="rkwarddev"> <title>Plugin development with the <application>rkwarddev</application> package</title> <sect1 id="rkdev_overview"><title>Overview</title> - <para>Writing external plugins involves writing files in three languages (XML, JavaScript and R) and the creation of a standardized hierarchy of directories. To make this a lot easier for willing plugin developers, we're providing the <application>rkwarddev</application> package. It provides a number of simple &r; functions to create the XML code for all dialog elements like tabbooks, check boxes, dropdownlists or filebrowsers, as well as functions to create JavaScript code and &rkward; help files to start with. The function <function>rk.plugin.skeleton()</function> creates the expected directory tree and all necessary files where they are supposed to be.</para> + <para>Writing external plugins involves writing files in three languages (XML, JavaScript and R) and the creation of a standardized hierarchy of directories. To make this a lot easier for willing plugin developers, we're providing the <application>rkwarddev</application> package. It provides a number of simple &r; functions to create the XML code for all dialog elements like tabbooks, checkboxes, dropdownlists or filebrowsers, as well as functions to create JavaScript code and &rkward; help files to start with. The function <function>rk.plugin.skeleton()</function> creates the expected directory tree and all necessary files where they are supposed to be.</para> <para>This package is not installed by default, but has to be installed manually from <ulink url="http://files.kde.org/rkward/R/">&rkward;'s own repository</ulink>. You can either do that by using the GUI interface (<menuchoice><guimenu>Settings</guimenu><guimenuitem>Configure packages</guimenuitem></menuchoice>), or from any running &r; session:</para> <programlisting> install.packages("rkwarddev", repos="http://files.kde.org/rkward/R") @@ -2331,7 +2331,7 @@ basic.settings <- rk.XML.row(variables, rk.XML.col(var.x, var.y, test.hypothe <option label="First is greater" value="greater" /> <option label="Second is greater" value="less" /> </radio> - <check box id="chc_Pardsmpl" label="Paired sample" value="1" value_unchecked="0" /> + <checkbox id="chc_Pardsmpl" label="Paired sample" value="1" value_unchecked="0" /> </column> </row> </programlisting> @@ -2546,7 +2546,7 @@ local({ </varlistentry> <varlistentry> <term>Boolean properties</term> -<listitem><para>Properties that can either be on or off, true or false. For instance the properties created by <convert>-tags, also the property accompanying a <check box> (see below). The following values will be returned according to the given modifier: +<listitem><para>Properties that can either be on or off, true or false. For instance the properties created by <convert>-tags, also the property accompanying a <checkbox> (see below). The following values will be returned according to the given modifier: <variablelist> <varlistentry> <term>No modifier ("")</term> @@ -2554,7 +2554,7 @@ local({ </varlistentry> <varlistentry> <term>"labeled"</term> - <listitem><para>Returns the string "true" when true, "false", when false, or whichever custom strings have been specified (typically in a <check box>).</para></listitem> + <listitem><para>Returns the string "true" when true, "false", when false, or whichever custom strings have been specified (typically in a <checkbox>).</para></listitem> </varlistentry> <varlistentry> <term>"true"</term> @@ -2993,7 +2993,7 @@ have an "id" of their own, but see below. Attributes: </varlistentry> <varlistentry> -<term><check box></term> +<term><checkbox></term> <listitem><para>Defines a check box, &ie; a single option that can either be set to on or off. Attributes: <variablelist> <varlistentry> @@ -3622,12 +3622,12 @@ Child elements <true>, <false>, <case>, and <default> ta </varlistentry> <varlistentry> -<term><check box></term> +<term><checkbox></term> <listitem><para>Default property is "state.labeled", which means that the values specified by the <parameter>value</parameter>, and <parameter>value_unchecked</parameter>-attributes are returned, <emphasis>not</emphasis> the displayed label of the check box. <variablelist> <varlistentry> <term>state</term> - <listitem><para>State of the check box (on or off). Note that useful modifiers of this property (as of all boolean properties) are "not" and "labeled" (see <link linkend="propertytypes">types of properties</link>). However, often it is most useful to connect to the property with no modifier, &ie; "<emphasis>check box_id</emphasis>.state", which will return the state of the check box in a format suitable for use in an if statement (0 or 1). (boolean)</para></listitem> + <listitem><para>State of the check box (on or off). Note that useful modifiers of this property (as of all boolean properties) are "not" and "labeled" (see <link linkend="propertytypes">types of properties</link>). However, often it is most useful to connect to the property with no modifier, &ie; "<emphasis>checkbox_id</emphasis>.state", which will return the state of the check box in a format suitable for use in an if statement (0 or 1). (boolean)</para></listitem> </varlistentry> </variablelist></para></listitem> </varlistentry> @@ -3834,7 +3834,7 @@ different types, using modifiers may lead to errors. For <replaceable>fixed_valu <entry>Plots->Barplot, most other plotting plugins</entry> </row> <row> - <entry>rkward::plot_color_choser</entry> + <entry>rkward::color_chooser</entry> <entry>embedded.pluginmap</entry> <entry>Very simple plugin for specifying a color. Current implementation provides a list of color names. Future implementations may provide more elaborate color picking.</entry> @@ -3871,7 +3871,7 @@ different types, using modifiers may lead to errors. For <replaceable>fixed_valu <entry>Plots->Barplot</entry> </row> <row> - <entry>rkward::x11_grid</entry> + <entry>rkward::grid</entry> <entry>embedded.pluginmap</entry> <entry>Add grid to a plot</entry> <entry>In an existing plot window: Edit->Draw grid.</entry> @@ -3901,7 +3901,7 @@ different types, using modifiers may lead to errors. For <replaceable>fixed_valu <variablelist> <varlistentry> <term>base_prefix</term> - <listitem><para>Filenames specified in the &pluginmap; file are assumed to be relative to the directory of the &pluginmap; file + the prefix you specify here. Useful, esp., if all your components are located below a single subdirectory. </para></listitem> + <listitem><para>Filenames specified in the &pluginmap; file are assumed to be relative to the directory of the &pluginmap; file + the prefix you specify here. Useful, esp., if all your components are located below a single subdirectory.</para></listitem> </varlistentry> <varlistentry> <term>namespace</term> |
From: Thomas F. <tho...@ru...> - 2015-02-04 20:15:36
|
Git commit f2234fb005b51106d526e64f74b5d562e9e3c842 by Thomas Friedrichsmeier. Committed on 04/02/2015 at 20:15. Pushed by tfry into branch 'master'. Fix version parsing M +1 -1 rkward/rbackend/rksessionvars.cpp http://commits.kde.org/rkward/f2234fb005b51106d526e64f74b5d562e9e3c842 diff --git a/rkward/rbackend/rksessionvars.cpp b/rkward/rbackend/rksessionvars.cpp index 8799f6a..8f4dcc1 100644 --- a/rkward/rbackend/rksessionvars.cpp +++ b/rkward/rbackend/rksessionvars.cpp @@ -90,7 +90,7 @@ quint32 RKSessionVars::parseVersionString (const QString &version, QString *suff } } } - if (opos < (version.size () - 1)) { + if (opos <= (version.size () - 1)) { if (suffix) *suffix = version.mid (opos); else RK_DEBUG (MISC, DL_WARNING, "Non numeric portion ('%s') of version specification '%s' will be ignored.", qPrintable (version.mid (opos)), qPrintable (version)); } |
From: Yuri C. <yu...@uk...> - 2015-02-04 19:56:33
|
Git commit 6b71b510f89becda9fc917fb675c79cd770a71ea by Yuri Chornoivan. Committed on 04/02/2015 at 19:55. Pushed by yurchor into branch 'master'. Fix typos and EBN issues M +1 -1 doc/rkward/index.docbook M +115 -112 doc/rkwardplugins/index.docbook http://commits.kde.org/rkward/6b71b510f89becda9fc917fb675c79cd770a71ea diff --git a/doc/rkward/index.docbook b/doc/rkward/index.docbook index 0fee126..cf6a6be 100644 --- a/doc/rkward/index.docbook +++ b/doc/rkward/index.docbook @@ -42,7 +42,7 @@ thanks ;-). <title>The RKWard Handbook</title> <authorgroup> -<!-- New authors, add youselves here! --> +<!-- New authors, add yourselves here! --> <author> <firstname>Thomas</firstname> <surname>Friedrichsmeier</surname> diff --git a/doc/rkwardplugins/index.docbook b/doc/rkwardplugins/index.docbook index 2c298c6..8c8bdd3 100644 --- a/doc/rkwardplugins/index.docbook +++ b/doc/rkwardplugins/index.docbook @@ -37,9 +37,11 @@ as Authors, publish date, the abstract, and Keywords --> </affiliation> </author> <!-- Additional authors go here --> -</authorgroup> <!-- TRANS:ROLES_OF_TRANSLATORS --> +</authorgroup> + + <copyright> <year>2006</year> @@ -347,7 +349,7 @@ This is a guide to writing plugins for &rkward;. <dialog label="Two Variable t-Test"> </programlisting> <para> - As you know, plugins may have either a dialog or a wizard interface or both. Here we start definining a dialog interface. the <parameter>label</parameter> attribute specifies the caption of the dialog. + As you know, plugins may have either a dialog or a wizard interface or both. Here we start defining a dialog interface. the <parameter>label</parameter> attribute specifies the caption of the dialog. </para> <programlisting> <tabbook> @@ -377,7 +379,7 @@ This is a guide to writing plugins for &rkward;. <column> </programlisting> <para> - Next, we nest a <command><column></command> inside the row. I.e. the following elements will be place above each other (top-to-bottom), and all will be to the right of the <command><varselector></command>. + Next, we nest a <command><column></command> inside the row. That is the following elements will be placed above each other (top-to-bottom), and all will be to the right of the <command><varselector></command>. </para> <programlisting> <varslot types="number" id="x" source="vars" required="true" label="compare"/> @@ -420,14 +422,14 @@ This is a guide to writing plugins for &rkward;. </mediaobject> </screenshot> <para> - Note that we have not specified the <guibutton>Submit</guibutton>, <guibutton>Close</guibutton>, etc. buttons or the code view. Those elements get generated automatically. But of course we still have to define the second page of the <command><tabbook></command>: + Note that we have not specified the <guibutton>Submit</guibutton>, <guibutton>Close</guibutton>, &etc; buttons or the code view. Those elements get generated automatically. But of course we still have to define the second page of the <command><tabbook></command>: </para> <programlisting> <tab label="Options"> - <checkbox id="varequal" label="assume equal variances" value=", var.equal=TRUE"/> + <check box id="varequal" label="assume equal variances" value=", var.equal=TRUE"/> </programlisting> <para> - By default elements will be placed top-to-bottom like in a <command><column></command>. Since that is what we want here, we don't have to explicitly state a <command><row></command> or <command><column></command> layout. The first element we define is a checkbox. Just like the <command><radio></command><command><option></command>s, the checkbox has a <parameter>label</parameter> and a <parameter>value</parameter>. The <parameter>value</parameter> is what gets returned, if the checkbox is checked. Of course the checkbox also needs an <parameter>id</parameter>. + By default elements will be placed top-to-bottom like in a <command><column></command>. Since that is what we want here, we don't have to explicitly state a <command><row></command> or <command><column></command> layout. The first element we define is a check box. Just like the <command><radio></command><command><option></command>s, the check box has a <parameter>label</parameter> and a <parameter>value</parameter>. The <parameter>value</parameter> is what gets returned, if the check box is checked. Of course the check box also needs an <parameter>id</parameter>. </para> <programlisting> <frame label="Confidence Interval" id="frame_conf_int"> @@ -436,15 +438,15 @@ This is a guide to writing plugins for &rkward;. Here's yet another layout element: In order to signal that the two elements below belong together, we draw a <command><frame></command> (box). That frame may have a <parameter>label</parameter> (caption). Since the frame is just a passive layout element, it does not need an <parameter>id</parameter>, we still define one here, as we'll refer to it later, when defining an additional wizard interface. </para> <programlisting> - <checkbox id="confint" label="print confidence interval" value="1" checked="true"/> + <check box id="confint" label="print confidence interval" value="1" checked="true"/> <spinbox type="real" id="conflevel" label="confidence level" min="0" max="1" initial="0.95"/> </frame> </programlisting> <para> - Inside the <command><frame></command> we place another <command><checkbox></command> (using <parameter>checked=</parameter><replaceable>"true"</replaceable>, we signal that checkbox should be checked by default), and a <command><spinbox></command>. The spinbox allows the user to select a value between <replaceable>"min"</replaceable> and <replaceable>"max"</replaceable> with the default/initial value <replaceable>"0.95"</replaceable>. Setting the <parameter>type</parameter> to <replaceable>"real"</replaceable> signals that real numbers are accepted as opposed to <parameter>type=</parameter><replaceable>"integer"</replaceable> which would accept integers only. + Inside the <command><frame></command> we place another <command><check box></command> (using <parameter>checked=</parameter><replaceable>"true"</replaceable>, we signal that check box should be checked by default), and a <command><spinbox></command>. The spinbox allows the user to select a value between <replaceable>"min"</replaceable> and <replaceable>"max"</replaceable> with the default/initial value <replaceable>"0.95"</replaceable>. Setting the <parameter>type</parameter> to <replaceable>"real"</replaceable> signals that real numbers are accepted as opposed to <parameter>type=</parameter><replaceable>"integer"</replaceable> which would accept integers only. </para> <note><para> - It is also possible, and often preferable, to make the <command><frame></command> itself checkable, instead of adding a <command><checkbox></command> inside. See the reference for details. This is not done here, for illustrational purposes. + It is also possible, and often preferable, to make the <command><frame></command> itself checkable, instead of adding a <command><check box></command> inside. See the reference for details. This is not done here, for illustrational purposes. </para></note> <programlisting> </tab> @@ -511,12 +513,12 @@ This is a guide to writing plugins for &rkward;. </para> <sect2 id="radio_vs_checkbox_vs_dropdown"> - <title><radio> vs. <checkbox> vs. <dropdown></title> + <title><radio> vs. <check box> vs. <dropdown></title> <para> - The three elements <command><radio></command>, <command><checkbox></command>, <command><dropdown></command>, all serve a similar function: To select one out of several options. Obviously, a checkbox only allows to chose between two options: checked or not checked, so you can't use it, if there are more than two options to chose from. But when to use which of the elements? Some rules of thumb: + The three elements <command><radio></command>, <command><check box></command>, <command><dropdown></command>, all serve a similar function: To select one out of several options. Obviously, a check box only allows to chose between two options: checked or not checked, so you cannot use it, if there are more than two options to chose from. But when to use which of the elements? Some rules of thumb: </para> <para> - If you find yourself creating a <command><radio></command> or <command><dropdown></command> with only two options, ask yourself, whether the question is essentially a yes / no type of question. E.g. a choice between <quote>adjust results</quote> and <quote>do not adjust results</quote>, or between <quote>remove missing values</quote> and <quote>keep missing values</quote>. In this case a <command><checkbox></command> is the best choice: It uses little space, will have the least words of labels, and is easiest to read for the user. There are very few situations where you should chose a <command><radio></command> over a <command><checkbox></command>, when there are only two options. An example of that might be: <quote>Method of calculation: 'pearson'/'spearman'</quote>. Here, more methods might be thinkable, and they don't really form a pair of opposites. + If you find yourself creating a <command><radio></command> or <command><dropdown></command> with only two options, ask yourself, whether the question is essentially a yes / no type of question. E.g. a choice between <quote>adjust results</quote> and <quote>do not adjust results</quote>, or between <quote>remove missing values</quote> and <quote>keep missing values</quote>. In this case a <command><check box></command> is the best choice: It uses little space, will have the least words of labels, and is easiest to read for the user. There are very few situations where you should chose a <command><radio></command> over a <command><check box></command>, when there are only two options. An example of that might be: <quote>Method of calculation: 'pearson'/'spearman'</quote>. Here, more methods might be thinkable, and they don't really form a pair of opposites. </para> <para> Chosing between a <command><radio></command> and a <command><dropdown></command> is mostly a question of space. The <command><dropdown></command> has the advantage of using little space, even if there are a lot of options to chose from. On the other hand, a <command><radio></command> has the advantage of making all possible choices visible to the user at once, without clicking on the dropdown arrow. Generally, if there are six or more options to chose from, a <command><dropdown></command> is preferable. If there are five or less options, a <command><radio></command> is the better choice. @@ -529,7 +531,7 @@ This is a guide to writing plugins for &rkward;. <title>Generating R code from GUI settings</title> <sect1 id="sect_generating_R_code"><title>Using JavaScript in RKWard plugins</title> <para> - Now we have a GUI defined, but we still need to generate some &r; code from that. For that, we need another text file, <filename>code.js</filename>, located in the same directory as the <link linkend="mainxml"><filename>description.xml</filename></link>. You may or may not be familiar with JavaScript (or, to be technically precise: ECMA-script). Documentation on JS can be found in abundance, both in printed form, and on the internet (e.g.: <ulink url="https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide">https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide</ulink>). But for most purposes you will not need to know much about JS at all, as we'll only use some very basic features. + Now we have a GUI defined, but we still need to generate some &r; code from that. For that, we need another text file, <filename>code.js</filename>, located in the same directory as the <link linkend="mainxml"><filename>description.xml</filename></link>. You may or may not be familiar with JavaScript (or, to be technically precise: ECMA-script). Documentation on JS can be found in abundance, both in printed form, and on the Internet (⪚: <ulink url="https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide">https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide</ulink>). But for most purposes you will not need to know much about JS at all, as we'll only use some very basic features. </para> <tip> <para> @@ -569,7 +571,7 @@ function calculate () { res <- t.test ( </screen> <para> - as plain text. Next we need to fill in the value, the user selected as the first variable. We fetch this using <function>getString ("x")</function>, and append it to the string to be <quote>echoed</quote>. This prints out the value of the GUI-element with <parameter>id=</parameter><replaceable>"x"</replaceable>: our first <command><checkbox></command>. Next, we append a ', ', and do the same to fetch the value of the element <replaceable>"y"</replaceable> - the second <command><checkbox></command>. For the hypothesis (the <command><radio></command> group), and the equal variances <command><checkbox></command>, the procedure is very similar. + as plain text. Next we need to fill in the value, the user selected as the first variable. We fetch this using <function>getString ("x")</function>, and append it to the string to be <quote>echoed</quote>. This prints out the value of the GUI-element with <parameter>id=</parameter><replaceable>"x"</replaceable>: our first <command><check box></command>. Next, we append a ', ', and do the same to fetch the value of the element <replaceable>"y"</replaceable> - the second <command><check box></command>. For the hypothesis (the <command><radio></command> group), and the equal variances <command><check box></command>, the procedure is very similar. </para> <para> Note that instead of concatenating the output snippets with <quote>+</quote>, you can also use several <function>echo()</function> statments. Everything is printed on a single line. To produce a line break in the generated code, insert a <replaceable>"\n"</replaceable> in the echoed string. In theory, you can even produce many lines with a single echo-statement, but please keep it to one line (or less) of generated code per <function>echo()</function>. @@ -593,7 +595,7 @@ function printout () { <para> And this was all there is to the printout function in most cases. <function>rk.header()</function> prints a standard headline for the results. Note that in the .js files, you have to mark up all translatable strings by hand, using <command>i18n()</command>, or some alternative commands. More on this in the <link linkend="i18n_js">chapter on internationaliation</link>. - You can also add some more information to this, if you like, e.g.: + You can also add some more information to this, if you like, ⪚: </para> <programlisting> function printout () { @@ -609,7 +611,7 @@ echo ('rk.print (res)\n'); <function>rk.print()</function> utilizes the R2HTML package to provide HTML formatted output. Another helpful function is <function>rk.results()</function>, which can also output different kinds of result tables. If in doubt, however, just use <function>rk.print()</function>, and be done with. The JS class <function>Header</function> is a JS level helper to generate a call to <function>rk.header()</function> (just take a look at the generated &r; code). In some cases you may want to call <function>echo ('rk.header (...)')</function> directly to print a header for your output. </para> <para> - Note that internally, the output is just a plain HTML document at this point of time. Therefore you might be tempted to add custom HTML using <function>rk.cat.output()</function>. While this will work, please don't do this. The output format may change (e.g. to ODF) in the future, so it's best not to introduce HTML specific code. Rather keep things simple with <function>rk.header()</function>, <function>rk.print()</function>, <function>rk.results()</function>, and -- if needed -- <function>rk.print.literal()</function>. If those don't seem to satisfy your formatting needs, contact us on the mailing list for help. + Note that internally, the output is just a plain HTML document at this point of time. Therefore you might be tempted to add custom HTML using <function>rk.cat.output()</function>. While this will work, please don't do this. The output format may change (⪚ to ODF) in the future, so it's best not to introduce HTML specific code. Rather keep things simple with <function>rk.header()</function>, <function>rk.print()</function>, <function>rk.results()</function>, and -- if needed -- <function>rk.print.literal()</function>. If those don't seem to satisfy your formatting needs, contact us on the mailing list for help. </para> <para> Congratulations! You created your first plugin. Read on in the next chapters for more advanced concepts. @@ -632,7 +634,7 @@ echo ('rk.print (res)\n'); If the user explicitly asks for a variable to be saved, you will need to assign to that object using <function>.GlobalEnv$objectname <- value</function>. In general, do not use the <function><<-</function> operator. It will not necessarily assign in .GlobalEnv. </para> <para> - One important pitfall is using <function>eval()</function>. Here, you need to note that eval will by default use the current environment for evaluation, i.e. the local one. This will work well most of the times, but but not always. Thus, if you need to use <function>eval()</function>, you will probably want to specify the <parameter>envir</parameter> parameter: <function>eval(..., envir=globalenv()</function>). + One important pitfall is using <function>eval()</function>. Here, you need to note that eval will by default use the current environment for evaluation, &ie; the local one. This will work well most of the times, but but not always. Thus, if you need to use <function>eval()</function>, you will probably want to specify the <parameter>envir</parameter> parameter: <function>eval(..., envir=globalenv()</function>). </para> </sect2> @@ -673,7 +675,7 @@ if (my.rotation > wobble.rotation.limit (x)) { <sect2 id="policysimplicity"> <title>Dealing with complex options</title> <para> - Many plugins can do more than one thing. For instance, the <quote>Descriptive Statistics</quote> plugin can compute mean, range, sum, product, median, length, etc. However, typically the user will only chose to have some of those calculations performed. In this case, please try to keep the generated code as simple as possible. It should only contain portions relevant to the options that are actually selected. To achieve this, here is an example of a common design patterns as you would use it (in JS; here, "domean", "domedian", and "dosd" would be <checkbox> elements): + Many plugins can do more than one thing. For instance, the <quote>Descriptive Statistics</quote> plugin can compute mean, range, sum, product, median, length, &etc; However, typically the user will only chose to have some of those calculations performed. In this case, please try to keep the generated code as simple as possible. It should only contain portions relevant to the options that are actually selected. To achieve this, here is an example of a common design patterns as you would use it (in JS; here, "domean", "domedian", and "dosd" would be <check box> elements): </para> <programlisting> function calculate () { @@ -779,7 +781,7 @@ This links to a top level rkward help page (not for a plugin). <link href="rkward://component/[namespace/]component_id"/> This links to the help page of another plugin. The [namespace/] part may be omitted -(in this case, rkward is assumed as the standard namespace, e.g.: +(in this case, rkward is assumed as the standard namespace, ⪚: <link href="rkward://component/import_spss"/> or <link href="rkward://component/rkward/import_spss"/> are equivalent). The component_id is the same that you specified in the <link linkend="pluginmap">&pluginmap;</link>. @@ -971,7 +973,7 @@ R code. </dialog> </programlisting> <para> - What happens here, is that the entire GUI or the plot options plugin (except of course for the standard elements like <guibutton>Submit</guibutton> button, etc.) is embedded right into your plugin (try it!). + What happens here, is that the entire GUI or the plot options plugin (except of course for the standard elements like <guibutton>Submit</guibutton> button, &etc;) is embedded right into your plugin (try it!). </para> <para> As you can see the syntax of the <command><embed></command>-tag is fairly simple. It takes an <parameter>id</parameter> as most elements. The parameter component specifies which plugin to embed, as defined in the &pluginmap; file (<replaceable>"rkward::plot_options"</replaceable> is the result of concatenating the namespace <quote>rkward</quote>, a separator <quote>::</quote>, and the name of the component <quote>plot_options</quote>). @@ -1318,7 +1320,7 @@ This chapter contains information on some topics that are useful only to certain <title>Drawing a plot to the output window</title> <para> In order to draw a plot to the output window, use <function>rk.graph.on()</function> directly before creating the plot, and - <function>rk.graph.off()</function>, directly afterwards. This is similar to e.g. callling <function>postscript()</function> and + <function>rk.graph.off()</function>, directly afterwards. This is similar to ⪚ callling <function>postscript()</function> and <function>dev.off()</function> in a regular R session. </para> <para> @@ -1330,10 +1332,10 @@ This chapter contains information on some topics that are useful only to certain <sect2 id="preview_plots"> <title>Adding preview functionality</title> <para> - A very useful feature for all plugins generating a plot/graph is to provide an automatically updating preview. To do so, you will need two things: Adding a <command><preview></command> checkbox to your <link linkend="mainxml">GUI definition</link>, and adjusting the <link linkend="jstemplate">generated code</link> for the preview. + A very useful feature for all plugins generating a plot/graph is to provide an automatically updating preview. To do so, you will need two things: Adding a <command><preview></command> check box to your <link linkend="mainxml">GUI definition</link>, and adjusting the <link linkend="jstemplate">generated code</link> for the preview. </para> <para> - Adding a <command><preview></command> checkbox is simple. Just place the following somewhere in your GUI. It will take care of all the behind-the-scenes magic of creating a preview device, updaing the preview whenever the setting have changed, etc. Example: + Adding a <command><preview></command> check box is simple. Just place the following somewhere in your GUI. It will take care of all the behind-the-scenes magic of creating a preview device, updaing the preview whenever the setting have changed, &etc; Example: </para> <programlisting> <document> @@ -1350,13 +1352,13 @@ This chapter contains information on some topics that are useful only to certain And that's it for the GUI definition. </para> <para> - Adjusting the JS template is a little more work. You will have to create a new function called <function>preview()</function> in addition to the <function>preprocess()</function>, <function>calculate()</function>, etc. functions. This function should generate the code needed to produce the plot, and only that. Esp. no printing of headers, <function>rk.graphics.on()</function>, or similar calls. See the <link linkend="plot_plugin_example">example</link>, below for the typical pattern that you will use. + Adjusting the JS template is a little more work. You will have to create a new function called <function>preview()</function> in addition to the <function>preprocess()</function>, <function>calculate()</function>, &etc; functions. This function should generate the code needed to produce the plot, and only that. Esp. no printing of headers, <function>rk.graphics.on()</function>, or similar calls. See the <link linkend="plot_plugin_example">example</link>, below for the typical pattern that you will use. </para> </sect2> <sect2 id="plot_options"> <title>Generic plot options</title> <para> - You will have noticed that most plotting plugins in RKWard provide a wide range of generic options e.g. for customizing axis titles or figure margins. Adding these options to your plugin is easy. They are provided by an <link linkend="embedding">embeddable</link> plugin called <command>rkward::plot_options</command>. Embed this in your plugin UI like this: + You will have noticed that most plotting plugins in RKWard provide a wide range of generic options ⪚ for customizing axis titles or figure margins. Adding these options to your plugin is easy. They are provided by an <link linkend="embedding">embeddable</link> plugin called <command>rkward::plot_options</command>. Embed this in your plugin UI like this: </para> <programlisting> <document> @@ -1393,7 +1395,7 @@ This chapter contains information on some topics that are useful only to certain <programlisting> function preprocess () { // the "somepackage" is needed to create the plot - ecoh ("require (somepackage)\n"); + echo ("require (somepackage)\n"); } function printout () { @@ -1454,7 +1456,7 @@ This chapter contains information on some topics that are useful only to certain <sect2 id="context_x11"> <title>X11 device context</title> <para> - To use a plugin in the context of an x11 device - that is place it in the menu bar of the window you get when you call <function>x11()</function> in the console, first declare it as usual in the <link linkend="pluginmap">&pluginmap; file</link>: + To use a plugin in the context of an x11 device - that is place it in the menubar of the window you get when you call <function>x11()</function> in the console, first declare it as usual in the <link linkend="pluginmap">&pluginmap; file</link>: </para> <programlisting> <document [...]> @@ -1564,15 +1566,15 @@ This chapter contains information on some topics that are useful only to certain } ]]></script> </programlisting> - <para>Here, <parameter>variable</parameter> is a property holding an object name (e.g. inside a <command><varslot></command>). Whenever that changes, you will want to update the display + <para>Here, <parameter>variable</parameter> is a property holding an object name (⪚ inside a <command><varslot></command>). Whenever that changes, you will want to update the display of levels inside the <command><valueselector></command>, named <parameter>selector</parameter>. The key function here is <command>doRCommand()</command>, taking as first parameter the command string to run, and as second parameter the name of a function to call, when the command has finished. Note that the command is running asynchronously, and this makes things a bit more complex. For one thing you want to make sure, that your <command><valueselector></command> remains disabled, while it does not contain up-to-date information. Another thing is that you could potentially have queued more than one command, before you get the first results. This is why every command is given an "id", and we store that in <parameter>last_command_id</parameter> for later reference.</para> <para>When the command is done, the specified callback is called (<parameter>commandFinished</parameter>, in this case) with two parameters: The result itself, and the id of the correspoding - command. The result will be of a type resembling the representation in R, i.e. a numeric Array, if the result is numeric, etc. It can even be an R <command>list()</command>, but in this case + command. The result will be of a type resembling the representation in R, &ie; a numeric Array, if the result is numeric, &etc; It can even be an R <command>list()</command>, but in this case it will be represented as a JS <command>Array()</command> whithout names.</para> - <para>Note that even this example is somewhat simplified. In reality you should take additional precautions, e.g. to avoid putting an extreme amount of levels into the selector. The good news + <para>Note that even this example is somewhat simplified. In reality you should take additional precautions, ⪚ to avoid putting an extreme amount of levels into the selector. The good news is that probably you do not have to do all this yourself. The above example is taken from the <command>rkward::level_select</command> plugin, for instance, which you can simply <link linkend="embedding">embed</link> in your own plugin. This even allows you to specify a different expression to run in place of <command>levels()</command>.</para> </sect1> @@ -1590,7 +1592,7 @@ This chapter contains information on some topics that are useful only to certain <sect1 id="optionset"> <title>Repeating (a set of) options</title> <para> - Sometimes you want to repeat a set of options for an arbitrary number of items. E.g. suppose you want to implement a plugin for sorting a data.frame. You may want to allow for sorting by an arbitrary number of columns (in case of ties among the first column(s)). This could simply be realized by allowing the user to select multiple variables in a <command><varslot></command> with <parameter>multi="true"</parameter>. But if you want to extend this, e.g. allowing the user to specify for each variable whether it should be converted to character / numeric, or whether sorting should be ascending or descending, you need more flexibility. Other examples would be plotting multiple lines in one plot (allowing to select object, line style, line color, etc. for each line), or specifying a mapping for recoding from a set of old values to new values. + Sometimes you want to repeat a set of options for an arbitrary number of items. E.g. suppose you want to implement a plugin for sorting a data.frame. You may want to allow for sorting by an arbitrary number of columns (in case of ties among the first column(s)). This could simply be realized by allowing the user to select multiple variables in a <command><varslot></command> with <parameter>multi="true"</parameter>. But if you want to extend this, ⪚ allowing the user to specify for each variable whether it should be converted to character / numeric, or whether sorting should be ascending or descending, you need more flexibility. Other examples would be plotting multiple lines in one plot (allowing to select object, line style, line color, &etc; for each line), or specifying a mapping for recoding from a set of old values to new values. </para> <para> Enter the <command><optionset></command>. Let's look at a simple example, first: @@ -1621,8 +1623,8 @@ This chapter contains information on some topics that are useful only to certain </dialog> </programlisting> <para> - Here, we created a UI for specifying a number of persons (e.g. authors). The UI requires at least one entry (<parameter>min_rows="1"</parameter>). Inside the <command><optionset></command>-element, we begin by specifying the - <command><content></command>, i.e. those elements that belong to the option set. You will be familiar with most elements + Here, we created a UI for specifying a number of persons (⪚ authors). The UI requires at least one entry (<parameter>min_rows="1"</parameter>). Inside the <command><optionset></command>-element, we begin by specifying the + <command><content></command>, &ie; those elements that belong to the option set. You will be familiar with most elements inside the <command><content></command>. The <command><optiondisplay></command> is a special element for use in option sets. It lists the current items, allows the user to switch between items, to add or to remove entries. <parameter>index="true"</parameter> means that we want an extra column in the list, showing an index (number) of each item. </para><para> Next we specify the variables of interest that we will want to read from the option set in our JS file. As we will be dealing with @@ -1652,14 +1654,14 @@ This chapter contains information on some topics that are useful only to certain </dialog> </programlisting> <para> - Of course you can also use <link linkend="logic">UI logic</link> inside an optionset. There are two options for doing this: You can do so by making connection (or scripting) in the main <command><logic></command> section of your plugin, as usual. However, you will access the UI elements in the contents region as (e.g.) "set.contents.firstname.XYZ". Note the prefix "set" (the <parameter>id</parameter> you have assigned to the set and "contents". Alternatively, you can add a separate <command><logic></command> section as a child element of your <command><optionset></command>. In this case, <parameter>id</parameter>s will be addressed relative to the contents region, e.g. "firstname.XYZ". Only the <command><script></command>-element is not allowed in the logic section of an optionset. If you want to use scripting, + Of course you can also use <link linkend="logic">UI logic</link> inside an optionset. There are two options for doing this: You can do so by making connection (or scripting) in the main <command><logic></command> section of your plugin, as usual. However, you will access the UI elements in the contents region as (⪚) "set.contents.firstname.XYZ". Note the prefix "set" (the <parameter>id</parameter> you have assigned to the set and "contents". Alternatively, you can add a separate <command><logic></command> section as a child element of your <command><optionset></command>. In this case, <parameter>id</parameter>s will be addressed relative to the contents region, ⪚ "firstname.XYZ". Only the <command><script></command>-element is not allowed in the logic section of an optionset. If you want to use scripting, you will have to utilize the plugin's main <command><logic></command> section. </para> <note> <para> When scripting logic in an optionset, all you can do is access the <emphasis>current</emphasis> content region. Thus, typically, it is only meaningful to connect elements inside the contents region to each other. Connecting a property outside the <command><optionset></command> to a property inside the content region, may be useful for initialization. However, - modifying the contents region after initialzation will <emphasis>not</emphasis> apply to items that the user has already + modifying the contents region after initialization will <emphasis>not</emphasis> apply to items that the user has already defined. Only to the currently selected item in the set. </para> </note> @@ -1707,7 +1709,7 @@ This chapter contains information on some topics that are useful only to certain objects). The purpose of the "vars"-optioncolumn is to serve as the "key" column, as specified by <command><optionset keycolumn="vars"...></command>. This means that for each entry in this list, the set will offer one set of options, and options are logically tied to these entries. This column is connected to the property holding the - selected objects in the <command><varslot></command>. I.e. for each object that is selected there, the <command><optionset></command> will allow to specify line color. + selected objects in the <command><varslot></command>. That is for each object that is selected there, the <command><optionset></command> will allow to specify line color. </para> <note> <para> @@ -1815,7 +1817,7 @@ x </components ...> /> </dependencies> </programlisting> -<para>Currently will neither load, nor install, nor even warn about missing &pluginmap;s, but at least information on dependencies (and where to obtain them) will be shown on the plugin's help page. You do not have to (and you should not) declare dependencies on &pluginmap;s that are shipped with the offical &rkward; distribution, or on &pluginmap;s that are inside your own package. Further, if a required &pluginmap; is <link linkend="external_plugins">distributed as an &r; package</link>, declare a dependency of the package (as shown in the previous section), rather than on the map.</para> +<para>Currently will neither load, nor install, nor even warn about missing &pluginmap;s, but at least information on dependencies (and where to obtain them) will be shown on the plugin's help page. You do not have to (and you should not) declare dependencies on &pluginmap;s that are shipped with the official &rkward; distribution, or on &pluginmap;s that are inside your own package. Further, if a required &pluginmap; is <link linkend="external_plugins">distributed as an &r; package</link>, declare a dependency of the package (as shown in the previous section), rather than on the map.</para> <para>To make sure that required &pluginmap;s are actually loaded, use the <command><require></command>-tag (refer to the <link linkend="pluginmapelements">reference</link> for details).</para> </sect1> <sect1 id="sect_dependencies_example"><title>An example</title> @@ -1874,7 +1876,7 @@ x </components ...> </sect1> <sect1 id="i18n_xml"><title>i18n in &rkward;'s xml files</title> <para> - For &rkward;'s xml files, i18n will mostly just work. If you are writing your own <command>.pluginmap</command> (e.g. for an <link linkend="external_plugins">external plugin</link>), + For &rkward;'s xml files, i18n will mostly just work. If you are writing your own <command>.pluginmap</command> (⪚ for an <link linkend="external_plugins">external plugin</link>), you will have to specify a <replaceable>po_id</replaceable> next to the pluginmap's <replaceable>id</replaceable>. This defines the "message catalog" to use. In general this should be set identical to the <replaceable>id</replaceable> of your <command>.pluginmap</command>, but if you provide several <command>.pluginmap</command>s and want to control, how message catalogs are divided up, this allows you to do so. The <replaceable>po_id</replaceable> is inherited by any <command>.pluginmap</command> you include, unless that declares @@ -1886,13 +1888,13 @@ x </components ...> an <replaceable>i18n_context</replaceable> like this: </para> <programlisting> -<checkbox id="scale" label="Scale" i18n_context="Show the scale"/> -<checkbox id="scale" label="Scale" i18n_context="Scale the plot"/> +<check box id="scale" label="Scale" i18n_context="Show the scale"/> +<check box id="scale" label="Scale" i18n_context="Scale the plot"/> </programlisting> <para> Providing <replaceable>i18n_context</replaceable> will cause the two strings to be translated separately. Otherwise they would share a single translation. In addition, the context is shown to the translator. The <replaceable>i18n_context</replaceable>-attribute is supported on all elements that can have translatable strings, somewhere, including elements that - contain text inside them (e.g. <command><text></command>-elements). + contain text inside them (⪚ <command><text></command>-elements). </para> <para> In other cases the string to translate has a single non-ambiguous meaning, but may still need some explaining. In this case you can add a comment that will be shown to translators. @@ -1936,7 +1938,7 @@ user (selection from a list of values shown next to this element) --> <variablelist> <varlistentry> <term><command>i18n (msgid, [...])</command></term> - <listitem><para>The most important function. Marks the string for translation. The string (whether translated or not) is returned quoted using double quotes ('"'). An aribtrary + <listitem><para>The most important function. Marks the string for translation. The string (whether translated or not) is returned quoted using double quotes ('"'). An arbitrary number of placeholders can be used in the string like shown below. Using such placeholders instead of concatenating small substrings is much easier for translators.:</para> <programlisting> i18n ("Compare objects %1 and %2", getString ('x'), getString ('y')); @@ -1989,7 +1991,7 @@ user (selection from a list of values shown next to this element) --> </para> <para> That said, it is generally not a good idea to make bits like function names or variable names translatable. For one thing, R, the programming language, is inherently in English, - and there is no internationalization of the lanuage itself. Code comments are a different beast, but you should use the <command>comment()</command>-function for those. Secondly, + and there is no internationalization of the language itself. Code comments are a different beast, but you should use the <command>comment()</command>-function for those. Secondly, making syntactically relevant parts of the generated code translatable means that translations could actually break your plugin. E.g. if an unsuspecting translator translates a string meant as a variable name in two distinct words with a space in between. </para> @@ -2010,7 +2012,7 @@ user (selection from a list of values shown next to this element) --> // js-function "comment" was not defined before 0.6.3 if (typeof (comment) == 'undefined) { // define function i18n(), and any others you may need. Note that your implementation could actually be simpler than - // shown, here, e.g. if you do not make use of placeholders. + // shown, here, ⪚ if you do not make use of placeholders. i18n = function (msgid) { var ret = msgid; for (var i = 1; i < arguments.length; i++) { @@ -2028,7 +2030,7 @@ user (selection from a list of values shown next to this element) --> </sect1> <sect1 id="i18n_workflow"><title>Translation maintainance</title> <para> - Now that you have made your plugin translatable, how do you actually get it translated? In general you only need to worry about this, when develoing an <link linkend="external_plugins"> + Now that you have made your plugin translatable, how do you actually get it translated? In general you only need to worry about this, when developing an <link linkend="external_plugins"> external plugin</link>. For plugins in &rkward;'s main repository, all the magic is done for you. Here's the basic workflow. Note that you need the "gettext" tools, installed: </para> <itemizedlist> @@ -2046,7 +2048,7 @@ user (selection from a list of values shown next to this element) --> <replaceable>--extract-only</replaceable>, this time). This will merge the translation with any interim string changes, compile the translation, and install it into <command><replaceable>DIR_OF_PLUGINMAP</replaceable>/po/<replaceable>xx</replaceable>/LC_MESSAGES/rkward__<replaceable>POID</replaceable>.mo</command> (where <replaceable>xx</replaceable> is the language code, again).</para></listitem> - <listitem><para>You should also include the non-compiled translation (i.e. <command>rkward__<replaceable>POID</replaceable>.<replaceable>xx</replaceable>.po</command>) in + <listitem><para>You should also include the non-compiled translation (&ie; <command>rkward__<replaceable>POID</replaceable>.<replaceable>xx</replaceable>.po</command>) in your distribution, in the "po" subdirectory.</para></listitem> <listitem><para>For any update of your plugin, run <command>python scripts/extract_plugin_messages.py /path/to/my.pluginmap</command> to update the .pot file, but also the existing .po-files, and the compiled message catalogs.</para></listitem> @@ -2116,8 +2118,8 @@ user (selection from a list of values shown next to this element) --> </programlisting> <para>Most of this should explain itself, so we’ll not discuss each and every tag element. But let’s look at some details that probably need some commentary for easier understanding. </para> <para>The <parameter>category</parameter> element in <command><about></command> can be defined rather freely, but should be meaningful, as it’s thought to be used to order plugins into groups. All other attributes in this opening tag are mandatory and must be filled with reasonable content. </para> -<para>At least one <command><author></command> with a valid e-mail address and the role <quote>aut</quote> (<quote>author</quote>) must also be given. In case your plugin causes problems or someone would like to share its gratitude with you, it should be easy to contact someone who’s involved. For further information on other valid roles, like <quote>ctb</quote> for code contributors or <quote>cre</quote> for package maintenance, please refer to the <ulink url="http://stat.ethz.ch/R-manual/R-patched/library/utils/html/person.html">R documentation on <function>person()</function></ulink>. </para> -<note><para>Remember that you can use <command><include></command> and / or <command><insert></command> to repeat information across several .xml files (e.g. information on an author who was involved with several plugins). <link linkend="sect_similar_plugins">More information</link>.</para></note> +<para>At least one <command><author></command> with a valid email address and the role <quote>aut</quote> (<quote>author</quote>) must also be given. In case your plugin causes problems or someone would like to share its gratitude with you, it should be easy to contact someone who’s involved. For further information on other valid roles, like <quote>ctb</quote> for code contributors or <quote>cre</quote> for package maintenance, please refer to the <ulink url="http://stat.ethz.ch/R-manual/R-patched/library/utils/html/person.html">R documentation on <function>person()</function></ulink>. </para> +<note><para>Remember that you can use <command><include></command> and / or <command><insert></command> to repeat information across several .xml files (⪚ information on an author who was involved with several plugins). <link linkend="sect_similar_plugins">More information</link>.</para></note> <tip><para>You don't have to write this XML code by hand. If you use the function <function>rk.plugin.skeleton()</function> from the <link linkend="rkwarddev"><application>rkwarddev</application> package</link> and provide all necessary information via the <parameter>about</parameter> option, it will automatically create a &pluginmap; file with a working <about> section for you.</para></tip> </chapter> @@ -2145,7 +2147,7 @@ user (selection from a list of values shown next to this element) --> The number of packages to extend the functionality of &r; is immense already, and climbing. On one hand, we want to encourage you to write plugins for even the most specialised tasks you need solved. On the other hand, the average user should not get lost in huge menu trees full of unknown statistical terms. Therefore it seemed reasonable to keep the plugin handling in &rkward; quite modular as well. The &rkward; team maintains its own public package repository at <ulink url="http://files.kde.org/rkward/R">http://files.kde.org/rkward/R</ulink>, designated to host your external plugins. </para> <para> - As a rule of thumb, plugins that seem to serve a widely used purpose (e.g. t-Tests) should become part of the core package, while those who serve a rather limited group of people with special interests should be provided as an optional package. For you as a plugin author it’s best practice to just start with an external plugin. + As a rule of thumb, plugins that seem to serve a widely used purpose (⪚ t-Tests) should become part of the core package, while those who serve a rather limited group of people with special interests should be provided as an optional package. For you as a plugin author it’s best practice to just start with an external plugin. </para> </sect1> @@ -2228,13 +2230,13 @@ user (selection from a list of values shown next to this element) --> <sect3 id="additional_information"> <title>Additional information (optional)</title> <para> - <filename>ChangeLog</filename>, <filename>README</filename>, <filename>AUTHORS</filename>, <filename>LICENSE</filename> should be self-explaining and are entirely optional. Actually, they won’t be interpreted by &rkward;, so they are rather meant to carry additional information that might be relevant e.g. for distributors. Most of their relevant content (author credits, licence terms etc.) will be included in the actual plugin files anyway, though (see the <link linkend="chapter_about_information">section on meta-information</link>). Note that all of these files could also be placed somewhere in the "inst" directory, if you want them not only to be present in the source archive but the installed package as well. + <filename>ChangeLog</filename>, <filename>README</filename>, <filename>AUTHORS</filename>, <filename>LICENSE</filename> should be self-explaining and are entirely optional. Actually, they won’t be interpreted by &rkward;, so they are rather meant to carry additional information that might be relevant ⪚ for distributors. Most of their relevant content (author credits, licence terms &etc;) will be included in the actual plugin files anyway, though (see the <link linkend="chapter_about_information">section on meta-information</link>). Note that all of these files could also be placed somewhere in the "inst" directory, if you want them not only to be present in the source archive but the installed package as well. </para> </sect3> <sect3 id="automated_plugin_testing"> <title>Automated plugin testing (optional)</title> <para> - Another optional directory is "tests", which is meant to provide files needed for <ulink url="http://sourceforge.net/apps/mediawiki/rkward/index.php?title=Automated_Plugin_Testing">automated plugin testing</ulink>. These tests are helpful to quickly check if your plugins still work with new versions of &r; or &rkward;. If you want to include tests, you should really restrain yourself to the naming scheme and hierarchy shown here. That is, tests should reside in a directory called <filename>tests</filename>, which includes a file <filename>testsuite.R</filename> and a folder with tests standards named after the appropriate test suite. You can, however, provide more than one test suite; in that case, if you don’t want to append them all in the one <filename>testsuite.R</filename> file, you can split them in e.g. one file for each test suite and create one <filename>testsuite.R</filename> with <function>source()</function> calls for each suite file. In either case, create separate subdirectories with test + Another optional directory is "tests", which is meant to provide files needed for <ulink url="http://sourceforge.net/apps/mediawiki/rkward/index.php?title=Automated_Plugin_Testing">automated plugin testing</ulink>. These tests are helpful to quickly check if your plugins still work with new versions of &r; or &rkward;. If you want to include tests, you should really restrain yourself to the naming scheme and hierarchy shown here. That is, tests should reside in a directory called <filename>tests</filename>, which includes a file <filename>testsuite.R</filename> and a folder with tests standards named after the appropriate test suite. You can, however, provide more than one test suite; in that case, if you don’t want to append them all in the one <filename>testsuite.R</filename> file, you can split them in ⪚ one file for each test suite and create one <filename>testsuite.R</filename> with <function>source()</function> calls for each suite file. In either case, create separate subdirectories with test standards for each defined suite. </para> <para> @@ -2261,7 +2263,7 @@ standards for each defined suite. <chapter id="rkwarddev"> <title>Plugin development with the <application>rkwarddev</application> package</title> <sect1 id="rkdev_overview"><title>Overview</title> - <para>Writing external plugins involves writing files in three languages (XML, JavaScript and R) and the creation of a standardized hierarchy of directories. To make this a lot easier for willing plugin developers, we're providing the <application>rkwarddev</application> package. It provides a number of simple &r; functions to create the XML code for all dialog elements like tabbooks, checkboxes, dropdownlists or filebrowsers, as well as functions to create JavaScript code and &rkward; help files to start with. The function <function>rk.plugin.skeleton()</function> creates the expected directory tree and all necessary files where they are supposed to be.</para> + <para>Writing external plugins involves writing files in three languages (XML, JavaScript and R) and the creation of a standardized hierarchy of directories. To make this a lot easier for willing plugin developers, we're providing the <application>rkwarddev</application> package. It provides a number of simple &r; functions to create the XML code for all dialog elements like tabbooks, check boxes, dropdownlists or filebrowsers, as well as functions to create JavaScript code and &rkward; help files to start with. The function <function>rk.plugin.skeleton()</function> creates the expected directory tree and all necessary files where they are supposed to be.</para> <para>This package is not installed by default, but has to be installed manually from <ulink url="http://files.kde.org/rkward/R/">&rkward;'s own repository</ulink>. You can either do that by using the GUI interface (<menuchoice><guimenu>Settings</guimenu><guimenuitem>Configure packages</guimenuitem></menuchoice>), or from any running &r; session:</para> <programlisting> install.packages("rkwarddev", repos="http://files.kde.org/rkward/R") @@ -2277,7 +2279,7 @@ standards for each defined suite. <tip><para>The package will add a new GUI dialog to &rkward; under <menuchoice><guimenu>File</guimenu><guimenuitem>Export</guimenuitem><guimenuitem>Create &rkward; plugin skeleton</guimenuitem></menuchoice>. Like the name suggests, you can create plugin skeletons for further editing with it. This dialog itself was in turn generated by an <application>rkwarddev</application> script which you can find in the <quote>demo</quote> directory of the installed package and package sources, as an additional example. You can also run it by calling <function>demo("skeleton_dialog")</function></para></tip> <sect2 id="rkdev_gui"><title>GUI description</title> - <para>You will imediately notice that the workflow is considerably different: Contrary to writing the XML code directly, you do not begin with the <command><document></command> definition, but directly with the plugin elements you'd like to have in the dialog. You can assign each interface element -- be it checkboxes, dropdown menus, variable slots or anything else -- to individual &r; objects, and then combine these objects to the actual GUI. The package has functions for <link linkend="interfaceelements">each XML tag</link> that can be used to define the plugin GUI, and most of them even have the same name, only with the prefix <function>rk.XML.*</function>. For example, defining a <command><varselector></command> and two <command><varslot></command> elements for the <replaceable>"x"</replaceable> and <replaceable>"y"</replaceable> variable of the t-test example can be done by:</para> + <para>You will immediately notice that the workflow is considerably different: Contrary to writing the XML code directly, you do not begin with the <command><document></command> definition, but directly with the plugin elements you'd like to have in the dialog. You can assign each interface element -- be it check boxes, dropdown menus, variable slots or anything else -- to individual &r; objects, and then combine these objects to the actual GUI. The package has functions for <link linkend="interfaceelements">each XML tag</link> that can be used to define the plugin GUI, and most of them even have the same name, only with the prefix <function>rk.XML.*</function>. For example, defining a <command><varselector></command> and two <command><varslot></command> elements for the <replaceable>"x"</replaceable> and <replaceable>"y"</replaceable> variable of the t-test example can be done by:</para> <programlisting> variables <- rk.XML.varselector(id.name="vars") var.x <- rk.XML.varslot("compare", source=variables, types="number", required=TRUE, id.name="x") @@ -2312,7 +2314,7 @@ test.hypothesis <- rk.XML.radio("using test hypothesis", <option label="Second is greater" value="less" /> </radio> </programlisting> - <para>All that's missing from the elements of the <quote>Basic settings</quote> tab is the checkbox for paired samples, and the structuring of all of these elements in rows and columns:</para> + <para>All that's missing from the elements of the <quote>Basic settings</quote> tab is the check box for paired samples, and the structuring of all of these elements in rows and columns:</para> <programlisting> check.paired <- rk.XML.cbox("Paired sample", value="1", un.value="0") basic.settings <- rk.XML.row(variables, rk.XML.col(var.x, var.y, test.hypothesis, check.paired)) @@ -2329,7 +2331,7 @@ basic.settings <- rk.XML.row(variables, rk.XML.col(var.x, var.y, test.hypothe <option label="First is greater" value="greater" /> <option label="Second is greater" value="less" /> </radio> - <checkbox id="chc_Pardsmpl" label="Paired sample" value="1" value_unchecked="0" /> + <check box id="chc_Pardsmpl" label="Paired sample" value="1" value_unchecked="0" /> </column> </row> </programlisting> @@ -2373,9 +2375,9 @@ full.wizard <- rk.XML.wizard( <sect2 id="rkdev_jscode"><title>JavaScript code</title> <para>Until now, using the <application>rkwarddev</application> package might not seem to have helped so much. This is going to change right now.</para> <para>First of all, just like we didn't have to care about IDs for elements when defining the GUI layout, we don't have to care about JavaScript variable names in the next step. If you want more control, you can write plain JavaScript code and have it pasted to the generated file. But it's probably much more efficient to do it the <application>rkwarddev</application> way.</para> - <para>Most notably you don't have to define any variable yourself, as <function>rk.plugin.skeleton()</function> can scan your XML code and automatically define all variables you will probably need -- for instance, you wouldn't bother to include a checkbox if you don't use its value or state afterwards. So we can start writing the actual &r; code generating JS immediately.</para> + <para>Most notably you don't have to define any variable yourself, as <function>rk.plugin.skeleton()</function> can scan your XML code and automatically define all variables you will probably need -- for instance, you wouldn't bother to include a check box if you don't use its value or state afterwards. So we can start writing the actual &r; code generating JS immediately.</para> <tip><para>The function <function>rk.JS.scan()</function> can also scan existing XML files for variables.</para></tip> - <para>The package has some functions for JS code constructs that are commonly used in &rkward; plugins, like the <function>echo()</function> function or <function>if() {...} else {...}</function> conditions. There are some differences between JS and R, e.g., for <function>paste()</function> in &r; you use the comma to concatenate character strings, whereas for <function>echo()</function> in JS... [truncated message content] |
From: m.eik m. <mei...@un...> - 2015-02-04 14:02:33
|
Git commit cc04b7824c531d354562a9d12c67234253c6823c by m.eik michalke. Committed on 04/02/2015 at 14:02. Pushed by meikm into branch 'master'. fix duplicated icon in OS X dock M +2 -0 rkward/Info.plist.in http://commits.kde.org/rkward/cc04b7824c531d354562a9d12c67234253c6823c diff --git a/rkward/Info.plist.in b/rkward/Info.plist.in index 0ecc6b0..2e356ae 100644 --- a/rkward/Info.plist.in +++ b/rkward/Info.plist.in @@ -2,6 +2,8 @@ <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> + <key>LSUIElement</key> + <string>1</string> <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>CFBundleExecutable</key> |
Git commit 1e1f99136bb4219f05c62b26769b54a7c029ae33 by m.eik michalke. Committed on 04/02/2015 at 13:51. Pushed by meikm into branch 'master'. added feature to require rkward::menu and rkward::embedded in pluginmaps. it's TRUE by default but will be set to FALSE if internal=TRUE is set in rk.plugin.skeleton(). M +3 -1 packages/rkwarddev/ChangeLog M +5 -4 packages/rkwarddev/DESCRIPTION M +15 -2 packages/rkwarddev/R/rk.XML.pluginmap.R M +9 -4 packages/rkwarddev/R/rk.plugin.skeleton.R M +1 -1 packages/rkwarddev/R/rkwarddev-package.R M +5 -1 packages/rkwarddev/inst/NEWS.Rd M +6 -1 packages/rkwarddev/man/rk.XML.pluginmap.Rd M +7 -3 packages/rkwarddev/man/rk.plugin.skeleton.Rd M +1 -1 packages/rkwarddev/man/rkwarddev-package.Rd http://commits.kde.org/rkward/1e1f99136bb4219f05c62b26769b54a7c029ae33 diff --git a/packages/rkwarddev/ChangeLog b/packages/rkwarddev/ChangeLog index 78564bf..c37b580 100644 --- a/packages/rkwarddev/ChangeLog +++ b/packages/rkwarddev/ChangeLog @@ -1,6 +1,6 @@ ChangeLog for package rkwarddev -changes in version 0.07-1 (2015-02-01) +changes in version 0.07-1 (2015-02-04) fixed: - rk.XML.optionset() does now allow to re-use objects defined in the same function call (i.e., refer to optioncolumns in the logic section) @@ -29,6 +29,8 @@ added: rk.XML.varslot(). - rk.XML.pluginmap() now adds a "po_id" attribute to pluginmaps, necessary for i18n + - new attribute "require.defaults" in rk.XML.pluginmap() to add + rkward::menu and rkward::embedded as requirements - new attribute "i18n" added to several XML functions; it takes a list with the named arguments "comment" or "context" to either produce an i18n comment node or an "i18n_context" attribute diff --git a/packages/rkwarddev/DESCRIPTION b/packages/rkwarddev/DESCRIPTION index e40d666..f470064 100644 --- a/packages/rkwarddev/DESCRIPTION +++ b/packages/rkwarddev/DESCRIPTION @@ -8,15 +8,16 @@ Depends: Suggests: testthat Enhances: rkward -Description: Provides functions to create plugin skeletons and XML structures - for RKWard. +Description: Provides functions to create plugin skeletons and XML + structures for RKWard. License: GPL (>= 3) Encoding: UTF-8 LazyLoad: yes URL: http://rkward.sourceforge.net -Authors@R: c(person(given="m.eik", family="michalke", email="mei...@hh...", role=c("aut", "cre"))) +Authors@R: c(person(given="m.eik", family="michalke", + email="mei...@hh...", role=c("aut", "cre"))) Version: 0.07-1 -Date: 2015-02-01 +Date: 2015-02-04 Collate: '00_class_01_rk.JS.arr.R' '00_class_02_rk.JS.var.R' diff --git a/packages/rkwarddev/R/rk.XML.pluginmap.R b/packages/rkwarddev/R/rk.XML.pluginmap.R index e2307f7..a56da9f 100644 --- a/packages/rkwarddev/R/rk.XML.pluginmap.R +++ b/packages/rkwarddev/R/rk.XML.pluginmap.R @@ -51,13 +51,15 @@ #' @param priority Character string, the priority attribute of the \code{<document>} node. Must be either "hidden", "low", "medium", or "high", #' defaults to "medium". #' @param id.name Character string, a unique ID for this plugin element. If \code{"auto"}, an ID will be generated automatically from \code{name}. +#' @param require.defaults Logical, if \code{TRUE}, \code{<require map="rkward::menu" />} and \code{<require map="rkward::embedded" />} will be added +#' by default, which ensures that the menu structure and embeddable plugins are loaded. It shouldn't hurt to set this. #' @seealso \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard} #' @return An object of class \code{XiMpLe.node}. #' @export rk.XML.pluginmap <- function(name, about=NULL, components, hierarchy="test", require=NULL, x11.context=NULL, import.context=NULL, clean.name=TRUE, hints=FALSE, gen.info=TRUE, - dependencies=NULL, namespace=name, priority="medium", id.name="auto"){ + dependencies=NULL, namespace=name, priority="medium", id.name="auto", require.defaults=TRUE){ name.orig <- name if(isTRUE(clean.name)){ # to besure, remove all non-character symbols from name @@ -109,6 +111,12 @@ rk.XML.pluginmap <- function(name, about=NULL, components, hierarchy="test", } else {} ## require section + if(isTRUE(require.defaults)){ + if(is.null(require)){ + + } else { + } + } else {} if(!is.null(require)){ # check if this is *really* require nodes for(this.child in child.list(require)){ @@ -124,11 +132,16 @@ rk.XML.pluginmap <- function(name, about=NULL, components, hierarchy="test", } } } else { - if(isTRUE(hints)){ + if(!isTRUE(require.defaults) & isTRUE(hints)){ require.XML <- XMLNode("!--", rk.XML.require("path/file.pluginmap")) all.children[[length(all.children)+1]] <- require.XML } else {} } + # check defaults + if(isTRUE(require.defaults)){ + all.children[[length(all.children)+1]] <- rk.XML.require(map="rkward::menu") + all.children[[length(all.children)+1]] <- rk.XML.require(map="rkward::embedded") + } else {} ## components section if(!is.null(components)){ diff --git a/packages/rkwarddev/R/rk.plugin.skeleton.R b/packages/rkwarddev/R/rk.plugin.skeleton.R index a856e82..e462306 100644 --- a/packages/rkwarddev/R/rk.plugin.skeleton.R +++ b/packages/rkwarddev/R/rk.plugin.skeleton.R @@ -90,9 +90,13 @@ #' that they were generated by \code{rkwarddev} and changes should be done to the script. #' @param hints Logical, if \code{TRUE} and you leave out optional entries (like \code{dependencies=NULL}), dummy sections will be added as comments. #' @param indent.by A character string defining the indentation string to use. -#' @param internal Logical, a simple switch to build an internal plugin for official distribution with RKWard. If set to \code{TRUE}, the -#' plugin will have its namespace set to \code{"rkward"} and \code{<about>} info in the main component. No \code{DESCRIPTION} or -#' \code{NAMESPACE} file will be written. +#' @param internal Logical, a simple switch to build an internal plugin for official distribution with RKWard. If set to \code{TRUE}: +#' \itemize{ +#' \item{The plugin will have its namespace set to \code{"rkward"}.} +#' \item{The \code{<about>} info will also be available in the main component.} +#' \item{\code{require.defaults} of \code{\link[rkwarddev:rk.XML.pluginmap]{rk.XML.pluginmap}} will be set to \code{FALSE}.} +#' \item{No \code{DESCRIPTION} or \code{NAMESPACE} file will be written.} +#' } #' @return Character string with the path to the plugin root directory. #' @seealso \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard} #' @export @@ -354,7 +358,8 @@ rk.plugin.skeleton <- function(about, path=tempdir(), dependencies=dependencies.node, namespace=pluginmap[["namespace"]], # id.name=paste(gsub("[.]*|[[:space:]]*", "", pluginmap[["name"]]), "rkward", sep="_")) - id.name=paste(pm.id.name, "rkward", sep="_")) + id.name=paste(pm.id.name, "rkward", sep="_"), + require.defaults=!isTRUE(internal)) cat(pasteXML(XML.pluginmap, shine=2, indent.by=indent.by), file=plugin.pluginmap) } else { pm.id.name <- name diff --git a/packages/rkwarddev/R/rkwarddev-package.R b/packages/rkwarddev/R/rkwarddev-package.R index 1fbdc73..55b0f3f 100644 --- a/packages/rkwarddev/R/rkwarddev-package.R +++ b/packages/rkwarddev/R/rkwarddev-package.R @@ -4,7 +4,7 @@ #' Package: \tab rkwarddev\cr #' Type: \tab Package\cr #' Version: \tab 0.07-1\cr -#' Date: \tab 2015-02-01\cr +#' Date: \tab 2015-02-04\cr #' Depends: \tab R (>= 2.9.0),methods,XiMpLe (>= 0.03-21),rkward (>= 0.5.7)\cr #' Enhances: \tab rkward\cr #' Encoding: \tab UTF-8\cr diff --git a/packages/rkwarddev/inst/NEWS.Rd b/packages/rkwarddev/inst/NEWS.Rd index 34530b6..9af3f54 100644 --- a/packages/rkwarddev/inst/NEWS.Rd +++ b/packages/rkwarddev/inst/NEWS.Rd @@ -1,7 +1,7 @@ \name{NEWS} \title{News for Package 'rkwarddev'} \encoding{UTF-8} -\section{Changes in rkwarddev version 0.07-1 (2015-02-01)}{ +\section{Changes in rkwarddev version 0.07-1 (2015-02-04)}{ \subsection{fixed}{ \itemize{ \item \code{rk.XML.optionset()} does now allow to re-use objects defined in the same @@ -34,6 +34,8 @@ \code{rk.XML.varslot()}. \item \code{rk.XML.pluginmap()} now adds a \code{"po_id"} attribute to pluginmaps, necessary for i18n + \item new attribute \code{"require.defaults"} in \code{rk.XML.pluginmap()} to add + rkward::menu and rkward::embedded as requirements \item new attribute \code{"i18n"} added to several XML functions; it takes a list with the named arguments \code{"comment"} or \code{"context"} to either produce an i18n comment node or an \code{"i18n_context"} attribute @@ -54,6 +56,8 @@ \code{"min_columns"} \item <dropdown>, <radio> and <select> have gained \code{"string.quoted"} as a valid property/modifier + \item new function \code{rk.XML.i18n()} to define translatable labels in logic sections + \item new function \code{rk.rkh.label()} for extracting labels from plugin elements } } \subsection{changed}{ diff --git a/packages/rkwarddev/man/rk.XML.pluginmap.Rd b/packages/rkwarddev/man/rk.XML.pluginmap.Rd index 82d64cb..bead0da 100644 --- a/packages/rkwarddev/man/rk.XML.pluginmap.Rd +++ b/packages/rkwarddev/man/rk.XML.pluginmap.Rd @@ -8,7 +8,7 @@ rk.XML.pluginmap(name, about = NULL, components, hierarchy = "test", require = NULL, x11.context = NULL, import.context = NULL, clean.name = TRUE, hints = FALSE, gen.info = TRUE, dependencies = NULL, namespace = name, priority = "medium", - id.name = "auto") + id.name = "auto", require.defaults = TRUE) } \arguments{ \item{name}{Character string, name of the plugin.} @@ -69,6 +69,11 @@ defaults to "medium".} \item{id.name}{Character string, a unique ID for this plugin element. If \code{"auto"}, an ID will be generated automatically from \code{name}.} + +\item{require.defaults}{Logical, if \code{TRUE}, + \code{<require map="rkward::menu" />} and \code{<require map="rkward::embedded" />} will be added +by default, + which ensures that the menu structure and embeddable plugins are loaded. It shouldn't hurt to set this.} } \value{ An object of class \code{XiMpLe.node}. diff --git a/packages/rkwarddev/man/rk.plugin.skeleton.Rd b/packages/rkwarddev/man/rk.plugin.skeleton.Rd index 3b52b50..ece95c3 100644 --- a/packages/rkwarddev/man/rk.plugin.skeleton.Rd +++ b/packages/rkwarddev/man/rk.plugin.skeleton.Rd @@ -134,9 +134,13 @@ that they were generated by \code{rkwarddev} and changes should be done to the s \item{indent.by}{A character string defining the indentation string to use.} \item{internal}{Logical, - a simple switch to build an internal plugin for official distribution with RKWard. If set to \code{TRUE}, the -plugin will have its namespace set to \code{"rkward"} and \code{<about>} info in the main component. No \code{DESCRIPTION} or -\code{NAMESPACE} file will be written.} + a simple switch to build an internal plugin for official distribution with RKWard. If set to \code{TRUE}: +\itemize{ + \item{The plugin will have its namespace set to \code{"rkward"}.} + \item{The \code{<about>} info will also be available in the main component.} + \item{\code{require.defaults} of \code{\link[rkwarddev:rk.XML.pluginmap]{rk.XML.pluginmap}} will be set to \code{FALSE}.} + \item{No \code{DESCRIPTION} or \code{NAMESPACE} file will be written.} +}} } \value{ Character string with the path to the plugin root directory. diff --git a/packages/rkwarddev/man/rkwarddev-package.Rd b/packages/rkwarddev/man/rkwarddev-package.Rd index a78a1d3..b54932d 100644 --- a/packages/rkwarddev/man/rkwarddev-package.Rd +++ b/packages/rkwarddev/man/rkwarddev-package.Rd @@ -12,7 +12,7 @@ A collection of tools for RKWard plugin development. Package: \tab rkwarddev\cr Type: \tab Package\cr Version: \tab 0.07-1\cr -Date: \tab 2015-02-01\cr +Date: \tab 2015-02-04\cr Depends: \tab R (>= 2.9.0),methods,XiMpLe (>= 0.03-21),rkward (>= 0.5.7)\cr Enhances: \tab rkward\cr Encoding: \tab UTF-8\cr |
From: Thomas F. <tho...@ru...> - 2015-02-03 19:21:25
|
Git commit 5825a6d33e967c61a14f6be90c1c0e994642cc34 by Thomas Friedrichsmeier. Committed on 03/02/2015 at 19:09. Pushed by tfry into branch 'master'. Fix message M +1 -1 rkward/rkward.cpp http://commits.kde.org/rkward/5825a6d33e967c61a14f6be90c1c0e994642cc34 diff --git a/rkward/rkward.cpp b/rkward/rkward.cpp index 2810f22..7a8f68b 100644 --- a/rkward/rkward.cpp +++ b/rkward/rkward.cpp @@ -284,7 +284,7 @@ void RKWardMainWindow::initPlugins (const QStringList &automatically_added) { QStringList all_maps = RKSettingsModulePlugins::pluginMaps (); if (all_maps.isEmpty()) { - KMessageBox::information (0, i18n ("Plugins are needed: you may manage these through \"Settings->Configure RKWard\".\n"), i18n ("No active plugin maps")); + KMessageBox::information (0, i18n ("Plugins are needed: you may manage these through \"Settings->Manage R package and plugins\".\n"), i18n ("No active plugin maps")); return; } |
From: Yuri C. <yu...@uk...> - 2015-02-03 06:54:54
|
Git commit 8f04ba8fc6c75024a4afcdfcb6a80f340d6a8246 by Yuri Chornoivan. Committed on 03/02/2015 at 06:54. Pushed by yurchor into branch 'master'. Fix typo M +1 -1 rkward/plugins/analysis/power/Poweranalysis.rkh http://commits.kde.org/rkward/8f04ba8fc6c75024a4afcdfcb6a80f340d6a8246 diff --git a/rkward/plugins/analysis/power/Poweranalysis.rkh b/rkward/plugins/analysis/power/Poweranalysis.rkh index 2dd4da4..fd40680 100644 --- a/rkward/plugins/analysis/power/Poweranalysis.rkh +++ b/rkward/plugins/analysis/power/Poweranalysis.rkh @@ -6,7 +6,7 @@ Power analysis </title> <summary> - Perform power analysis for a variety of statistcal methods. + Perform power analysis for a variety of statistical methods. </summary> <usage> Given three of the parameters 'power of test', |
From: Thomas F. <tho...@ru...> - 2015-02-02 20:01:38
|
Git commit bb70214974f73ab03b6075a0d7a0da5f02cec44c by Thomas Friedrichsmeier. Committed on 02/02/2015 at 19:59. Pushed by tfry into branch 'master'. QFileDialog::getExistingDirectory() is also affected by Windows bug. Fix this, by forcing Qt to always use a non-native dialog. See also: http://www.qtcentre.org/threads/37350-QFileDialog-getExistingDirectory-locks-up-the-application M +1 -1 ChangeLog M +7 -3 rkward/misc/getfilenamewidget.cpp M +11 -2 rkward/settings/rksettingsmoduler.cpp http://commits.kde.org/rkward/bb70214974f73ab03b6075a0d7a0da5f02cec44c diff --git a/ChangeLog b/ChangeLog index 3464850..1f33ced 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,6 @@ TODO 0.6.3: - - dirselectors on Windows - talk to kde-18n-doc +- Fixed: Hang when trying to select existing directories in file selectors on Windows - New element <i18n> for use in plugins' logic section: Provides a translatable string property - New element <label> for use in plugin help pages: Copies the label-attribute of the given element into the text - New string property modifier "quoted" to make it easier to quote dynamic strings inside plugins diff --git a/rkward/misc/getfilenamewidget.cpp b/rkward/misc/getfilenamewidget.cpp index efba428..44be15e 100644 --- a/rkward/misc/getfilenamewidget.cpp +++ b/rkward/misc/getfilenamewidget.cpp @@ -83,9 +83,13 @@ void GetFileNameWidget::setLocation (const QString &new_location) { #ifdef Q_WS_WIN void GetFileNameWidget::hackOverrideDirDialog () { RK_TRACE (MISC); - QUrl res = QFileDialog::getExistingDirectory (this, edit->windowTitle (), edit->startDir ().toLocalFile ()); - if (res.isValid ()) { - edit->setUrl (res); + + // TODO: Hang on Windows when trying to select any dir using (K|Q)FileDialog::getExistingDirectory (). KDE 4.10 + QFileDialog dummy (this, edit->windowTitle (), edit->startDir ().toLocalFile ()); + dummy.setFileMode (QFileDialog::Directory); + dummy.setOptions (QFileDialog::ShowDirsOnly); + if (dummy.exec ()) { + edit->setUrl (dummy.selectedFiles ().value (0)); emit (locationChanged ()); } } diff --git a/rkward/settings/rksettingsmoduler.cpp b/rkward/settings/rksettingsmoduler.cpp index 729fa0d..af9b75e 100644 --- a/rkward/settings/rksettingsmoduler.cpp +++ b/rkward/settings/rksettingsmoduler.cpp @@ -31,6 +31,9 @@ #include <QGridLayout> #include <QPushButton> #include <QTextEdit> +#ifdef Q_WS_WIN +# include <QFileDialog> +#endif #include "rksettingsmodulegeneral.h" #include "../core/robject.h" @@ -417,8 +420,14 @@ void RKSettingsModuleRPackages::settingChanged () { void RKSettingsModuleRPackages::addLibLoc (QStringList *string_list) { RK_TRACE (SETTINGS); #ifdef Q_WS_WIN - // TODO: Hang on Windows when trying to select any dir using KFileDialog::getExistingDirectory (). KDE 4.10 - QString new_string = QFileDialog::getExistingDirectory (this, i18n ("Add R Library Directory")); + // TODO: Hang on Windows when trying to select any dir using (K|Q)FileDialog::getExistingDirectory (). KDE 4.10 + QFileDialog dummy (this, i18n ("Add R Library Directory")); + dummy.setFileMode (QFileDialog::Directory); + dummy.setOptions (QFileDialog::ShowDirsOnly); + QString new_string; + if (dummy.exec ()) { + new_string = dummy.selectedFiles ().value (0); + } #else QString new_string = KFileDialog::getExistingDirectory (KUrl (), this, i18n ("Add R Library Directory")); #endif |
From: Thomas F. <tho...@ru...> - 2015-02-02 19:25:41
|
Git commit 7a819914099588847aa5ea48b8e07850a8d1316c by Thomas Friedrichsmeier. Committed on 02/02/2015 at 19:24. Pushed by tfry into branch 'master'. Experimental: Work around hang when selecting dirs on Windows. M +19 -1 rkward/misc/getfilenamewidget.cpp M +5 -1 rkward/misc/getfilenamewidget.h M +6 -1 rkward/settings/rksettingsmoduler.cpp http://commits.kde.org/rkward/7a819914099588847aa5ea48b8e07850a8d1316c diff --git a/rkward/misc/getfilenamewidget.cpp b/rkward/misc/getfilenamewidget.cpp index 9f89817..efba428 100644 --- a/rkward/misc/getfilenamewidget.cpp +++ b/rkward/misc/getfilenamewidget.cpp @@ -2,7 +2,7 @@ getfilenamewidget - description ------------------- begin : Tue Aug 24 2004 - copyright : (C) 2004, 2007, 2009, 2010, 2012 by Thomas Friedrichsmeier + copyright : (C) 2004, 2007, 2009, 2010, 2012, 2015 by Thomas Friedrichsmeier email : tf...@us... ***************************************************************************/ @@ -18,6 +18,7 @@ #include <qlabel.h> #include <QVBoxLayout> +#include <QFileDialog> #include <klocale.h> #include <klineedit.h> @@ -42,6 +43,12 @@ GetFileNameWidget::GetFileNameWidget (QWidget *parent, FileType mode, bool only_ KFile::Modes mode_flags; if (mode == ExistingDirectory) { mode_flags = KFile::Directory | KFile::ExistingOnly; +#ifdef Q_WS_WIN + // TODO: Hang on Windows when trying to select any dir (also in KFileDialog::getExistingDirectory ()). KDE 4.10 + // this hack works around this, by using QFileDialog::getExistingDirectory (). + edit->button ()->disconnect (SIGNAL (clicked())); + connect (edit->button (), SIGNAL (clicked()), this, SLOT(hackOverrideDirDialog())); +#endif } else if (mode == ExistingFile) { mode_flags = KFile::File | KFile::ExistingOnly; } else if (mode == SaveFile) { @@ -73,6 +80,17 @@ void GetFileNameWidget::setLocation (const QString &new_location) { if (edit->text () != new_location) edit->setUrl (new_location); } +#ifdef Q_WS_WIN +void GetFileNameWidget::hackOverrideDirDialog () { + RK_TRACE (MISC); + QUrl res = QFileDialog::getExistingDirectory (this, edit->windowTitle (), edit->startDir ().toLocalFile ()); + if (res.isValid ()) { + edit->setUrl (res); + emit (locationChanged ()); + } +} +#endif + void GetFileNameWidget::locationEditChanged (const QString &) { RK_TRACE (MISC); emit (locationChanged ()); diff --git a/rkward/misc/getfilenamewidget.h b/rkward/misc/getfilenamewidget.h index dc115e5..f0a1c17 100644 --- a/rkward/misc/getfilenamewidget.h +++ b/rkward/misc/getfilenamewidget.h @@ -2,7 +2,7 @@ getfilenamewidget - description ------------------- begin : Tue Aug 24 2004 - copyright : (C) 2004, 2007 by Thomas Friedrichsmeier + copyright : (C) 2004, 2007, 2015 by Thomas Friedrichsmeier email : tf...@us... ***************************************************************************/ @@ -48,6 +48,10 @@ public slots: void locationEditChanged (const QString &); signals: void locationChanged (); +#ifdef Q_WS_WIN +private slots: + void hackOverrideDirDialog (); +#endif private: KUrlRequester *edit; }; diff --git a/rkward/settings/rksettingsmoduler.cpp b/rkward/settings/rksettingsmoduler.cpp index 7074522..729fa0d 100644 --- a/rkward/settings/rksettingsmoduler.cpp +++ b/rkward/settings/rksettingsmoduler.cpp @@ -2,7 +2,7 @@ rksettingsmoduler - description ------------------- begin : Wed Jul 28 2004 - copyright : (C) 2004-2013 by Thomas Friedrichsmeier + copyright : (C) 2004-2015 by Thomas Friedrichsmeier email : tf...@us... ***************************************************************************/ @@ -416,7 +416,12 @@ void RKSettingsModuleRPackages::settingChanged () { void RKSettingsModuleRPackages::addLibLoc (QStringList *string_list) { RK_TRACE (SETTINGS); +#ifdef Q_WS_WIN + // TODO: Hang on Windows when trying to select any dir using KFileDialog::getExistingDirectory (). KDE 4.10 + QString new_string = QFileDialog::getExistingDirectory (this, i18n ("Add R Library Directory")); +#else QString new_string = KFileDialog::getExistingDirectory (KUrl (), this, i18n ("Add R Library Directory")); +#endif if (!new_string.isEmpty ()) { (*string_list).append (new_string); } |
From: Thomas F. <tho...@ru...> - 2015-02-02 13:22:56
|
Git commit cccbd7795477e6987198ac9e6834abb1577dd7df by Thomas Friedrichsmeier. Committed on 02/02/2015 at 13:21. Pushed by tfry into branch 'master'. Add some basic pointers on git-workflow and policies. A +48 -0 CommitPolicy.txt http://commits.kde.org/rkward/cccbd7795477e6987198ac9e6834abb1577dd7df diff --git a/CommitPolicy.txt b/CommitPolicy.txt new file mode 100644 index 0000000..e9d8e08 --- /dev/null +++ b/CommitPolicy.txt @@ -0,0 +1,48 @@ +Committing to the RKWard repository +=================================== + +This is a very short guideline, primarily for those who have KDE developer access, and are wondering whether, and how to commit to the RKWard repository, directly. + +If you do not have KDE developer access, contact us on the mailing list (rkw...@kd...), or submit patches via reviewboard (see below). + +Library dependencies +==================== + +It is important to note that RKWard makes a point of _not_ requiring the latest KDE / QT libraries. If you want to use the latest and greatest, be sure to use #ifdef's, and make a best +effort to support features for older versions of libraries, too. For the moment, in the KDE 4 versions of RKWard, we're trying to support Unbutu 10.04, meaning: + +Oldest library versions to support: +* Qt: 4.6.2 +* KDE: 4.4.2 +* R: 2.10.1 + +With the upcoming port to KF5, allowable dependencies will be increased, considerably. Thus, if your feature really needs something newer, don't despair, but commit to work-branch, for now. + +Branches and policies +===================== + +* master: + Most development happens in master. For the time being master is always open for commits, although you are encouraged to develop more elaborate new features in a separate branch. +* releases/* + These branches are more restricted. In general you should: + * not add any new features (only fixes) to these + * monitor the mailing list for any (string) freezes in these branches, before doing any work, there + * also add your commit to master (and add it there, first), unless it is really specific to the release-branch +* work/* + For longer, experimental, or disruptive work, consider creating a branch named "work/feature_description". Do let us know, when the feature is merged (or discarded), and the branch can be removed. + +Testing +======= + +Only some of RKWard (mostly: the plugins) is currently covered by automated tests. To run these, use + make plugintests +More elaborate documentation is available at https://rkward.kde.org/Automated_Plugin_Testing . Running tests is particularly important when making changes to the "plugin" and "plugins" +subdirectories. + +Note that there are some false positives or unstable tests (failing in some locales, for instance). Check the diffs to find out, exactly how the test failed, or run tests before +and after your changes. If in any doubt, ask on the mailing list rkw...@kd... . + +Review +====== + +There is no strict policy on code reviews. It is never wrong to ask for review on git.reviewboard.kde.org, though. Always select group "rkward". |
From: Thomas F. <tho...@ru...> - 2015-02-02 10:20:39
|
Git commit 6175544c28854e8ff07b4c8cda4584ee4e092b84 by Thomas Friedrichsmeier. Committed on 02/02/2015 at 10:19. Pushed by tfry into branch 'master'. Add i18n() calls to power analysis plugin. M +3 -1 ChangeLog M +35 -25 rkward/plugins/analysis/power/Poweranalysis.js M +1 -1 rkward/plugins/analysis/power/Poweranalysis.rkh M +6 -0 rkward/plugins/analysis/power/Poweranalysis.xml M +35 -29 rkward/plugins/rkwarddev_scripts/rkwarddev_power_plugin_script.R M +21 -21 tests/analysis_plugins/power_analysis.rkcommands.R M +10 -10 tests/analysis_plugins/power_analysis.rkout http://commits.kde.org/rkward/6175544c28854e8ff07b4c8cda4584ee4e092b84 diff --git a/ChangeLog b/ChangeLog index c71f126..3464850 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,11 @@ +TODO 0.6.3: + - dirselectors on Windows + - talk to kde-18n-doc - New element <i18n> for use in plugins' logic section: Provides a translatable string property - New element <label> for use in plugin help pages: Copies the label-attribute of the given element into the text - New string property modifier "quoted" to make it easier to quote dynamic strings inside plugins - Reworked distribution calculator plugins - Added power analysis plugin (already existed as separate plugin) - - TODO: add automated tests - Assume plugin .js files to be in utf-8 encoding; this allows using non-ascii characters in the generated code - <matrix> element gains options min_rows and min_columns, and the details of fixed_width="true" have been improved - Fixed: <valueslot>s were quirky with respect to showing as invalid diff --git a/rkward/plugins/analysis/power/Poweranalysis.js b/rkward/plugins/analysis/power/Poweranalysis.js index 86a2f81..f8c8d7a 100644 --- a/rkward/plugins/analysis/power/Poweranalysis.js +++ b/rkward/plugins/analysis/power/Poweranalysis.js @@ -10,23 +10,24 @@ function preprocess(){ function calculate(){ // read in variables from dialog - var drpPwrStat = getValue("drp_pwr_stat"); - var spnNmbrfgrp = getValue("spn_Nmbrfgrp"); - var drpPwrType = getValue("drp_pwr_type"); - var drpPwrProptype = getValue("drp_pwr_proptype"); - var drpPwrHypothesis = getValue("drp_pwr_hypothesis"); - var radEffctEta = getValue("rad_effct_eta"); - var radPwrParam = getValue("rad_pwr_param"); - var spnPower = getValue("spn_Power"); - var pwrSpinDf = getValue("pwr_spin_df"); - var pwrSpinDfu = getValue("pwr_spin_dfu"); - var pwrSpinDfv = getValue("pwr_spin_dfv"); - var pwrSpinSample0 = getValue("pwr_spin_sample0"); - var pwrSpinSample1 = getValue("pwr_spin_sample1"); - var pwrSpinSample2 = getValue("pwr_spin_sample2"); - var spnEffectsz = getValue("spn_Effectsz"); - var spnSgnfcncl = getValue("spn_Sgnfcncl"); - var svbSvrsltst = getValue("svb_Svrsltst"); + + var drpPwrStat = getString("drp_pwr_stat"); + var spnNmbrfgrp = getString("spn_Nmbrfgrp"); + var drpPwrType = getString("drp_pwr_type"); + var drpPwrProptype = getString("drp_pwr_proptype"); + var drpPwrHypothesis = getString("drp_pwr_hypothesis"); + var radEffctEta = getString("rad_effct_eta"); + var radPwrParam = getString("rad_pwr_param"); + var spnPower = getString("spn_Power"); + var pwrSpinDf = getString("pwr_spin_df"); + var pwrSpinDfu = getString("pwr_spin_dfu"); + var pwrSpinDfv = getString("pwr_spin_dfv"); + var pwrSpinSample0 = getString("pwr_spin_sample0"); + var pwrSpinSample1 = getString("pwr_spin_sample1"); + var pwrSpinSample2 = getString("pwr_spin_sample2"); + var spnEffectsz = getString("spn_Effectsz"); + var spnSgnfcncl = getString("spn_Sgnfcncl"); + var svbSvrsltst = getString("svb_Svrsltst"); // the R code to be evaluated echo("\tpwr.result <- try(\n\t\t"); @@ -73,7 +74,8 @@ function calculate(){ if(radEffctEta == "f") { echo(",\n\t\t\tf=" + spnEffectsz); } else { - echo(",\n\t\t\tf=sqrt(" + spnEffectsz + "/(1-" + spnEffectsz + ")) # calculate f from eta squared"); + echo(",\n\t\t\tf=sqrt(" + spnEffectsz + "/(1-" + spnEffectsz + "))"); + comment("calculate f from eta squared", "\t"); } } } @@ -170,24 +172,32 @@ function printout(){ var drpPwrStat = getValue("drp_pwr_stat"); var radPwrParam = getValue("rad_pwr_param"); - echo("\t# Catch errors due to unsuitable data\n" + "\tif(class(pwr.result) == \"try-error\"){\n" + "\t\trk.print(\"Power analysis not possible with the data you provided\")\n" + "\t\treturn()\n\t}\n\n" + "\t# Prepare printout\n" + "\tnote <- pwr.result[[\"note\"]]\n" + "\tparameters <- list(\"Target measure\"=\"" + radPwrParam + "\")\n" + "\tif(!is.null(pwr.result[[\"alternative\"]])){\n\t\tparameters[[\"alternative\"]] <- pwr.result[[\"alternative\"]]\n\t}\n\n" + "\trk.header(pwr.result[[\"method\"]], parameters=parameters)\n" + "\tpwr.result[c(\"method\", \"note\", \"alternative\")] <- NULL\n" + "\tpwr.result <- as.data.frame(unlist(pwr.result))\n" + "\tcolnames(pwr.result) <- \"Parameters\"\n\n" + "\trk.results(pwr.result)\n" + "\tif(!is.null(note)){\n\t\trk.print(paste(\"<strong>Note:</strong> \", note))\n\t}\n\n"); + comment("Catch errors due to unsuitable data", "\t"); + echo("\tif(class(pwr.result) == \"try-error\"){\n" + "\t\trk.print(" + i18n("Power analysis not possible with the data you provided") + ")\n" + "\t\treturn()\n\t}\n\n"); + comment("Prepare printout", "\t"); + echo("\tnote <- pwr.result[[\"note\"]]\n"); + header = new Header ().addFromUI ("rad_pwr_param"); + + echo("\tparameters <- list("); + echo (header.extractParameters ()); + echo(")\n" + "\tif(!is.null(pwr.result[[\"alternative\"]])){\n\t\tparameters[[" + i18n("alternative") + "]] <- pwr.result[[\"alternative\"]]\n\t}\n\n" + "\trk.header(pwr.result[[\"method\"]], parameters=parameters)\n" + "\tpwr.result[c(\"method\", \"note\", \"alternative\")] <- NULL\n" + "\tpwr.result <- as.data.frame(unlist(pwr.result))\n" + "\tcolnames(pwr.result) <- " + i18n("Parameters") + "\n\n" + "\trk.results(pwr.result)\n" + "\tif(!is.null(note)){\n\t\trk.print(paste(" + i18n("<strong>Note:</strong>") + ", note))\n\t}\n\n"); if(drpPwrStat == "pwr.t.test" | drpPwrStat == "pwr.norm.test") { - echo("\trk.print(\"Interpretation of effect size <strong>d</strong> (according to Cohen):\")\n" + "\trk.results(data.frame(small=0.2, medium=0.5, large=0.8))\n"); + echo("\trk.print(" + i18nc("Argument is name of statistic, e.g. 'r'", "Interpretation of effect size <strong>%1</strong> (according to Cohen):", "d") + ")\n" + "\trk.results(data.frame(" + i18nc("effect size", "small") + "=0.2, " + i18nc("effect size", "medium") + "=0.5, " + i18nc("effect size", "large") + "=0.8))\n"); } if(drpPwrStat == "pwr.r.test") { - echo("\trk.print(\"Interpretation of effect size <strong>r</strong> (according to Cohen):\")\n" + "\trk.results(data.frame(small=0.1, medium=0.3, large=0.5))\n"); + echo("\trk.print(" + i18nc("Argument is name of statistic, e.g. 'r'", "Interpretation of effect size <strong>%1</strong> (according to Cohen):", "r") + ")\n" + "\trk.results(data.frame(" + i18nc("effect size", "small") + "=0.1, " + i18nc("effect size", "medium") + "=0.3, " + i18nc("effect size", "large") + "=0.5))\n"); } if(drpPwrStat == "pwr.f2.test") { - echo("\trk.print(\"Interpretation of effect size <strong>f<sup>2</sup></strong> (according to Cohen):\")\n" + "\trk.results(data.frame(small=0.02, medium=0.15, large=0.35))\n"); + echo("\trk.print(" + i18nc("Argument is name of statistic, e.g. 'r'", "Interpretation of effect size <strong>%1</strong> (according to Cohen):", "f<sup>2</sup>") + ")\n" + "\trk.results(data.frame(" + i18nc("effect size", "small") + "=0.02, " + i18nc("effect size", "medium") + "=0.15, " + i18nc("effect size", "large") + "=0.35))\n"); } if(drpPwrStat == "pwr.anova.test") { - echo("\trk.print(\"Interpretation of effect size <strong>f</strong> (according to Cohen):\")\n" + "\trk.results(data.frame(small=0.1, medium=0.25, large=0.4))\n"); + echo("\trk.print(" + i18nc("Argument is name of statistic, e.g. 'r'", "Interpretation of effect size <strong>%1</strong> (according to Cohen):", "f") + ")\n" + "\trk.results(data.frame(" + i18nc("effect size", "small") + "=0.1, " + i18nc("effect size", "medium") + "=0.25, " + i18nc("effect size", "large") + "=0.4))\n"); } if(drpPwrStat == "pwr.chisq.test") { - echo("\trk.print(\"Interpretation of effect size <strong>w</strong> (according to Cohen):\")\n" + "\trk.results(data.frame(small=0.1, medium=0.3, large=0.5))\n"); + echo("\trk.print(" + i18nc("Argument is name of statistic, e.g. 'r'", "Interpretation of effect size <strong>%1</strong> (according to Cohen):", "w") + ")\n" + "\trk.results(data.frame(" + i18nc("effect size", "small") + "=0.1, " + i18nc("effect size", "medium") + "=0.3, " + i18nc("effect size", "large") + "=0.5))\n"); } if(drpPwrStat == "pwr.p.test") { - echo("\trk.print(\"Interpretation of effect size <strong>h</strong> (according to Cohen):\")\n" + "\trk.results(data.frame(small=0.2, medium=0.5, large=0.8))\n"); + echo("\trk.print(" + i18nc("Argument is name of statistic, e.g. 'r'", "Interpretation of effect size <strong>%1</strong> (according to Cohen):", "h") + ")\n" + "\trk.results(data.frame(" + i18nc("effect size", "small") + "=0.2, " + i18nc("effect size", "medium") + "=0.5, " + i18nc("effect size", "large") + "=0.8))\n"); } //// save result object // read in saveobject variables diff --git a/rkward/plugins/analysis/power/Poweranalysis.rkh b/rkward/plugins/analysis/power/Poweranalysis.rkh index fd40680..2dd4da4 100644 --- a/rkward/plugins/analysis/power/Poweranalysis.rkh +++ b/rkward/plugins/analysis/power/Poweranalysis.rkh @@ -6,7 +6,7 @@ Power analysis </title> <summary> - Perform power analysis for a variety of statistical methods. + Perform power analysis for a variety of statistcal methods. </summary> <usage> Given three of the parameters 'power of test', diff --git a/rkward/plugins/analysis/power/Poweranalysis.xml b/rkward/plugins/analysis/power/Poweranalysis.xml index cd25f87..4f5a95b 100644 --- a/rkward/plugins/analysis/power/Poweranalysis.xml +++ b/rkward/plugins/analysis/power/Poweranalysis.xml @@ -4,6 +4,12 @@ perhaps don't make changes here, but in the rkwarddev script instead! --> <code file="Poweranalysis.js" /> <help file="Poweranalysis.rkh" /> + <!-- <dependencies> + </dependencies> --> + <about name="Power analysis" shortinfo="RKWard GUI to perform power analysis and sample size estimation." longinfo="RKWard GUI to perform power analysis and sample size estimation." version="0.02-1" releasedate="2015-02-02" url="http://rkward.kde.org" license="GPL (>= 3)"> + <author given="Meik" family="Michalke" email="mei...@hh..." role="aut, cre" /> + <author given="Thomas" family="Friedrichsmeier" email="tho...@ru..." role="ctb" /> + </about> <logic> <convert id="pwr_lgc_power" sources="rad_pwr_param.string" mode="equals" standard="Power" /> <convert id="pwr_lgc_sample" sources="rad_pwr_param.string" mode="equals" standard="Sample size" /> diff --git a/rkward/plugins/rkwarddev_scripts/rkwarddev_power_plugin_script.R b/rkward/plugins/rkwarddev_scripts/rkwarddev_power_plugin_script.R index 0699c13..1b3c1f0 100644 --- a/rkward/plugins/rkwarddev_scripts/rkwarddev_power_plugin_script.R +++ b/rkward/plugins/rkwarddev_scripts/rkwarddev_power_plugin_script.R @@ -4,14 +4,12 @@ # *EXCEPT* for the last call, see below. require(rkwarddev) -rkwarddev.required("0.06-5") +rkwarddev.required("0.07-1") local({ # set the output directory to overwrite the actual plugin output.dir <- tempdir() overwrite <- TRUE -# if you set guess.getters to TRUE, the resulting code will need RKWard >= 0.6.0 -guess.getter <- FALSE about.info <- rk.XML.about( name="rk.power", @@ -20,10 +18,10 @@ about.info <- rk.XML.about( email="mei...@hh...", role=c("aut","cre")), person(given="Thomas", family="Friedrichsmeier", email="tho...@ru...", role=c("ctb"))), about=list(desc="RKWard GUI to perform power analysis and sample size estimation.", - version="0.01-3", url="http://rkward.kde.org") + version="0.02-1", url="http://rkward.kde.org") ) dependencies.info <- rk.XML.dependencies( - dependencies=list(rkward.min=ifelse(isTRUE(guess.getter), "0.6.0", "0.5.6"), + dependencies=list(rkward.min="0.6.3", package=list(c(name="pwr"))) ) @@ -356,7 +354,7 @@ pwr.js.calc <- rk.paste.JS( ite(id(pwr.parameter.rad, " != \"Effect size\""), ite(id(pwr.effect.etasq.rad, " == \"f\""), echo(",\n\t\t\tf=", pwr.input.effect), - echo(",\n\t\t\tf=sqrt(", pwr.input.effect,"/(1-", pwr.input.effect,")) # calculate f from eta squared") + rk.paste.JS (echo(",\n\t\t\tf=sqrt(", pwr.input.effect,"/(1-", pwr.input.effect,"))"), R.comment ("calculate f from eta squared")) ) ) ) @@ -461,47 +459,54 @@ pwr.js.calc <- rk.paste.JS( echo("\n\t\t)\n\t)\n\n") ) +helper.make.effect.size.legend <- function (indicator, small, medium, large) { + indicator <- dQuote (indicator) + rk.paste.JS (echo( + "\trk.print(", i18n ("Interpretation of effect size <strong>%1</strong> (according to Cohen):", indicator, context="Argument is name of statistic, e.g. 'r'"), ")\n", + "\trk.results(data.frame(", i18n ("small", context="effect size"), paste0 ("=", small, ", "), + i18n ("medium", context="effect size"), paste0 ("=", medium, ", "), + i18n ("large", context="effect size"), paste0 ("=", large, "))\n")) + ) +} + pwr.js.print <- rk.paste.JS( rk.JS.vars(list(pwr.stat.drop, pwr.parameter.rad)), + R.comment ("Catch errors due to unsuitable data"), echo( - "\t# Catch errors due to unsuitable data\n", "\tif(class(pwr.result) == \"try-error\"){\n", - "\t\trk.print(\"Power analysis not possible with the data you provided\")\n", - "\t\treturn()\n\t}\n\n", - "\t# Prepare printout\n", - "\tnote <- pwr.result[[\"note\"]]\n", - "\tparameters <- list(\"Target measure\"=\"", pwr.parameter.rad, "\")\n", - "\tif(!is.null(pwr.result[[\"alternative\"]])){\n\t\tparameters[[\"alternative\"]] <- pwr.result[[\"alternative\"]]\n\t}\n\n", + "\t\trk.print(", i18n ("Power analysis not possible with the data you provided"), ")\n", + "\t\treturn()\n\t}\n\n"), + R.comment ("Prepare printout"), + echo ("\tnote <- pwr.result[[\"note\"]]\n"), + id ("header = new Header ().addFromUI (\"", pwr.parameter.rad, "\");\n", js=FALSE), + echo ("\tparameters <- list("), + "echo (header.extractParameters ());", + echo (")\n", + "\tif(!is.null(pwr.result[[\"alternative\"]])){\n\t\tparameters[[", i18n ("alternative"), "]] <- pwr.result[[\"alternative\"]]\n\t}\n\n", "\trk.header(pwr.result[[\"method\"]], parameters=parameters)\n", "\tpwr.result[c(\"method\", \"note\", \"alternative\")] <- NULL\n", "\tpwr.result <- as.data.frame(unlist(pwr.result))\n", - "\tcolnames(pwr.result) <- \"Parameters\"\n\n", + "\tcolnames(pwr.result) <- ", i18n ("Parameters"), "\n\n", "\trk.results(pwr.result)\n", - "\tif(!is.null(note)){\n\t\trk.print(paste(\"<strong>Note:</strong> \", note))\n\t}\n\n" + "\tif(!is.null(note)){\n\t\trk.print(paste(", i18n ("<strong>Note:</strong>"), ", note))\n\t}\n\n" ), ite(id(pwr.stat.drop, " == \"pwr.t.test\" | ", pwr.stat.drop, " == \"pwr.norm.test\""), - echo("\trk.print(\"Interpretation of effect size <strong>d</strong> (according to Cohen):\")\n", - "\trk.results(data.frame(small=0.2, medium=0.5, large=0.8))\n") + helper.make.effect.size.legend ("d", "0.2", "0.5", "0.8") ), ite(id(pwr.stat.drop, " == \"pwr.r.test\""), - echo("\trk.print(\"Interpretation of effect size <strong>r</strong> (according to Cohen):\")\n", - "\trk.results(data.frame(small=0.1, medium=0.3, large=0.5))\n") + helper.make.effect.size.legend ("r", "0.1", "0.3", "0.5") ), ite(id(pwr.stat.drop, " == \"pwr.f2.test\""), - echo("\trk.print(\"Interpretation of effect size <strong>f<sup>2</sup></strong> (according to Cohen):\")\n", - "\trk.results(data.frame(small=0.02, medium=0.15, large=0.35))\n") + helper.make.effect.size.legend ("f<sup>2</sup>", "0.02", "0.15", "0.35") ), ite(id(pwr.stat.drop, " == \"pwr.anova.test\""), - echo("\trk.print(\"Interpretation of effect size <strong>f</strong> (according to Cohen):\")\n", - "\trk.results(data.frame(small=0.1, medium=0.25, large=0.4))\n") + helper.make.effect.size.legend ("f", "0.1", "0.25", "0.4") ), ite(id(pwr.stat.drop, " == \"pwr.chisq.test\""), - echo("\trk.print(\"Interpretation of effect size <strong>w</strong> (according to Cohen):\")\n", - "\trk.results(data.frame(small=0.1, medium=0.3, large=0.5))\n") + helper.make.effect.size.legend ("w", "0.1", "0.3", "0.5") ), ite(id(pwr.stat.drop, " == \"pwr.p.test\""), - echo("\trk.print(\"Interpretation of effect size <strong>h</strong> (according to Cohen):\")\n", - "\trk.results(data.frame(small=0.2, medium=0.5, large=0.8))\n") + helper.make.effect.size.legend ("h", "0.2", "0.5", "0.8") ) ) @@ -530,7 +535,7 @@ pwr.rkh.related <- rk.rkh.related(rk.rkh.link ("pwr", text="Description of the R pwr.plugin.dir <<- rk.plugin.skeleton( about.info, path=output.dir, - guess.getter=guess.getter, + guess.getter=TRUE, xml=list( dialog=pwr.full.dialog, logic=lgc.sect.pwr @@ -553,5 +558,6 @@ pwr.plugin.dir <<- rk.plugin.skeleton( # edit=TRUE, load=TRUE, # show=TRUE, - hints=FALSE) + hints=FALSE, + internal=TRUE) }) diff --git a/tests/analysis_plugins/power_analysis.rkcommands.R b/tests/analysis_plugins/power_analysis.rkcommands.R index 38c6113..4d5e4d5 100644 --- a/tests/analysis_plugins/power_analysis.rkcommands.R +++ b/tests/analysis_plugins/power_analysis.rkcommands.R @@ -18,7 +18,7 @@ require(pwr) # Prepare printout note <- pwr.result[["note"]] - parameters <- list("Target measure"="Power") + parameters <- list("Parameter to determine"="Power of test") if(!is.null(pwr.result[["alternative"]])){ parameters[["alternative"]] <- pwr.result[["alternative"]] } @@ -30,11 +30,11 @@ require(pwr) rk.results(pwr.result) if(!is.null(note)){ - rk.print(paste("<strong>Note:</strong> ", note)) + rk.print(paste("<strong>Note:</strong>", note)) } rk.print("Interpretation of effect size <strong>d</strong> (according to Cohen):") - rk.results(data.frame(small=0.2, medium=0.5, large=0.8)) + rk.results(data.frame("small"=0.2, "medium"=0.5, "large"=0.8)) }) local({ ## Prepare @@ -57,7 +57,7 @@ require(pwr) # Prepare printout note <- pwr.result[["note"]] - parameters <- list("Target measure"="Power") + parameters <- list("Parameter to determine"="Power of test") if(!is.null(pwr.result[["alternative"]])){ parameters[["alternative"]] <- pwr.result[["alternative"]] } @@ -69,11 +69,11 @@ require(pwr) rk.results(pwr.result) if(!is.null(note)){ - rk.print(paste("<strong>Note:</strong> ", note)) + rk.print(paste("<strong>Note:</strong>", note)) } rk.print("Interpretation of effect size <strong>d</strong> (according to Cohen):") - rk.results(data.frame(small=0.2, medium=0.5, large=0.8)) + rk.results(data.frame("small"=0.2, "medium"=0.5, "large"=0.8)) }) local({ ## Prepare @@ -95,7 +95,7 @@ require(pwr) # Prepare printout note <- pwr.result[["note"]] - parameters <- list("Target measure"="Sample size") + parameters <- list("Parameter to determine"="Sample size") if(!is.null(pwr.result[["alternative"]])){ parameters[["alternative"]] <- pwr.result[["alternative"]] } @@ -107,11 +107,11 @@ require(pwr) rk.results(pwr.result) if(!is.null(note)){ - rk.print(paste("<strong>Note:</strong> ", note)) + rk.print(paste("<strong>Note:</strong>", note)) } rk.print("Interpretation of effect size <strong>r</strong> (according to Cohen):") - rk.results(data.frame(small=0.1, medium=0.3, large=0.5)) + rk.results(data.frame("small"=0.1, "medium"=0.3, "large"=0.5)) }) local({ ## Prepare @@ -136,7 +136,7 @@ require(pwr) # Prepare printout note <- pwr.result[["note"]] - parameters <- list("Target measure"="Significance level") + parameters <- list("Parameter to determine"="Significance level") if(!is.null(pwr.result[["alternative"]])){ parameters[["alternative"]] <- pwr.result[["alternative"]] } @@ -148,11 +148,11 @@ require(pwr) rk.results(pwr.result) if(!is.null(note)){ - rk.print(paste("<strong>Note:</strong> ", note)) + rk.print(paste("<strong>Note:</strong>", note)) } rk.print("Interpretation of effect size <strong>w</strong> (according to Cohen):") - rk.results(data.frame(small=0.1, medium=0.3, large=0.5)) + rk.results(data.frame("small"=0.1, "medium"=0.3, "large"=0.5)) }) local({ ## Prepare @@ -177,7 +177,7 @@ require(pwr) # Prepare printout note <- pwr.result[["note"]] - parameters <- list("Target measure"="Significance level") + parameters <- list("Parameter to determine"="Significance level") if(!is.null(pwr.result[["alternative"]])){ parameters[["alternative"]] <- pwr.result[["alternative"]] } @@ -189,11 +189,11 @@ require(pwr) rk.results(pwr.result) if(!is.null(note)){ - rk.print(paste("<strong>Note:</strong> ", note)) + rk.print(paste("<strong>Note:</strong>", note)) } rk.print("Interpretation of effect size <strong>h</strong> (according to Cohen):") - rk.results(data.frame(small=0.2, medium=0.5, large=0.8)) + rk.results(data.frame("small"=0.2, "medium"=0.5, "large"=0.8)) }) local({ ## Prepare @@ -217,7 +217,7 @@ require(pwr) # Prepare printout note <- pwr.result[["note"]] - parameters <- list("Target measure"="Significance level") + parameters <- list("Parameter to determine"="Significance level") if(!is.null(pwr.result[["alternative"]])){ parameters[["alternative"]] <- pwr.result[["alternative"]] } @@ -229,11 +229,11 @@ require(pwr) rk.results(pwr.result) if(!is.null(note)){ - rk.print(paste("<strong>Note:</strong> ", note)) + rk.print(paste("<strong>Note:</strong>", note)) } rk.print("Interpretation of effect size <strong>d</strong> (according to Cohen):") - rk.results(data.frame(small=0.2, medium=0.5, large=0.8)) + rk.results(data.frame("small"=0.2, "medium"=0.5, "large"=0.8)) }) local({ ## Prepare @@ -257,7 +257,7 @@ require(pwr) # Prepare printout note <- pwr.result[["note"]] - parameters <- list("Target measure"="Parameter count") + parameters <- list("Parameter to determine"="Parameter count") if(!is.null(pwr.result[["alternative"]])){ parameters[["alternative"]] <- pwr.result[["alternative"]] } @@ -269,9 +269,9 @@ require(pwr) rk.results(pwr.result) if(!is.null(note)){ - rk.print(paste("<strong>Note:</strong> ", note)) + rk.print(paste("<strong>Note:</strong>", note)) } rk.print("Interpretation of effect size <strong>f<sup>2</sup></strong> (according to Cohen):") - rk.results(data.frame(small=0.02, medium=0.15, large=0.35)) + rk.results(data.frame("small"=0.02, "medium"=0.15, "large"=0.35)) }) diff --git a/tests/analysis_plugins/power_analysis.rkout b/tests/analysis_plugins/power_analysis.rkout index 6e9c2d8..5a772ba 100644 --- a/tests/analysis_plugins/power_analysis.rkout +++ b/tests/analysis_plugins/power_analysis.rkout @@ -1,6 +1,6 @@ <h1>Two-sample t test power calculation</h1> <h2>Parameters</h2> -<ul><li>Target measure: Power</li> +<ul><li>Parameter to determine: Power of test</li> <li>alternative: two.sided</li> </ul> DATE<br /> @@ -12,7 +12,7 @@ DATE<br /> <tr><td>power </td><td> 0.20785</td></tr> </table> -<p class='character'><strong>Note:</strong> n is number in *each* group</p> +<p class='character'><strong>Note:</strong> n is number in *each* group</p> <p class='character'>Interpretation of effect size <strong>d</strong> (according to Cohen):</p> <table border="1"> @@ -21,7 +21,7 @@ DATE<br /> </table> <h1>t test power calculation</h1> <h2>Parameters</h2> -<ul><li>Target measure: Power</li> +<ul><li>Parameter to determine: Power of test</li> <li>alternative: two.sided</li> </ul> DATE<br /> @@ -41,7 +41,7 @@ DATE<br /> </table> <h1>approximate correlation power calculation (arctangh transformation)</h1> <h2>Parameters</h2> -<ul><li>Target measure: Sample size</li> +<ul><li>Parameter to determine: Sample size</li> <li>alternative: two.sided</li> </ul> DATE<br /> @@ -60,7 +60,7 @@ DATE<br /> </table> <h1>Chi squared power calculation</h1> <h2>Parameters</h2> -<ul><li>Target measure: Significance level</li> +<ul><li>Parameter to determine: Significance level</li> </ul> DATE<br /> <table border="1"> @@ -72,7 +72,7 @@ DATE<br /> <tr><td>power </td><td> 0.81000</td></tr> </table> -<p class='character'><strong>Note:</strong> N is the number of observations</p> +<p class='character'><strong>Note:</strong> N is the number of observations</p> <p class='character'>Interpretation of effect size <strong>w</strong> (according to Cohen):</p> <table border="1"> @@ -81,7 +81,7 @@ DATE<br /> </table> <h1>Difference of proportion power calculation for binomial distribution (arcsine transformation)</h1> <h2>Parameters</h2> -<ul><li>Target measure: Significance level</li> +<ul><li>Parameter to determine: Significance level</li> <li>alternative: greater</li> </ul> DATE<br /> @@ -93,7 +93,7 @@ DATE<br /> <tr><td>power </td><td> 0.81000</td></tr> </table> -<p class='character'><strong>Note:</strong> same sample sizes</p> +<p class='character'><strong>Note:</strong> same sample sizes</p> <p class='character'>Interpretation of effect size <strong>h</strong> (according to Cohen):</p> <table border="1"> @@ -102,7 +102,7 @@ DATE<br /> </table> <h1>Mean power calculation for normal distribution with known variance</h1> <h2>Parameters</h2> -<ul><li>Target measure: Significance level</li> +<ul><li>Parameter to determine: Significance level</li> <li>alternative: two.sided</li> </ul> DATE<br /> @@ -121,7 +121,7 @@ DATE<br /> </table> <h1>Multiple regression power calculation</h1> <h2>Parameters</h2> -<ul><li>Target measure: Parameter count</li> +<ul><li>Parameter to determine: Parameter count</li> </ul> DATE<br /> <table border="1"> |
From: André M. A. <alv...@kd...> - 2015-02-01 21:30:46
|
Git commit 095abd746530f744445720a8481a56a8aeeb4dd1 by André Marcelo Alvarenga. Committed on 01/02/2015 at 21:30. Pushed by alvarenga into branch 'master'. Fix typo: tertachoric -> tetrachoric M +1 -1 rkward/plugins/analysis/irt/tests/ltm_unidimensional.js http://commits.kde.org/rkward/095abd746530f744445720a8481a56a8aeeb4dd1 diff --git a/rkward/plugins/analysis/irt/tests/ltm_unidimensional.js b/rkward/plugins/analysis/irt/tests/ltm_unidimensional.js index c168724..a200eec 100644 --- a/rkward/plugins/analysis/irt/tests/ltm_unidimensional.js +++ b/rkward/plugins/analysis/irt/tests/ltm_unidimensional.js @@ -20,7 +20,7 @@ function printout () { 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 (' + i18n ("Matrix of tertachoric correlations:") + ', level=4)\n'); + echo ('rk.header (' + i18n ("Matrix of tetrachoric correlations:") + ', level=4)\n'); echo ('rk.print (unidim.res$Rho)\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'); |
From: m.eik m. <mei...@un...> - 2015-02-01 21:13:23
|
Git commit 756b91884cd1a74eb51bc51eff70f2f689a2d589 by m.eik michalke. Committed on 01/02/2015 at 21:11. Pushed by meikm into branch 'master'. hijacking noquote() from R base to use it in i18n() M +15 -3 packages/rkwarddev/R/i18n.R M +12 -0 packages/rkwarddev/R/rk-internal.R M +6 -2 packages/rkwarddev/man/i18n.Rd http://commits.kde.org/rkward/756b91884cd1a74eb51bc51eff70f2f689a2d589 diff --git a/packages/rkwarddev/R/i18n.R b/packages/rkwarddev/R/i18n.R index 0d48d14..f5dfb0d 100644 --- a/packages/rkwarddev/R/i18n.R +++ b/packages/rkwarddev/R/i18n.R @@ -22,7 +22,8 @@ #' your JavaScript portions in R. Depending on the provided values for its arguments, #' will return one of \code{i18n()}, \code{i18nc()}, \code{i18np()}, or \code{i18ncp()}. #' -#' @param msgid Character string, the message to be translated (if applicable, its singular form). +#' @param msgid Either a character string, the message to be translated (if applicable, its singular form), +#' or an object of class \code{\link[noquote]{noquote}}, which will be pasted as a \code{noquote()} function call. #' @param ... Either character string which will be pasted unquoted to be used in conjunctions with #' placeholders in msgid, or XiMpLe.node objects of which the JavaScript variable name will be #' used. @@ -35,6 +36,8 @@ #' @examples #' i18n("Select data") #' i18n("Comparing a single pair", "n_pairs", plural="Comparing %1 distinct pairs") +#' +#' echo(i18n(noquote("A string I'll quote, later"))) i18n <- function(msgid, ..., context=NULL, plural=NULL, newline=""){ placeholders <- list(...) @@ -50,10 +53,13 @@ i18n <- function(msgid, ..., context=NULL, plural=NULL, newline=""){ pluralQuoted <- paste0(", ", qp(plural)) } else {} + # deal with noquoted strings, by "misusing" the noquote() function from R base + msgid.nq <- rk.noquote(msgid) + if(length(placeholders) > 0){ # do some sanitiy checks here -- is there a placeholder in the strings for each dots value? # grep valid placeholders out of the messages - msgCleaned <- gsub("([^%[:digit:]]{2,})", " ", paste(msgid, plural)) + msgCleaned <- gsub("([^%[:digit:]]{2,})", " ", paste(msgid.nq, plural)) msgSplit <- unique(unlist(strsplit(msgCleaned, "[[:space:]]+"))) msgPlHd <- msgSplit[grep("%[[:digit:]]", msgSplit)] # which placeholders are needed? @@ -69,11 +75,17 @@ i18n <- function(msgid, ..., context=NULL, plural=NULL, newline=""){ placeholderString <- paste0(", ", paste0(sapply(placeholders, function(ph){id(ph, js=TRUE)}), collapse=", ")) } else {} + if(identical(msgid, msgid.nq)){ + msgid.value <- qp(msgid) + } else { + # message is already quoted + msgid.value <- msgid.nq + } result <- new("rk.JS.i18n", value=paste0( JSfunction, "(", context, - qp(msgid), + msgid.value, pluralQuoted, placeholderString, ")", diff --git a/packages/rkwarddev/R/rk-internal.R b/packages/rkwarddev/R/rk-internal.R index e8499bd..2dfafd0 100644 --- a/packages/rkwarddev/R/rk-internal.R +++ b/packages/rkwarddev/R/rk-internal.R @@ -111,6 +111,18 @@ indent <- function(level, by="\t"){ } ## end function indent() +## function rk.noquote() +# use noquote() in a slightly different manner: +# if "text" is a noquote object, returns "noquote(\"text\")" +rk.noquote <- function(text){ + if(inherits(text, "noquote")){ + return(paste0("noquote(", qp(paste0(text)), ")")) + } else { + return(text) + } +} ## end function rk.noquote() + + ## function checkCreateFiles() # used by rk.plugin.skeleton() checkCreateFiles <- function(file.name, ow, action=NULL){ diff --git a/packages/rkwarddev/man/i18n.Rd b/packages/rkwarddev/man/i18n.Rd index 4c68a1a..d5d2ab0 100644 --- a/packages/rkwarddev/man/i18n.Rd +++ b/packages/rkwarddev/man/i18n.Rd @@ -7,8 +7,10 @@ i18n(msgid, ..., context = NULL, plural = NULL, newline = "") } \arguments{ -\item{msgid}{Character string, the message to be translated (if applicable, - its singular form).} +\item{msgid}{Either a character string, the message to be translated (if applicable, + its singular form), +or an object of class \code{\link[noquote]{noquote}}, + which will be pasted as a \code{noquote()} function call.} \item{...}{Either character string which will be pasted unquoted to be used in conjunctions with placeholders in msgid, @@ -34,5 +36,7 @@ will return one of \code{i18n()}, \code{i18nc()}, \code{i18np()}, or \code{i18nc \examples{ i18n("Select data") i18n("Comparing a single pair", "n_pairs", plural="Comparing \%1 distinct pairs") + +echo(i18n(noquote("A string I'll quote, later"))) } |
From: m.eik m. <mei...@un...> - 2015-02-01 20:36:03
|
Git commit d19e381f1e17201c545ee0a1550e16e08a29cf0a by m.eik michalke. Committed on 01/02/2015 at 20:35. Pushed by meikm into branch 'master'. fixed a regex issue in i18n(), looking for placeholders M +2 -1 packages/rkwarddev/R/i18n.R http://commits.kde.org/rkward/d19e381f1e17201c545ee0a1550e16e08a29cf0a diff --git a/packages/rkwarddev/R/i18n.R b/packages/rkwarddev/R/i18n.R index 47ea15e..0d48d14 100644 --- a/packages/rkwarddev/R/i18n.R +++ b/packages/rkwarddev/R/i18n.R @@ -53,7 +53,8 @@ i18n <- function(msgid, ..., context=NULL, plural=NULL, newline=""){ if(length(placeholders) > 0){ # do some sanitiy checks here -- is there a placeholder in the strings for each dots value? # grep valid placeholders out of the messages - msgSplit <- unique(unlist(strsplit(paste(msgid, plural), "[[:space:]]+"))) + msgCleaned <- gsub("([^%[:digit:]]{2,})", " ", paste(msgid, plural)) + msgSplit <- unique(unlist(strsplit(msgCleaned, "[[:space:]]+"))) msgPlHd <- msgSplit[grep("%[[:digit:]]", msgSplit)] # which placeholders are needed? plHdNeeded <- paste0("%", 1:length(placeholders)) |
From: Yuri C. <yu...@uk...> - 2015-02-01 18:02:13
|
Git commit 832439cd509a296c2941b0f8c2815410b66d4b7f by Yuri Chornoivan. Committed on 01/02/2015 at 18:01. Pushed by yurchor into branch 'master'. Fix various minor typos M +1 -1 rkward/plugins/distributions/dist_help_snippets.xml M +1 -1 rkward/plugins/distributions/negative_binomial.xml M +1 -1 rkward/plugins/distributions/poisson.rkh M +1 -1 rkward/plugins/distributions/poisson.xml M +1 -1 rkward/plugins/distributions/wilcoxon.js http://commits.kde.org/rkward/832439cd509a296c2941b0f8c2815410b66d4b7f diff --git a/rkward/plugins/distributions/dist_help_snippets.xml b/rkward/plugins/distributions/dist_help_snippets.xml index 59e5f8c..b630e3e 100644 --- a/rkward/plugins/distributions/dist_help_snippets.xml +++ b/rkward/plugins/distributions/dist_help_snippets.xml @@ -3,7 +3,7 @@ <caption title="Generic settings"/> <setting id="mode">Specify the quantity to be calculated (probabilities, densities, or quantiles), and the quantity given (probabilities or quantiles)</setting> <setting id="q">When calculating densities or probabilities, specify one or more quantiles. If this setting is left empty, a sequence of evenly spaced quantiles will be used, instead.</setting> - <setting id="p">When calculating quantiles, specify one or more probabilities, optionally logarithmic (see below). If this setting is left empty, a sequence sequence of evenly spaced (log) probabilities will be used, instead.</setting> + <setting id="p">When calculating quantiles, specify one or more probabilities, optionally logarithmic (see below). If this setting is left empty, a sequence of evenly spaced (log) probabilities will be used, instead.</setting> <setting id="logp">When calculating probabilities, return these as log (p). When specifying probabilities, these are supplied as log (p).</setting> <setting id="logd">When calculating densities, return these as log (d).</setting> <setting id="lower">If checked (the default) probabilities are P[X ≤ x]. Otherwise (upper tail) probabilities are P[X > x]</setting> diff --git a/rkward/plugins/distributions/negative_binomial.xml b/rkward/plugins/distributions/negative_binomial.xml index 27c564b..fd98a51 100755 --- a/rkward/plugins/distributions/negative_binomial.xml +++ b/rkward/plugins/distributions/negative_binomial.xml @@ -5,7 +5,7 @@ <logic> <insert snippet="dialog_logic"/> <script><![CDATA[ - gui.setValue ("ui_note.text", i18n (noquote ("Quantiles represents the number of failures in a sequence of Bernoulli trials before the target number of successes is reached."))); + gui.setValue ("ui_note.text", i18n (noquote ("Quantiles represent the number of failures in a sequence of Bernoulli trials before the target number of successes is reached."))); ]]></script> </logic> <snippets> diff --git a/rkward/plugins/distributions/poisson.rkh b/rkward/plugins/distributions/poisson.rkh index 9ebaa33..d969bf7 100644 --- a/rkward/plugins/distributions/poisson.rkh +++ b/rkward/plugins/distributions/poisson.rkh @@ -6,7 +6,7 @@ <summary> Provides a calculator for probabilities, quantiles, and densities in the Poisson distribution. - Quantiles represents the number of events observed in a specified region (e.g. a fixed number of trials, or a fixed period of time), where λ (lambda) is the expected (mean) number of such events. + Quantiles represent the number of events observed in a specified region (e.g. a fixed number of trials, or a fixed period of time), where λ (lambda) is the expected (mean) number of such events. </summary> <insert snippet="dialog_usage"/> <settings> diff --git a/rkward/plugins/distributions/poisson.xml b/rkward/plugins/distributions/poisson.xml index f7e31d1..ded2cc8 100644 --- a/rkward/plugins/distributions/poisson.xml +++ b/rkward/plugins/distributions/poisson.xml @@ -5,7 +5,7 @@ <logic> <insert snippet="dialog_logic"/> <script><![CDATA[ - gui.setValue ("ui_note.text", i18n (noquote ("Quantiles represents the number of events observed in a specified region (e.g. a fixed number of trials, or a fixed period of time), where λ (lambda) is the expected (mean) number of such events."))); + gui.setValue ("ui_note.text", i18n (noquote ("Quantiles represent the number of events observed in a specified region (e.g. a fixed number of trials, or a fixed period of time), where λ (lambda) is the expected (mean) number of such events."))); ]]></script> </logic> <snippets> diff --git a/rkward/plugins/distributions/wilcoxon.js b/rkward/plugins/distributions/wilcoxon.js index 6dbaba7..0193cd4 100755 --- a/rkward/plugins/distributions/wilcoxon.js +++ b/rkward/plugins/distributions/wilcoxon.js @@ -3,5 +3,5 @@ include ("dist_common.js"); function getDistSpecifics () { var m = Number (getString ("m")); var n = Number (getString ("n")); - return initDistSpecifics (i18n ('Wilcox Rank Sum distribution'), 'wilcox', ["m", "n"], [0, m*n], discrete); + return initDistSpecifics (i18n ('Wilcoxon Rank Sum distribution'), 'wilcox', ["m", "n"], [0, m*n], discrete); } |
From: m.eik m. <mei...@un...> - 2015-02-01 17:56:14
|
Git commit 46cb981dd79b5591a60f65de60c2746b6000baec by m.eik michalke. Committed on 01/02/2015 at 17:52. Pushed by meikm into branch 'master'. added missing support and documentation for i18n comments to several XML functions M +4 -0 packages/rkwarddev/ChangeLog M +2 -0 packages/rkwarddev/DESCRIPTION M +2 -0 packages/rkwarddev/NAMESPACE M +1 -1 packages/rkwarddev/R/50_all.valid.children.R M +3 -3 packages/rkwarddev/R/50_all.valid.modifiers.R M +3 -3 packages/rkwarddev/R/rk.XML.attribute.R M +4 -5 packages/rkwarddev/R/rk.XML.browser.R M +5 -6 packages/rkwarddev/R/rk.XML.cbox.R M +8 -5 packages/rkwarddev/R/rk.XML.component.R M +9 -9 packages/rkwarddev/R/rk.XML.dialog.R M +10 -10 packages/rkwarddev/R/rk.XML.dropdown.R M +5 -6 packages/rkwarddev/R/rk.XML.embed.R M +10 -10 packages/rkwarddev/R/rk.XML.frame.R M +8 -5 packages/rkwarddev/R/rk.XML.input.R M +8 -5 packages/rkwarddev/R/rk.XML.matrix.R M +8 -8 packages/rkwarddev/R/rk.XML.menu.R M +9 -6 packages/rkwarddev/R/rk.XML.option.R M +8 -6 packages/rkwarddev/R/rk.XML.optioncolumn.R M +8 -5 packages/rkwarddev/R/rk.XML.plugin.R M +8 -5 packages/rkwarddev/R/rk.XML.preview.R M +10 -10 packages/rkwarddev/R/rk.XML.radio.R M +8 -5 packages/rkwarddev/R/rk.XML.saveobj.R M +9 -9 packages/rkwarddev/R/rk.XML.select.R M +8 -5 packages/rkwarddev/R/rk.XML.spinbox.R M +9 -9 packages/rkwarddev/R/rk.XML.tabbook.R M +13 -10 packages/rkwarddev/R/rk.XML.text.R M +7 -7 packages/rkwarddev/R/rk.XML.valueselector.R M +9 -6 packages/rkwarddev/R/rk.XML.valueslot.R M +8 -5 packages/rkwarddev/R/rk.XML.varselector.R M +9 -6 packages/rkwarddev/R/rk.XML.varslot.R M +8 -8 packages/rkwarddev/R/rk.XML.wizard.R M +7 -5 packages/rkwarddev/R/rk.rkh.caption.R M +7 -4 packages/rkwarddev/R/rk.rkh.link.R M +7 -4 packages/rkwarddev/R/rk.rkh.related.R M +8 -5 packages/rkwarddev/R/rk.rkh.section.R M +8 -5 packages/rkwarddev/R/rk.rkh.setting.R M +7 -4 packages/rkwarddev/R/rk.rkh.summary.R M +7 -4 packages/rkwarddev/R/rk.rkh.technical.R M +7 -4 packages/rkwarddev/R/rk.rkh.title.R M +7 -4 packages/rkwarddev/R/rk.rkh.usage.R M +3 -0 packages/rkwarddev/inst/NEWS.Rd M +- -- packages/rkwarddev/inst/doc/rkwarddev_vignette.pdf M +3 -2 packages/rkwarddev/man/rk.XML.attribute.Rd M +4 -5 packages/rkwarddev/man/rk.XML.browser.Rd M +4 -5 packages/rkwarddev/man/rk.XML.cbox.Rd M +4 -5 packages/rkwarddev/man/rk.XML.component.Rd M +4 -5 packages/rkwarddev/man/rk.XML.dialog.Rd M +4 -5 packages/rkwarddev/man/rk.XML.dropdown.Rd M +4 -5 packages/rkwarddev/man/rk.XML.embed.Rd M +4 -5 packages/rkwarddev/man/rk.XML.frame.Rd M +4 -5 packages/rkwarddev/man/rk.XML.input.Rd M +4 -5 packages/rkwarddev/man/rk.XML.matrix.Rd M +4 -5 packages/rkwarddev/man/rk.XML.menu.Rd M +4 -5 packages/rkwarddev/man/rk.XML.option.Rd M +4 -5 packages/rkwarddev/man/rk.XML.optioncolumn.Rd M +4 -5 packages/rkwarddev/man/rk.XML.plugin.Rd M +4 -5 packages/rkwarddev/man/rk.XML.preview.Rd M +4 -5 packages/rkwarddev/man/rk.XML.radio.Rd M +4 -5 packages/rkwarddev/man/rk.XML.saveobj.Rd M +4 -5 packages/rkwarddev/man/rk.XML.select.Rd M +4 -5 packages/rkwarddev/man/rk.XML.spinbox.Rd M +4 -5 packages/rkwarddev/man/rk.XML.tabbook.Rd M +4 -5 packages/rkwarddev/man/rk.XML.text.Rd M +4 -5 packages/rkwarddev/man/rk.XML.valueselector.Rd M +4 -5 packages/rkwarddev/man/rk.XML.valueslot.Rd M +4 -5 packages/rkwarddev/man/rk.XML.varselector.Rd M +4 -5 packages/rkwarddev/man/rk.XML.varslot.Rd M +4 -5 packages/rkwarddev/man/rk.XML.wizard.Rd M +2 -5 packages/rkwarddev/man/rk.rkh.caption.Rd M +2 -3 packages/rkwarddev/man/rk.rkh.link.Rd M +2 -3 packages/rkwarddev/man/rk.rkh.related.Rd M +4 -5 packages/rkwarddev/man/rk.rkh.section.Rd M +4 -5 packages/rkwarddev/man/rk.rkh.setting.Rd M +2 -3 packages/rkwarddev/man/rk.rkh.summary.Rd M +2 -3 packages/rkwarddev/man/rk.rkh.technical.Rd M +2 -3 packages/rkwarddev/man/rk.rkh.title.Rd M +2 -3 packages/rkwarddev/man/rk.rkh.usage.Rd http://commits.kde.org/rkward/46cb981dd79b5591a60f65de60c2746b6000baec diff --git a/packages/rkwarddev/ChangeLog b/packages/rkwarddev/ChangeLog index 0271963..78564bf 100644 --- a/packages/rkwarddev/ChangeLog +++ b/packages/rkwarddev/ChangeLog @@ -47,6 +47,10 @@ added: "var" should be used or omitted for rk.JS.var objects - rk.XML.matrix() now also accepts the arguments "min_rows" and "min_columns" + - <dropdown>, <radio> and <select> have gained "string.quoted" as + a valid property/modifier + - new function rk.XML.i18n() to define translatable labels in logic sections + - new function rk.rkh.label() for extracting labels from plugin elements changed: - function i18n() was changed to be used in JavaScript generation only; this breaks code using the function introduced with 0.06-4, but that was to diff --git a/packages/rkwarddev/DESCRIPTION b/packages/rkwarddev/DESCRIPTION index 2b9d265..e40d666 100644 --- a/packages/rkwarddev/DESCRIPTION +++ b/packages/rkwarddev/DESCRIPTION @@ -69,6 +69,7 @@ Collate: 'rk.XML.frame.R' 'rk.XML.help.R' 'rk.XML.hierarchy.R' + 'rk.XML.i18n.R' 'rk.XML.include.R' 'rk.XML.input.R' 'rk.XML.insert.R' @@ -112,6 +113,7 @@ Collate: 'rk.plugin.component.R' 'rk.plugin.skeleton.R' 'rk.rkh.caption.R' + 'rk.rkh.label.R' 'rk.rkh.link.R' 'rk.rkh.related.R' 'rk.rkh.scan.R' diff --git a/packages/rkwarddev/NAMESPACE b/packages/rkwarddev/NAMESPACE index 2857174..d528f59 100644 --- a/packages/rkwarddev/NAMESPACE +++ b/packages/rkwarddev/NAMESPACE @@ -39,6 +39,7 @@ export(rk.XML.formula) export(rk.XML.frame) export(rk.XML.help) export(rk.XML.hierarchy) +export(rk.XML.i18n) export(rk.XML.include) export(rk.XML.input) export(rk.XML.insert) @@ -85,6 +86,7 @@ export(rk.plugin.component) export(rk.plugin.skeleton) export(rk.rkh.caption) export(rk.rkh.doc) +export(rk.rkh.label) export(rk.rkh.link) export(rk.rkh.related) export(rk.rkh.scan) diff --git a/packages/rkwarddev/R/50_all.valid.children.R b/packages/rkwarddev/R/50_all.valid.children.R index 03ebc98..c67edce 100644 --- a/packages/rkwarddev/R/50_all.valid.children.R +++ b/packages/rkwarddev/R/50_all.valid.children.R @@ -16,7 +16,7 @@ all.valid.children <- list( "text", "valueselector", "valueslot", "varselector", "varslot", "!--"), dropdown=c("option", "!--"), hierarchy=c("menu", "!--"), - logic=c("connect", "convert", "dependency_check", "external", "include", "insert", + logic=c("connect", "convert", "dependency_check", "external", "i18n", "include", "insert", "script", "set", "switch", "!--"), menu=c("entry", "menu", "!--"), optionset=c("content", "logic", "optioncolumn", "!--"), diff --git a/packages/rkwarddev/R/50_all.valid.modifiers.R b/packages/rkwarddev/R/50_all.valid.modifiers.R index acccea6..29b8d19 100644 --- a/packages/rkwarddev/R/50_all.valid.modifiers.R +++ b/packages/rkwarddev/R/50_all.valid.modifiers.R @@ -5,7 +5,7 @@ all.valid.modifiers <- list( "required", "true", "false", "not", "numeric", "preprocess", "calculate", "printout", "preview"), browser=c("selection"), checkbox=c("state", "state.not", "state.numeric"), - dropdown=c("string", "number"), + dropdown=c("string", "string.quoted", "number"), # removed embed, can be all sorts of stuff, see e.g. generic plot options # embed=c("code"), # for the same reason external is not listed here @@ -16,9 +16,9 @@ all.valid.modifiers <- list( option=c("enabled"), optionset=c("row_count", "current_row", "optioncolumn_ids"), preview=c("state", "state.not", "state.numeric"), - radio=c("string", "number"), + radio=c("string", "string.quoted", "number"), saveobject=c("selection", "parent", "objectname", "active"), - select=c("string", "number"), + select=c("string", "string.quoted", "number"), spinbox=c("int", "real"), text=c("text"), valueselector=c("available", "selected", "root"), diff --git a/packages/rkwarddev/R/rk.XML.attribute.R b/packages/rkwarddev/R/rk.XML.attribute.R index ef67399..0b5ec1e 100644 --- a/packages/rkwarddev/R/rk.XML.attribute.R +++ b/packages/rkwarddev/R/rk.XML.attribute.R @@ -25,8 +25,8 @@ #' or an object of class \code{XiMpLe.node} (whose \code{id} will be extracted and used). #' @param value Character string, new value for the attribute. #' @param label Character string, label associated with the attribute. -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} information for this node. If set to \code{FALSE}, +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. If set to \code{FALSE}, #' the attribute \code{label} will be renamed into \code{noi18n_label}. #' @return An object of class \code{XiMpLe.node}. #' @export @@ -57,7 +57,7 @@ rk.XML.attribute <- function(id, value=NULL, label=NULL, i18n=NULL){ # check for additional i18n info; if FALSE, "label" will be renamed to "noi18n_label" attr.list <- check.i18n(i18n=i18n, attrs=attr.list) - node <- XMLNode("attribute", attrs=attr.list) + node <- check.i18n(i18n=i18n, node=XMLNode("attribute", attrs=attr.list), comment=TRUE) return(node) } diff --git a/packages/rkwarddev/R/rk.XML.browser.R b/packages/rkwarddev/R/rk.XML.browser.R index f6b525b..904d355 100644 --- a/packages/rkwarddev/R/rk.XML.browser.R +++ b/packages/rkwarddev/R/rk.XML.browser.R @@ -33,10 +33,9 @@ #' @param component Character string, name of the component this node belongs to. Only needed if you #' want to use the scan features for automatic help file generation; needs \code{help} to be set #' accordingly, too! -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. If set to \code{FALSE}, the attribute \code{label} will be renamed into -#' \code{noi18n_label}. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. If set to \code{FALSE}, +#' the attribute \code{label} will be renamed into \code{noi18n_label}. #' @return An object of class \code{XiMpLe.node}. #' @export #' @seealso \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard} @@ -76,7 +75,7 @@ rk.XML.browser <- function(label, type="file", initial=NULL, urls=FALSE, filter= # check for additional i18n info; if FALSE, "label" will be renamed to "noi18n_label" attr.list <- check.i18n(i18n=i18n, attrs=attr.list) - node <- XMLNode("browser", attrs=attr.list) + node <- check.i18n(i18n=i18n, node=XMLNode("browser", attrs=attr.list), comment=TRUE) # check for .rkh content rk.set.rkh.prompter(component=component, id=attr.list[["id"]], help=help) diff --git a/packages/rkwarddev/R/rk.XML.cbox.R b/packages/rkwarddev/R/rk.XML.cbox.R index d6ea644..db570dd 100644 --- a/packages/rkwarddev/R/rk.XML.cbox.R +++ b/packages/rkwarddev/R/rk.XML.cbox.R @@ -30,10 +30,9 @@ #' @param component Character string, name of the component this node belongs to. Only needed if you #' want to use the scan features for automatic help file generation; needs \code{help} to be set #' accordingly, too! -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. If set to \code{FALSE}, the attribute \code{label} will be renamed into -#' \code{noi18n_label}. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. If set to \code{FALSE}, +#' the attribute \code{label} will be renamed into \code{noi18n_label}. #' @return An object of class \code{XiMpLe.node}. #' @note There's also a simple wrapper function \code{rk.XML.checkbox}. #' @export @@ -64,12 +63,12 @@ rk.XML.cbox <- function(label, value="true", un.value=NULL, chk=FALSE, id.name=" # check for additional i18n info; if FALSE, "label" will be renamed to "noi18n_label" attr.list <- check.i18n(i18n=i18n, attrs=attr.list) - checkbox <- check.i18n(i18n=i18n, node=XMLNode("checkbox", attrs=attr.list), comment=TRUE) + node <- check.i18n(i18n=i18n, node=XMLNode("checkbox", attrs=attr.list), comment=TRUE) # check for .rkh content rk.set.rkh.prompter(component=component, id=id, help=help) - return(checkbox) + return(node) } ## wrapper for name scheme consistency diff --git a/packages/rkwarddev/R/rk.XML.component.R b/packages/rkwarddev/R/rk.XML.component.R index f9ad4ad..5924673 100644 --- a/packages/rkwarddev/R/rk.XML.component.R +++ b/packages/rkwarddev/R/rk.XML.component.R @@ -28,10 +28,9 @@ #' just implemented for completeness. #' @param dependencies An object of class \code{XiMpLe.node} to define \code{<dependencies>} for this component. #' See \code{\link[rkwarddev:rk.XML.dependencies]{rk.XML.dependencies}} for details. Skipped if \code{NULL}. -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. If set to \code{FALSE}, the attribute \code{label} will be renamed into -#' \code{noi18n_label}. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. If set to \code{FALSE}, +#' the attribute \code{label} will be renamed into \code{noi18n_label}. #' @return An object of class \code{XiMpLe.node}. #' @export #' @seealso @@ -72,7 +71,11 @@ rk.XML.component <- function(label, file, id.name="auto", type="standard", depen # check for additional i18n info; if FALSE, "label" will be renamed to "noi18n_label" attr.list <- check.i18n(i18n=i18n, attrs=attr.list) - node <- XMLNode("component", attrs=attr.list, .children=dependencies) + node <- check.i18n( + i18n=i18n, + node=XMLNode("component", attrs=attr.list, .children=dependencies), + comment=TRUE + ) return(node) } diff --git a/packages/rkwarddev/R/rk.XML.dialog.R b/packages/rkwarddev/R/rk.XML.dialog.R index 1b099cc..d842b84 100644 --- a/packages/rkwarddev/R/rk.XML.dialog.R +++ b/packages/rkwarddev/R/rk.XML.dialog.R @@ -28,10 +28,9 @@ #' @param recommended Logical, whether the dialog should be the recommended interface (unless the user has configured #' RKWard to default to a specific interface). This attribute currently has no effect, as it is implicitly "true", #' unless the wizard is recommended. -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. If set to \code{FALSE}, the attribute \code{label} will be renamed into -#' \code{noi18n_label}. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. If set to \code{FALSE}, +#' the attribute \code{label} will be renamed into \code{noi18n_label}. #' @return An object of class \code{XiMpLe.node}. #' @export #' @seealso @@ -64,11 +63,12 @@ rk.XML.dialog <- function(..., label=NULL, recommended=FALSE, i18n=NULL){ # check for additional i18n info; if FALSE, "label" will be renamed to "noi18n_label" attr.list <- check.i18n(i18n=i18n, attrs=attr.list) - - node <- XMLNode("dialog", - attrs=attr.list, - .children=child.list(nodes, empty=FALSE) - ) + + node <- check.i18n( + i18n=i18n, + node=XMLNode("dialog", attrs=attr.list, .children=child.list(nodes, empty=FALSE)), + comment=TRUE + ) return(node) } diff --git a/packages/rkwarddev/R/rk.XML.dropdown.R b/packages/rkwarddev/R/rk.XML.dropdown.R index 6856269..04a7fe5 100644 --- a/packages/rkwarddev/R/rk.XML.dropdown.R +++ b/packages/rkwarddev/R/rk.XML.dropdown.R @@ -32,10 +32,9 @@ #' @param component Character string, name of the component this node belongs to. Only needed if you #' want to use the scan features for automatic help file generation; needs \code{help} to be set #' accordingly, too! -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. If set to \code{FALSE}, the attribute \code{label} will be renamed into -#' \code{noi18n_label}. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. If set to \code{FALSE}, +#' the attribute \code{label} will be renamed into \code{noi18n_label}. #' @return An object of class \code{XiMpLe.node}. #' @seealso \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard} #' @export @@ -59,14 +58,15 @@ rk.XML.dropdown <- function(label, options=list(label=c(val="", chk=FALSE, i18n= # check for additional i18n info; if FALSE, "label" will be renamed to "noi18n_label" attr.list <- check.i18n(i18n=i18n, attrs=attr.list) - - dropdown <- XMLNode("dropdown", - attrs=attr.list, - .children=child.list(dd.options, empty=FALSE) - ) + + node <- check.i18n( + i18n=i18n, + node=XMLNode("dropdown", attrs=attr.list, .children=child.list(dd.options, empty=FALSE)), + comment=TRUE + ) # check for .rkh content rk.set.rkh.prompter(component=component, id=id, help=help) - return(dropdown) + return(node) } diff --git a/packages/rkwarddev/R/rk.XML.embed.R b/packages/rkwarddev/R/rk.XML.embed.R index 48afeed..b884029 100644 --- a/packages/rkwarddev/R/rk.XML.embed.R +++ b/packages/rkwarddev/R/rk.XML.embed.R @@ -23,10 +23,9 @@ #' @param label A character string, text label for the button (only used if \code{button=TRUE}). #' @param id.name Character string, a unique ID for this plugin element. #' If \code{"auto"}, an ID will be generated automatically from the label and component strings. -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. If set to \code{FALSE}, the attribute \code{label} will be renamed into -#' \code{noi18n_label}. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. If set to \code{FALSE}, +#' the attribute \code{label} will be renamed into \code{noi18n_label}. #' @return An object of class \code{XiMpLe.node}. #' @export #' @seealso \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard} @@ -53,8 +52,8 @@ rk.XML.embed <- function(component, button=FALSE, label="Options", id.name="auto # check for additional i18n info; if FALSE, "label" will be renamed to "noi18n_label" attr.list <- check.i18n(i18n=i18n, attrs=attr.list) - - node <- XMLNode("embed", attrs=attr.list) + + node <- check.i18n(i18n=i18n, node=XMLNode("embed", attrs=attr.list), comment=TRUE) return(node) } diff --git a/packages/rkwarddev/R/rk.XML.frame.R b/packages/rkwarddev/R/rk.XML.frame.R index 92c1d47..8679b6c 100644 --- a/packages/rkwarddev/R/rk.XML.frame.R +++ b/packages/rkwarddev/R/rk.XML.frame.R @@ -26,10 +26,9 @@ #' If \code{"auto"} and a label was provided, an ID will be generated automatically from the label #' if presen, otherwise from the objects in the frame. #' If \code{NULL}, no ID will be given. -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. If set to \code{FALSE}, the attribute \code{label} will be renamed into -#' \code{noi18n_label}. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. If set to \code{FALSE}, +#' the attribute \code{label} will be renamed into \code{noi18n_label}. #' @return An object of class \code{XiMpLe.node}. #' @seealso #' \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard} @@ -69,11 +68,12 @@ rk.XML.frame <- function(..., label=NULL, checkable=FALSE, chk=TRUE, id.name="au # check for additional i18n info; if FALSE, "label" will be renamed to "noi18n_label" attr.list <- check.i18n(i18n=i18n, attrs=attr.list) + + node <- check.i18n( + i18n=i18n, + node=XMLNode("frame", attrs=attr.list, .children=child.list(nodes, empty=FALSE)), + comment=TRUE + ) - frame <- XMLNode("frame", - attrs=attr.list, - .children=child.list(nodes, empty=FALSE) - ) - - return(frame) + return(node) } diff --git a/packages/rkwarddev/R/rk.XML.input.R b/packages/rkwarddev/R/rk.XML.input.R index 84dc410..69cb8dc 100644 --- a/packages/rkwarddev/R/rk.XML.input.R +++ b/packages/rkwarddev/R/rk.XML.input.R @@ -30,10 +30,9 @@ #' @param component Character string, name of the component this node belongs to. Only needed if you #' want to use the scan features for automatic help file generation; needs \code{help} to be set #' accordingly, too! -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. If set to \code{FALSE}, the attribute \code{label} will be renamed into -#' \code{noi18n_label}. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. If set to \code{FALSE}, +#' the attribute \code{label} will be renamed into \code{noi18n_label}. #' @return An object of class \code{XiMpLe.node}. #' @seealso #' \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard} @@ -69,7 +68,11 @@ rk.XML.input <- function(label, initial=NULL, size="medium", required=FALSE, id. # check for additional i18n info; if FALSE, "label" will be renamed to "noi18n_label" attr.list <- check.i18n(i18n=i18n, attrs=attr.list) - node <- XMLNode("input", attrs=attr.list) + node <- check.i18n( + i18n=i18n, + node=XMLNode("input", attrs=attr.list), + comment=TRUE + ) # check for .rkh content rk.set.rkh.prompter(component=component, id=attr.list[["id"]], help=help) diff --git a/packages/rkwarddev/R/rk.XML.matrix.R b/packages/rkwarddev/R/rk.XML.matrix.R index f5ee008..6d7d015 100644 --- a/packages/rkwarddev/R/rk.XML.matrix.R +++ b/packages/rkwarddev/R/rk.XML.matrix.R @@ -54,10 +54,9 @@ #' @param component Character string, name of the component this node belongs to. Only needed if you #' want to use the scan features for automatic help file generation; needs \code{help} to be set #' accordingly, too! -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. If set to \code{FALSE}, the attribute \code{label} will be renamed into -#' \code{noi18n_label}. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. If set to \code{FALSE}, +#' the attribute \code{label} will be renamed into \code{noi18n_label}. #' @return An object of class \code{XiMpLe.node}. #' @export #' @seealso @@ -144,7 +143,11 @@ rk.XML.matrix <- function(label, mode="real", rows=2, columns=2, min=NULL, max=N # check for additional i18n info; if FALSE, "label" will be renamed to "noi18n_label" attr.list <- check.i18n(i18n=i18n, attrs=attr.list) - node <- XMLNode("matrix", attrs=attr.list) + node <- check.i18n( + i18n=i18n, + node=XMLNode("matrix", attrs=attr.list), + comment=TRUE + ) # check for .rkh content rk.set.rkh.prompter(component=component, id=attr.list[["id"]], help=help) diff --git a/packages/rkwarddev/R/rk.XML.menu.R b/packages/rkwarddev/R/rk.XML.menu.R index f6a70e3..bbaed14 100644 --- a/packages/rkwarddev/R/rk.XML.menu.R +++ b/packages/rkwarddev/R/rk.XML.menu.R @@ -32,10 +32,9 @@ #' If \code{"auto"}, an ID will be generated automatically from the label. Otherwise, if \code{...} is a list, #' \code{id.name} must have the same length and will be set in the same order to the menu levels. #' Used to place the menu in the global menu hierarchy. -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. If set to \code{FALSE}, the attribute \code{label} will be renamed into -#' \code{noi18n_label}. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. If set to \code{FALSE}, +#' the attribute \code{label} will be renamed into \code{noi18n_label}. #' @return An object of class \code{XiMpLe.node}. #' @export #' @seealso @@ -124,10 +123,11 @@ rk.XML.menu <- function(label, ..., index=-1, id.name="auto", i18n=NULL){ # check for additional i18n info; if FALSE, "label" will be renamed to "noi18n_label" attr.list <- check.i18n(i18n=i18n, attrs=attr.list) - node <- XMLNode("menu", - attrs=attr.list, - .children=child.list(nodes) - ) + node <- check.i18n( + i18n=i18n, + node=XMLNode("menu", attrs=attr.list, .children=child.list(nodes)), + comment=TRUE + ) return(node) } diff --git a/packages/rkwarddev/R/rk.XML.option.R b/packages/rkwarddev/R/rk.XML.option.R index 5a2c2e5..f4c1070 100644 --- a/packages/rkwarddev/R/rk.XML.option.R +++ b/packages/rkwarddev/R/rk.XML.option.R @@ -35,10 +35,9 @@ #' @param chk Logical, should be set \code{TRUE} in the one option which is checked by default. #' @param id.name Character string, a unique ID for this plugin element. #' If \code{"auto"} and a label was provided, an ID will be generated automatically from the label. -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. If set to \code{FALSE}, the attribute \code{label} will be renamed into -#' \code{noi18n_label}. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. If set to \code{FALSE}, +#' the attribute \code{label} will be renamed into \code{noi18n_label}. #' @return An object of class \code{XiMpLe.node}. #' @export #' @seealso \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard} @@ -66,7 +65,11 @@ rk.XML.option <- function(label, val=NULL, chk=FALSE, id.name=NULL, i18n=NULL){ # check for additional i18n info; if FALSE, "label" will be renamed to "noi18n_label" attr.list <- check.i18n(i18n=i18n, attrs=attr.list) - option <- XMLNode("option", attrs=attr.list) + node <- check.i18n( + i18n=i18n, + node=XMLNode("option", attrs=attr.list), + comment=TRUE + ) - return(option) + return(node) } diff --git a/packages/rkwarddev/R/rk.XML.optioncolumn.R b/packages/rkwarddev/R/rk.XML.optioncolumn.R index 0bcc29a..52633fc 100644 --- a/packages/rkwarddev/R/rk.XML.optioncolumn.R +++ b/packages/rkwarddev/R/rk.XML.optioncolumn.R @@ -34,10 +34,9 @@ #' @param default Character string, only for external columns: The value to assume for this column, if no value is known for an entry. Rarely useful. #' @param id.name Character string, a unique ID for this plugin element. #' If \code{"auto"}, an ID will be generated automatically from the \code{connect} object. -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. If set to \code{FALSE}, the attribute \code{label} will be renamed into -#' \code{noi18n_label}. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. If set to \code{FALSE}, +#' the attribute \code{label} will be renamed into \code{noi18n_label}. #' @return An object of class \code{XiMpLe.node}. #' @export #' @seealso @@ -89,8 +88,11 @@ rk.XML.optioncolumn <- function(connect, modifier=NULL, label=TRUE, external=FAL # check for additional i18n info; if FALSE, "label" will be renamed to "noi18n_label" attr.list <- check.i18n(i18n=i18n, attrs=attr.list) - node <- XMLNode("optioncolumn", - attrs=attr.list) + node <- check.i18n( + i18n=i18n, + node=XMLNode("optioncolumn", attrs=attr.list), + comment=TRUE + ) return(node) } diff --git a/packages/rkwarddev/R/rk.XML.plugin.R b/packages/rkwarddev/R/rk.XML.plugin.R index 58a8442..175e99e 100644 --- a/packages/rkwarddev/R/rk.XML.plugin.R +++ b/packages/rkwarddev/R/rk.XML.plugin.R @@ -44,10 +44,9 @@ #' This is only useful for information that differs from the \code{<dependencies>} section of the \code{.pluginmap} file. #' @param gen.info Logical, if \code{TRUE} a comment note will be written into the document, #' that it was generated by \code{rkwarddev} and changes should be done to the script. -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. If set to \code{FALSE}, the attribute \code{label} will be renamed into -#' \code{noi18n_label}. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. If set to \code{FALSE}, +#' the attribute \code{label} will be renamed into \code{noi18n_label}. #' @return An object of class \code{XiMpLe.doc}. #' @export #' @seealso \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard} @@ -155,7 +154,11 @@ rk.XML.plugin <- function(name, dialog=NULL, wizard=NULL, logic=NULL, snippets=N # check for additional i18n info; if FALSE, "label" will be renamed to "noi18n_label" i18n.attrs <- check.i18n(i18n=i18n) - top.doc <- XMLNode("document", attrs=i18n.attrs, .children=child.list(all.children)) + top.doc <- check.i18n( + i18n=i18n, + node=XMLNode("document", attrs=i18n.attrs, .children=child.list(all.children)), + comment=TRUE + ) plugin <- XMLTree( dtd=list(doctype="rkplugin"), diff --git a/packages/rkwarddev/R/rk.XML.preview.R b/packages/rkwarddev/R/rk.XML.preview.R index dbfb5f9..617993f 100644 --- a/packages/rkwarddev/R/rk.XML.preview.R +++ b/packages/rkwarddev/R/rk.XML.preview.R @@ -19,10 +19,9 @@ #' Create XML node "preview" for RKWard plugins #' #' @param label A character string, text label for the preview checkbox. -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. If set to \code{FALSE}, the attribute \code{label} will be renamed into -#' \code{noi18n_label}. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. If set to \code{FALSE}, +#' the attribute \code{label} will be renamed into \code{noi18n_label}. #' @return An object of class \code{XiMpLe.node}. #' @export #' @seealso \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard} @@ -40,7 +39,11 @@ rk.XML.preview <- function(label="Preview", i18n=NULL){ # check for additional i18n info; if FALSE, "label" will be renamed to "noi18n_label" attr.list <- check.i18n(i18n=i18n, attrs=attr.list) - node <- XMLNode("preview", attrs=attr.list) + node <- check.i18n( + i18n=i18n, + node=XMLNode("preview", attrs=attr.list), + comment=TRUE + ) return(node) } diff --git a/packages/rkwarddev/R/rk.XML.radio.R b/packages/rkwarddev/R/rk.XML.radio.R index db499c3..85a18b1 100644 --- a/packages/rkwarddev/R/rk.XML.radio.R +++ b/packages/rkwarddev/R/rk.XML.radio.R @@ -34,10 +34,9 @@ #' @param component Character string, name of the component this node belongs to. Only needed if you #' want to use the scan features for automatic help file generation; needs \code{help} to be set #' accordingly, too! -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. If set to \code{FALSE}, the attribute \code{label} will be renamed into -#' \code{noi18n_label}. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. If set to \code{FALSE}, +#' the attribute \code{label} will be renamed into \code{noi18n_label}. #' @return An object of class \code{XiMpLe.node}. #' @export #' @seealso @@ -67,16 +66,17 @@ rk.XML.radio <- function(label, options=list(label=c(val=NULL, chk=FALSE, i18n=N # check for additional i18n info; if FALSE, "label" will be renamed to "noi18n_label" attr.list <- check.i18n(i18n=i18n, attrs=attr.list) - radio <- XMLNode("radio", - attrs=attr.list, - .children=child.list(rd.options, empty=FALSE) - ) + node <- check.i18n( + i18n=i18n, + node=XMLNode("radio", attrs=attr.list, .children=child.list(rd.options, empty=FALSE)), + comment=TRUE + ) # if present, store option IDs with parent ID - rk.register.options(options, parent.node=radio) + rk.register.options(options, parent.node=node) # check for .rkh content rk.set.rkh.prompter(component=component, id=id, help=help) - return(radio) + return(node) } diff --git a/packages/rkwarddev/R/rk.XML.saveobj.R b/packages/rkwarddev/R/rk.XML.saveobj.R index e0e4bbd..e5e2c2f 100644 --- a/packages/rkwarddev/R/rk.XML.saveobj.R +++ b/packages/rkwarddev/R/rk.XML.saveobj.R @@ -32,10 +32,9 @@ #' @param component Character string, name of the component this node belongs to. Only needed if you #' want to use the scan features for automatic help file generation; needs \code{help} to be set #' accordingly, too! -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. If set to \code{FALSE}, the attribute \code{label} will be renamed into -#' \code{noi18n_label}. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. If set to \code{FALSE}, +#' the attribute \code{label} will be renamed into \code{noi18n_label}. #' @return An object of class \code{XiMpLe.node}. #' @export #' @seealso \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard} @@ -75,7 +74,11 @@ rk.XML.saveobj <- function(label, chk=FALSE, checkable=TRUE, initial="auto", req # check for additional i18n info; if FALSE, "label" will be renamed to "noi18n_label" attr.list <- check.i18n(i18n=i18n, attrs=attr.list) - node <- XMLNode("saveobject", attrs=attr.list) + node <- check.i18n( + i18n=i18n, + node=XMLNode("saveobject", attrs=attr.list), + comment=TRUE + ) # check for .rkh content rk.set.rkh.prompter(component=component, id=attr.list[["id"]], help=help) diff --git a/packages/rkwarddev/R/rk.XML.select.R b/packages/rkwarddev/R/rk.XML.select.R index 0e434b8..f5f0c0e 100644 --- a/packages/rkwarddev/R/rk.XML.select.R +++ b/packages/rkwarddev/R/rk.XML.select.R @@ -32,10 +32,9 @@ #' @param component Character string, name of the component this node belongs to. Only needed if you #' want to use the scan features for automatic help file generation; needs \code{help} to be set #' accordingly, too! -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. If set to \code{FALSE}, the attribute \code{label} will be renamed into -#' \code{noi18n_label}. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. If set to \code{FALSE}, +#' the attribute \code{label} will be renamed into \code{noi18n_label}. #' @return An object of class \code{XiMpLe.node}. #' @seealso \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard} #' @export @@ -63,13 +62,14 @@ rk.XML.select <- function(label, options=list(label=c(val="", chk=FALSE, i18n=NU # check for additional i18n info; if FALSE, "label" will be renamed to "noi18n_label" attr.list <- check.i18n(i18n=i18n, attrs=attr.list) - select <- XMLNode("select", - attrs=attr.list, - .children=child.list(sl.options, empty=FALSE) - ) + node <- check.i18n( + i18n=i18n, + node=XMLNode("select", attrs=attr.list, .children=child.list(sl.options, empty=FALSE)), + comment=TRUE + ) # check for .rkh content rk.set.rkh.prompter(component=component, id=id, help=help) - return(select) + return(node) } diff --git a/packages/rkwarddev/R/rk.XML.spinbox.R b/packages/rkwarddev/R/rk.XML.spinbox.R index 4fbf1e4..cc89409 100644 --- a/packages/rkwarddev/R/rk.XML.spinbox.R +++ b/packages/rkwarddev/R/rk.XML.spinbox.R @@ -33,10 +33,9 @@ #' @param component Character string, name of the component this node belongs to. Only needed if you #' want to use the scan features for automatic help file generation; needs \code{help} to be set #' accordingly, too! -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. If set to \code{FALSE}, the attribute \code{label} will be renamed into -#' \code{noi18n_label}. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. If set to \code{FALSE}, +#' the attribute \code{label} will be renamed into \code{noi18n_label}. #' @return An object of class \code{XiMpLe.node}. #' @export #' @seealso \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard} @@ -82,7 +81,11 @@ rk.XML.spinbox <- function(label, min=NULL, max=NULL, initial=0, real=TRUE, prec # check for additional i18n info; if FALSE, "label" will be renamed to "noi18n_label" attr.list <- check.i18n(i18n=i18n, attrs=attr.list) - node <- XMLNode("spinbox", attrs=attr.list) + node <- check.i18n( + i18n=i18n, + node=XMLNode("spinbox", attrs=attr.list), + comment=TRUE + ) # check for .rkh content rk.set.rkh.prompter(component=component, id=attr.list[["id"]], help=help) diff --git a/packages/rkwarddev/R/rk.XML.tabbook.R b/packages/rkwarddev/R/rk.XML.tabbook.R index 22ae8f5..b9a95ea 100644 --- a/packages/rkwarddev/R/rk.XML.tabbook.R +++ b/packages/rkwarddev/R/rk.XML.tabbook.R @@ -24,10 +24,9 @@ #' @param id.name Character vector, unique IDs for the tabbook (first entry) and all tabs. #' If \code{"auto"}, IDs will be generated automatically from the labels. #' If \code{NULL}, no IDs will be given. -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. If set to \code{FALSE}, the attribute \code{label} will be renamed into -#' \code{noi18n_label}. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. If set to \code{FALSE}, +#' the attribute \code{label} will be renamed into \code{noi18n_label}. #' @note If a node in \code{tabs} is \code{<insert>}, it is returned as-is, without being nested in \code{<tab>}. #' @return An object of class \code{XiMpLe.node}. #' @export @@ -102,10 +101,11 @@ rk.XML.tabbook <- function(label=NULL, tabs=list(), id.name="auto", i18n=NULL){ # check for additional i18n info; if FALSE, "label" will be renamed to "noi18n_label" tbk.attr.list <- check.i18n(i18n=i18n, attrs=tbk.attr.list) - tabbook <- XMLNode("tabbook", - attrs=tbk.attr.list, - .children=child.list(tabs, empty=FALSE) - ) + node <- check.i18n( + i18n=i18n, + node=XMLNode("tabbook", attrs=tbk.attr.list, .children=child.list(tabs, empty=FALSE)), + comment=TRUE + ) - return(tabbook) + return(node) } diff --git a/packages/rkwarddev/R/rk.XML.text.R b/packages/rkwarddev/R/rk.XML.text.R index 3a92c5d..f157d3c 100644 --- a/packages/rkwarddev/R/rk.XML.text.R +++ b/packages/rkwarddev/R/rk.XML.text.R @@ -23,10 +23,9 @@ #' @param id.name Character string, a unique ID for this plugin element. #' If \code{"auto"}, an ID will be generated automatically from \code{text}. #' If \code{NULL}, no ID will be given. -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. If set to \code{FALSE}, the attribute \code{label} will be renamed into -#' \code{noi18n_label}. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. If set to \code{FALSE}, +#' the attribute \code{label} will be renamed into \code{noi18n_label}. #' @return An object of class \code{XiMpLe.node}. #' @export #' @seealso @@ -55,13 +54,17 @@ rk.XML.text <- function(text, type="normal", id.name="auto", i18n=NULL){ # preserve markup in the text if(grepl("<(.*)>", text)){ textAsTree <- parseXMLTree(text, object=TRUE) - node <- XMLNode("text", - .children=slot(textAsTree, "children"), - attrs=attr.list) + node <- check.i18n( + i18n=i18n, + node=XMLNode("text", .children=slot(textAsTree, "children"), attrs=attr.list), + comment=TRUE + ) } else { - node <- XMLNode("text", - text, - attrs=attr.list) + node <- check.i18n( + i18n=i18n, + node=XMLNode("text", text, attrs=attr.list), + comment=TRUE + ) } return(node) diff --git a/packages/rkwarddev/R/rk.XML.valueselector.R b/packages/rkwarddev/R/rk.XML.valueselector.R index 18b5c98..3caec5e 100644 --- a/packages/rkwarddev/R/rk.XML.valueselector.R +++ b/packages/rkwarddev/R/rk.XML.valueselector.R @@ -26,10 +26,9 @@ #' for this particular option (see \code{i18n}). Objects generated with \code{\link[rkwarddev:rk.XML.option]{rk.XML.option}} #' are accepted as well. #' @param id.name Character vector, unique ID for this element. -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. If set to \code{FALSE}, the attribute \code{label} will be renamed into -#' \code{noi18n_label}. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. If set to \code{FALSE}, +#' the attribute \code{label} will be renamed into \code{noi18n_label}. #' @return An object of class \code{XiMpLe.node}. #' @export #' @seealso @@ -66,9 +65,10 @@ rk.XML.valueselector <- function(label=NULL, options=list(label=c(val=NULL, chk= # check for additional i18n info; if FALSE, "label" will be renamed to "noi18n_label" attr.list <- check.i18n(i18n=i18n, attrs=attr.list) - node <- XMLNode("valueselector", - attrs=attr.list, - .children=child.list(vs.options, empty=FALSE) + node <- check.i18n( + i18n=i18n, + node=XMLNode("valueselector", attrs=attr.list, .children=child.list(vs.options, empty=FALSE)), + comment=TRUE ) return(node) diff --git a/packages/rkwarddev/R/rk.XML.valueslot.R b/packages/rkwarddev/R/rk.XML.valueslot.R index b1367f5..5a5f5b7 100644 --- a/packages/rkwarddev/R/rk.XML.valueslot.R +++ b/packages/rkwarddev/R/rk.XML.valueslot.R @@ -41,10 +41,9 @@ #' @param component Character string, name of the component this node belongs to. Only needed if you #' want to use the scan features for automatic help file generation; needs \code{help} to be set #' accordingly, too! -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. If set to \code{FALSE}, the attribute \code{label} will be renamed into -#' \code{noi18n_label}. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. If set to \code{FALSE}, +#' the attribute \code{label} will be renamed into \code{noi18n_label}. #' @return An object of class \code{XiMpLe.node}. #' @export #' @seealso @@ -105,10 +104,14 @@ rk.XML.valueslot <- function(label, source, property=NULL, required=FALSE, multi # check for additional i18n info; if FALSE, "label" will be renamed to "noi18n_label" value.slot.attr <- check.i18n(i18n=i18n, attrs=value.slot.attr) - v.slot <- XMLNode("valueslot", attrs=value.slot.attr) + node <- check.i18n( + i18n=i18n, + node=XMLNode("valueslot", attrs=value.slot.attr), + comment=TRUE + ) # check for .rkh content rk.set.rkh.prompter(component=component, id=value.slot.attr[["id"]], help=help) - return(v.slot) + return(node) } diff --git a/packages/rkwarddev/R/rk.XML.varselector.R b/packages/rkwarddev/R/rk.XML.varselector.R index 49dcab9..d7fdf00 100644 --- a/packages/rkwarddev/R/rk.XML.varselector.R +++ b/packages/rkwarddev/R/rk.XML.varselector.R @@ -21,10 +21,9 @@ #' @param label Character string, a text label for the variable selection slot. #' Must be set if \code{id.name="auto"}. #' @param id.name Character vector, unique ID for this element. -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. If set to \code{FALSE}, the attribute \code{label} will be renamed into -#' \code{noi18n_label}. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. If set to \code{FALSE}, +#' the attribute \code{label} will be renamed into \code{noi18n_label}. #' @return An object of class \code{XiMpLe.node}. #' @export #' @seealso @@ -54,7 +53,11 @@ rk.XML.varselector <- function(label=NULL, id.name="auto", i18n=NULL){ # check for additional i18n info; if FALSE, "label" will be renamed to "noi18n_label" attr.list <- check.i18n(i18n=i18n, attrs=attr.list) - node <- XMLNode("varselector", attrs=attr.list) + node <- check.i18n( + i18n=i18n, + node=XMLNode("varselector", attrs=attr.list), + comment=TRUE + ) return(node) } diff --git a/packages/rkwarddev/R/rk.XML.varslot.R b/packages/rkwarddev/R/rk.XML.varslot.R index 50e24c8..0fae276 100644 --- a/packages/rkwarddev/R/rk.XML.varslot.R +++ b/packages/rkwarddev/R/rk.XML.varslot.R @@ -51,10 +51,9 @@ #' @param component Character string, name of the component this node belongs to. Only needed if you #' want to use the scan features for automatic help file generation; needs \code{help} to be set #' accordingly, too! -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. If set to \code{FALSE}, the attribute \code{label} will be renamed into -#' \code{noi18n_label}. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. If set to \code{FALSE}, +#' the attribute \code{label} will be renamed into \code{noi18n_label}. #' @return An object of class \code{XiMpLe.node}. #' @export #' @seealso @@ -137,10 +136,14 @@ rk.XML.varslot <- function(label, source, property=NULL, required=FALSE, multi=F # check for additional i18n info; if FALSE, "label" will be renamed to "noi18n_label" var.slot.attr <- check.i18n(i18n=i18n, attrs=var.slot.attr) - v.slot <- XMLNode("varslot", attrs=var.slot.attr) + node <- check.i18n( + i18n=i18n, + node=XMLNode("varslot", attrs=var.slot.attr), + comment=TRUE + ) # check for .rkh content rk.set.rkh.prompter(component=component, id=var.slot.attr[["id"]], help=help) - return(v.slot) + return(node) } diff --git a/packages/rkwarddev/R/rk.XML.wizard.R b/packages/rkwarddev/R/rk.XML.wizard.R index a53c697..be809b8 100644 --- a/packages/rkwarddev/R/rk.XML.wizard.R +++ b/packages/rkwarddev/R/rk.XML.wizard.R @@ -27,10 +27,9 @@ #' @param label Character string, a text label for this plugin element. #' @param recommended Logical, whether the wizard should be the recommended interface (unless the user has configured #' RKWard to default to a specific interface). -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. If set to \code{FALSE}, the attribute \code{label} will be renamed into -#' \code{noi18n_label}. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. If set to \code{FALSE}, +#' the attribute \code{label} will be renamed into \code{noi18n_label}. #' @return An object of class \code{XiMpLe.node}. #' @export #' @seealso @@ -65,10 +64,11 @@ rk.XML.wizard <- function(..., label=NULL, recommended=FALSE, i18n=NULL){ # check for additional i18n info; if FALSE, "label" will be renamed to "noi18n_label" attr.list <- check.i18n(i18n=i18n, attrs=attr.list) - node <- XMLNode("wizard", - attrs=attr.list, - .children=child.list(nodes, empty=FALSE) - ) + node <- check.i18n( + i18n=i18n, + node= XMLNode("wizard", attrs=attr.list, .children=child.list(nodes, empty=FALSE)), + comment=TRUE + ) return(node) } diff --git a/packages/rkwarddev/R/rk.rkh.caption.R b/packages/rkwarddev/R/rk.rkh.caption.R index 9a51748..df63f48 100644 --- a/packages/rkwarddev/R/rk.rkh.caption.R +++ b/packages/rkwarddev/R/rk.rkh.caption.R @@ -24,10 +24,8 @@ #' or an object of class \code{XiMpLe.node} (whose \code{id} will be extracted and used). #' @param title Character string, title to be displayed. If \code{NULL}, the \code{label} #' of the element will be shown. -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. If set to \code{FALSE}, the attribute \code{title} will be renamed into -#' \code{noi18n_title}. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. #' @return An object of class \code{XiMpLe.node}. #' @export #' @seealso @@ -55,7 +53,11 @@ rk.rkh.caption <- function(id, title=NULL, i18n=NULL){ # check for additional i18n info; if FALSE, "title" will be renamed to "noi18n_title" attr.list <- check.i18n(i18n=i18n, attrs=attr.list) - node <- XMLNode(name="caption", attrs=attr.list) + node <- check.i18n( + i18n=i18n, + node=XMLNode(name="caption", attrs=attr.list), + comment=TRUE + ) return(node) } diff --git a/packages/rkwarddev/R/rk.rkh.link.R b/packages/rkwarddev/R/rk.rkh.link.R index fea41c5..0faf7e3 100644 --- a/packages/rkwarddev/R/rk.rkh.link.R +++ b/packages/rkwarddev/R/rk.rkh.link.R @@ -29,9 +29,8 @@ #' \item{\code{"RK"}}{\code{href} is assumend to be the ID of another RKWard plugin, i.e., #' the link generated will look like \code{rkward://component/<href>}.} #' } -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. #' @return An object of class \code{XiMpLe.node}. #' @export #' @seealso @@ -62,7 +61,11 @@ rk.rkh.link <- function(href, text=NULL, type="R", i18n=NULL){ # check for additional i18n info attr.list <- check.i18n(i18n=i18n, attrs=attr.list) - node <- XMLNode(name="link", text, attrs=attr.list) + node <- check.i18n( + i18n=i18n, + node=XMLNode(name="link", text, attrs=attr.list), + comment=TRUE + ) return(node) } diff --git a/packages/rkwarddev/R/rk.rkh.related.R b/packages/rkwarddev/R/rk.rkh.related.R index 36eee7d..a5631b1 100644 --- a/packages/rkwarddev/R/rk.rkh.related.R +++ b/packages/rkwarddev/R/rk.rkh.related.R @@ -21,9 +21,8 @@ #' @param ... Objects of class \code{XiMpLe.node}. They must all have the name "link". #' @param text Character string, the text to be displayed. #' @return An object of class \code{XiMpLe.node}. -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. #' @export #' @seealso #' \code{\link[rkwarddev:rk.rkh.doc]{rk.rkh.doc}} @@ -48,7 +47,11 @@ rk.rkh.related <- function(..., text=NULL, i18n=NULL){ # check for additional i18n info attr.list <- check.i18n(i18n=i18n, attrs=list()) - node <- XMLNode("related", text, ul, attrs=attr.list) + node <- check.i18n( + i18n=i18n, + node=XMLNode("related", text, ul, attrs=attr.list), + comment=TRUE + ) return(node) } diff --git a/packages/rkwarddev/R/rk.rkh.section.R b/packages/rkwarddev/R/rk.rkh.section.R index e500558..a574a6b 100644 --- a/packages/rkwarddev/R/rk.rkh.section.R +++ b/packages/rkwarddev/R/rk.rkh.section.R @@ -25,10 +25,9 @@ #' @param short Character string, short title for the menu for links to this section. #' @param id.name Character string, a unique ID for this element. #' If \code{"auto"}, an ID will be generated automatically from the \code{title} value. -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. If set to \code{FALSE}, the attribute \code{title} will be renamed into -#' \code{noi18n_title}. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. +#' If set to \code{FALSE}, the attribute \code{title} will be renamed into \code{noi18n_title}. #' @return An object of class \code{XiMpLe.node}. #' @export #' @seealso @@ -60,7 +59,11 @@ rk.rkh.section <- function(title, text=NULL, short=NULL, id.name="auto", i18n=NU # check for additional i18n info; if FALSE, "title" will be renamed to "noi18n_title" attr.list <- check.i18n(i18n=i18n, attrs=attr.list) - node <- XMLNode("section", text, attrs=attr.list) + node <- check.i18n( + i18n=i18n, + node=XMLNode("section", text, attrs=attr.list), + comment=TRUE + ) return(node) } diff --git a/packages/rkwarddev/R/rk.rkh.setting.R b/packages/rkwarddev/R/rk.rkh.setting.R index 7f27a95..c2cc2df 100644 --- a/packages/rkwarddev/R/rk.rkh.setting.R +++ b/packages/rkwarddev/R/rk.rkh.setting.R @@ -25,10 +25,9 @@ #' @param text Character string, the text to be displayed. #' @param title Character string, title to be displayed. If \code{NULL}, the \code{label} #' of the element will be shown. -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. If set to \code{FALSE}, the attribute \code{title} will be renamed into -#' \code{noi18n_title}. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. +#' If set to \code{FALSE}, the attribute \code{title} will be renamed into \code{noi18n_title}. #' @return An object of class \code{XiMpLe.node}. #' @export #' @seealso @@ -56,7 +55,11 @@ rk.rkh.setting <- function(id, text=NULL, title=NULL, i18n=NULL){ # check for additional i18n info; if FALSE, "title" will be renamed to "noi18n_title" attr.list <- check.i18n(i18n=i18n, attrs=attr.list) - node <- XMLNode("setting", attrs=attr.list, .children=child.list(text, empty=FALSE)) + node <- check.i18n( + i18n=i18n, + node=XMLNode("setting", attrs=attr.list, .children=child.list(text, empty=FALSE)), + comment=TRUE + ) return(node) } diff --git a/packages/rkwarddev/R/rk.rkh.summary.R b/packages/rkwarddev/R/rk.rkh.summary.R index c40ed08..86f0a64 100644 --- a/packages/rkwarddev/R/rk.rkh.summary.R +++ b/packages/rkwarddev/R/rk.rkh.summary.R @@ -19,9 +19,8 @@ #' Create XML "summary" node for RKWard help pages #' #' @param text Character string, the text to be displayed. -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. #' @return An object of class \code{XiMpLe.node}. #' @export #' @seealso @@ -40,7 +39,11 @@ rk.rkh.summary <- function(text=NULL, i18n=NULL){ # check for additional i18n info attr.list <- check.i18n(i18n=i18n, attrs=list()) - node <- XMLNode("summary", text, attrs=attr.list) + node <- check.i18n( + i18n=i18n, + node=XMLNode("summary", text, attrs=attr.list), + comment=TRUE + ) return(node) } diff --git a/packages/rkwarddev/R/rk.rkh.technical.R b/packages/rkwarddev/R/rk.rkh.technical.R index 884a5dc..724fbbb 100644 --- a/packages/rkwarddev/R/rk.rkh.technical.R +++ b/packages/rkwarddev/R/rk.rkh.technical.R @@ -19,9 +19,8 @@ #' Create XML "technical" node for RKWard help pages #' #' @param text Character string, the text to be displayed. -#' @param i18n Either a character string or a named list with the optional element \code{context}, -#' to give some \code{i18n_context} -#' information for this node. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. #' @return An object of class \code{XiMpLe.node}. #' @export #' @seealso @@ -39,7 +38,11 @@ rk.rkh.technical <- function(text=NULL, i18n=NULL){ # check for additional i18n info attr.list <- check.i18n(i18n=i18n, attrs=list()) - node <- XMLNode("technical", text, attrs=attr.list) + node <- check.i18n( + i18n=i18n, + node=XMLNode("technical", text, attrs=attr.list), + ... [truncated message content] |
From: m.eik m. <mei...@un...> - 2015-02-01 17:56:03
|
Git commit 5f8eefefc068e093f30c40c471a0247812449862 by m.eik michalke. Committed on 01/02/2015 at 17:55. Pushed by meikm into branch 'master'. two new functions to generate <i18n /> and <label /> nodes A +55 -0 packages/rkwarddev/R/rk.XML.i18n.R A +46 -0 packages/rkwarddev/R/rk.rkh.label.R A +31 -0 packages/rkwarddev/man/rk.XML.i18n.Rd A +31 -0 packages/rkwarddev/man/rk.rkh.label.Rd http://commits.kde.org/rkward/5f8eefefc068e093f30c40c471a0247812449862 diff --git a/packages/rkwarddev/R/rk.XML.i18n.R b/packages/rkwarddev/R/rk.XML.i18n.R new file mode 100644 index 0000000..0697cc3 --- /dev/null +++ b/packages/rkwarddev/R/rk.XML.i18n.R @@ -0,0 +1,55 @@ +# Copyright 2010-2015 Meik Michalke <mei...@hh...> +# +# This file is part of the R package rkwarddev. +# +# rkwarddev is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# rkwarddev is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with rkwarddev. If not, see <http://www.gnu.org/licenses/>. + + +#' Create XML node "i18n" for RKWard plugins +#' +#' @param label Character string, the label which is to be translated. +#' @param id.name Character string, a unique ID for the new property. +#' If \code{"auto"}, an ID will be generated automatically from the label. +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. +#' @return An object of class \code{XiMpLe.node}. +#' @export +#' @seealso +#' \code{\link[rkwarddev:rk.XML.logic]{rk.XML.logic}} +#' and the \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard} +#' @examples +#' test.i18n <- rk.XML.i18n(label="Label test") + +rk.XML.i18n <- function(label, id.name="auto", i18n=NULL){ + + if(identical(id.name, "auto")){ + # try autogenerating some id + attr.list <- list(id=auto.ids(label, prefix=ID.prefix("i18n", length=4), chars=10)) + } else { + attr.list <- list(id=id.name) + } + + attr.list[["label"]] <- label + + # check for additional i18n info + attr.list <- check.i18n(i18n=i18n, attrs=attr.list) + + node <- check.i18n( + i18n=i18n, + node=XMLNode("i18n", attrs=attr.list), + comment=TRUE + ) + + return(node) +} diff --git a/packages/rkwarddev/R/rk.rkh.label.R b/packages/rkwarddev/R/rk.rkh.label.R new file mode 100644 index 0000000..6cabe15 --- /dev/null +++ b/packages/rkwarddev/R/rk.rkh.label.R @@ -0,0 +1,46 @@ +# Copyright 2010-2015 Meik Michalke <mei...@hh...> +# +# This file is part of the R package rkwarddev. +# +# rkwarddev is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# rkwarddev is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with rkwarddev. If not, see <http://www.gnu.org/licenses/>. + + +#' Create XML "label" node for RKWard help pages +#' +#' @param id Either a character string (the \code{id} name of the element in the plugin, of +#' which to copy the \code{label} attribute), or an object of class \code{XiMpLe.node} +#' (whose \code{id} will be extracted and used). +#' @param i18n Either a character string or a named list with the optional elements \code{context} +#' or \code{comment}, to give some \code{i18n_context} information for this node. +#' @return An object of class \code{XiMpLe.node}. +#' @export +#' @seealso +#' \code{\link[rkwarddev:rk.rkh.doc]{rk.rkh.doc}} +#' and the \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard} +#' @examples +#' test.cbox <- rk.XML.cbox(label="foo", value="bar") +#' (test.label <- rk.rkh.label(test.cbox)) + +rk.rkh.label <- function(id, i18n=NULL){ + # check for additional i18n info + attr.list <- check.i18n(i18n=i18n, attrs=list(id=id)) + + node <- check.i18n( + i18n=i18n, + node=XMLNode("label", attrs=attr.list), + comment=TRUE + ) + + return(node) +} diff --git a/packages/rkwarddev/man/rk.XML.i18n.Rd b/packages/rkwarddev/man/rk.XML.i18n.Rd new file mode 100644 index 0000000..e92337e --- /dev/null +++ b/packages/rkwarddev/man/rk.XML.i18n.Rd @@ -0,0 +1,31 @@ +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.i18n.R +\name{rk.XML.i18n} +\alias{rk.XML.i18n} +\title{Create XML node "i18n" for RKWard plugins} +\usage{ +rk.XML.i18n(label, id.name = "auto", i18n = NULL) +} +\arguments{ +\item{label}{Character string, the label which is to be translated.} + +\item{id.name}{Character string, a unique ID for the new property. +If \code{"auto"}, an ID will be generated automatically from the label.} + +\item{i18n}{Either a character string or a named list with the optional elements \code{context} +or \code{comment}, to give some \code{i18n_context} information for this node.} +} +\value{ +An object of class \code{XiMpLe.node}. +} +\description{ +Create XML node "i18n" for RKWard plugins +} +\examples{ +test.i18n <- rk.XML.i18n(label="Label test") +} +\seealso{ +\code{\link[rkwarddev:rk.XML.logic]{rk.XML.logic}} + and the \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard} +} + diff --git a/packages/rkwarddev/man/rk.rkh.label.Rd b/packages/rkwarddev/man/rk.rkh.label.Rd new file mode 100644 index 0000000..f11c11c --- /dev/null +++ b/packages/rkwarddev/man/rk.rkh.label.Rd @@ -0,0 +1,31 @@ +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.rkh.label.R +\name{rk.rkh.label} +\alias{rk.rkh.label} +\title{Create XML "label" node for RKWard help pages} +\usage{ +rk.rkh.label(id, i18n = NULL) +} +\arguments{ +\item{id}{Either a character string (the \code{id} name of the element in the plugin, of +which to copy the \code{label} attribute), or an object of class \code{XiMpLe.node} +(whose \code{id} will be extracted and used).} + +\item{i18n}{Either a character string or a named list with the optional elements \code{context} +or \code{comment}, to give some \code{i18n_context} information for this node.} +} +\value{ +An object of class \code{XiMpLe.node}. +} +\description{ +Create XML "label" node for RKWard help pages +} +\examples{ +test.cbox <- rk.XML.cbox(label="foo", value="bar") +(test.label <- rk.rkh.label(test.cbox)) +} +\seealso{ +\code{\link[rkwarddev:rk.rkh.doc]{rk.rkh.doc}} + and the \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard} +} + |
From: Thomas F. <tho...@ru...> - 2015-02-01 17:15:47
|
Git commit 0726a4f41b4cadf3589239f4555421a4a9d3dd41 by Thomas Friedrichsmeier. Committed on 31/01/2015 at 17:21. Pushed by tfry into branch 'master'. Preserve format hints in translation export (kde-format, c-format, fuzzy) M +2 -0 scripts/import_translations.py http://commits.kde.org/rkward/0726a4f41b4cadf3589239f4555421a4a9d3dd41 diff --git a/scripts/import_translations.py b/scripts/import_translations.py index efb411d..8df52b9 100755 --- a/scripts/import_translations.py +++ b/scripts/import_translations.py @@ -85,6 +85,8 @@ for lang in LANGUAGES: if not prev_was_comment: of.write ("#: translation_export.do_not_modify_here:0\n") prev_was_comment = True + elif (line.startswith ("#,")): + of.write (line) else: continue else: |
From: Thomas F. <tho...@ru...> - 2015-02-01 17:15:47
|
Git commit 8b7e404e6599d3d2fcbdd7be9a58cd1ebc8b7321 by Thomas Friedrichsmeier. Committed on 01/02/2015 at 17:15. Pushed by tfry into branch 'master'. bookkeeping M +1 -23 ChangeLog M +14 -0 TODO http://commits.kde.org/rkward/8b7e404e6599d3d2fcbdd7be9a58cd1ebc8b7321 diff --git a/ChangeLog b/ChangeLog index ea4c697..c71f126 100644 --- a/ChangeLog +++ b/ChangeLog @@ -32,29 +32,7 @@ - Fixed potential crash while the "RKWard Debug Messages" window is visible - Fixed display of file paths containing non-ascii characters in the title bar and startup dialog - Fixed some erroneous plugin debug messages -- IN PROGESS: Allow plugins to be translated - + Notes: - - Is it a problem to sync KDE_LANG and LANGUAGE? Should that also be set for the backend? - - Lifetime of RKMessageCatalogs? Should probably be destructable, at least when reloading pluginmaps. Should be possible to implement in a sane ways - using QSharedPointer magic. - - Don't forget to write documentation - - Also general documentation for JS-functions is missing! - - What should be the policy regarding installing translations (80% criterion) - - i18n'ed plugins vs. automated tests - - Sure, we can run automated tests under C locale. But it would be nice to have an additional check that translations don't cause - any obvious problems. - - At least we could check for errors - - Perhaps a special diff of the generated R commands, where all quoted strings and comments are stripped? - ---- - -Stuff to cherry-pick, in case we want a 0.6.2a-release: -polypath: 49d7e9a3cf27c5eb0a45e03aa043957b87c4479c - -rcmdr: fb19efa6580a198a156b488bed78f641a1d22cba -and: 619a6764a25fd84e6388a1e0b21953db88325fcc - -debug-messages: b0bb24be1239bf52e1299cfb737d2b8b1a5fdc13 +- Plugins and in-application help pages can now be fully translated --- Version 0.6.2 - Oct-20-2014 - In data editor, indicate NAs, explicitly diff --git a/TODO b/TODO index 59df091..9d27b50 100644 --- a/TODO +++ b/TODO @@ -10,6 +10,20 @@ New features in R 3.1.0 to make use of / support: Simple stuff to do soon: - RKConsole: Show a notice (with "don't show again"-box, of course) when first using Ctrl+C shortcut +i18n-Thoughts: + + Notes: + - Is it a problem to sync KDE_LANG and LANGUAGE? Should that also be set for the backend? + - Lifetime of RKMessageCatalogs? Should probably be destructable, at least when reloading pluginmaps. Should be possible to implement in a sane ways + using QSharedPointer magic. + - Don't forget to write documentation + - Also general documentation for JS-functions is missing! + - What should be the policy regarding installing translations (80% criterion) + - i18n'ed plugins vs. automated tests + - Sure, we can run automated tests under C locale. But it would be nice to have an additional check that translations don't cause + any obvious problems. + - At least we could check for errors + - Perhaps a special diff of the generated R commands, where all quoted strings and comments are stripped? + Bugs outside RKWard: - KDE 4 - why is the icon style only honored for mainToolBar (in KXMLGUIBuilder)? It looks like this is done on purpose, but why??? |
From: m.eik m. <mei...@un...> - 2015-02-01 16:12:06
|
Git commit 6eb45eed3e7aa1afd27620a245ebb97a3e386412 by m.eik michalke. Committed on 01/02/2015 at 16:09. Pushed by meikm into branch 'master'. rk.plugin.skeleton() now has an "internal" switch to generate plugins for distribution with RKWard all docs were rebuilt with roxygen2 4.1.0 M +8 -4 packages/rkwarddev/ChangeLog M +4 -5 packages/rkwarddev/DESCRIPTION M +1 -1 packages/rkwarddev/NAMESPACE M +4 -3 packages/rkwarddev/R/rk.XML.pluginmap.R M +29 -8 packages/rkwarddev/R/rk.plugin.skeleton.R M +1 -1 packages/rkwarddev/R/rkwarddev-package.R M +7 -3 packages/rkwarddev/inst/NEWS.Rd M +- -- packages/rkwarddev/inst/doc/rkwarddev_vignette.pdf M +2 -1 packages/rkwarddev/man/R.comment.Rd M +2 -1 packages/rkwarddev/man/echo.Rd M +2 -1 packages/rkwarddev/man/i18n.Rd M +2 -1 packages/rkwarddev/man/id.Rd M +2 -1 packages/rkwarddev/man/ite.Rd M +2 -1 packages/rkwarddev/man/join.Rd M +2 -1 packages/rkwarddev/man/qp.Rd M +2 -1 packages/rkwarddev/man/rk.JS.arr-class.Rd M +2 -1 packages/rkwarddev/man/rk.JS.array.Rd M +2 -1 packages/rkwarddev/man/rk.JS.doc.Rd M +2 -1 packages/rkwarddev/man/rk.JS.header.Rd M +2 -1 packages/rkwarddev/man/rk.JS.ite-class.Rd M +2 -1 packages/rkwarddev/man/rk.JS.opt-class.Rd M +2 -1 packages/rkwarddev/man/rk.JS.options.Rd M +2 -1 packages/rkwarddev/man/rk.JS.optionset.Rd M +2 -1 packages/rkwarddev/man/rk.JS.oset-class.Rd M +2 -1 packages/rkwarddev/man/rk.JS.saveobj.Rd M +2 -1 packages/rkwarddev/man/rk.JS.scan.Rd M +2 -1 packages/rkwarddev/man/rk.JS.var-class.Rd M +2 -1 packages/rkwarddev/man/rk.JS.vars.Rd M +2 -1 packages/rkwarddev/man/rk.XML.about.Rd M +2 -1 packages/rkwarddev/man/rk.XML.attribute.Rd M +2 -1 packages/rkwarddev/man/rk.XML.browser.Rd M +2 -1 packages/rkwarddev/man/rk.XML.cbox.Rd M +2 -1 packages/rkwarddev/man/rk.XML.code.Rd M +2 -1 packages/rkwarddev/man/rk.XML.col.Rd M +2 -1 packages/rkwarddev/man/rk.XML.component.Rd M +2 -1 packages/rkwarddev/man/rk.XML.components.Rd M +2 -1 packages/rkwarddev/man/rk.XML.connect.Rd M +2 -1 packages/rkwarddev/man/rk.XML.context.Rd M +2 -1 packages/rkwarddev/man/rk.XML.convert.Rd M +2 -1 packages/rkwarddev/man/rk.XML.copy.Rd M +2 -1 packages/rkwarddev/man/rk.XML.dependencies.Rd M +2 -1 packages/rkwarddev/man/rk.XML.dependency_check.Rd M +2 -1 packages/rkwarddev/man/rk.XML.dialog.Rd M +2 -1 packages/rkwarddev/man/rk.XML.dropdown.Rd M +2 -1 packages/rkwarddev/man/rk.XML.embed.Rd M +2 -1 packages/rkwarddev/man/rk.XML.entry.Rd M +2 -1 packages/rkwarddev/man/rk.XML.external.Rd M +2 -1 packages/rkwarddev/man/rk.XML.formula.Rd M +2 -1 packages/rkwarddev/man/rk.XML.frame.Rd M +2 -1 packages/rkwarddev/man/rk.XML.help.Rd M +2 -1 packages/rkwarddev/man/rk.XML.hierarchy.Rd M +2 -1 packages/rkwarddev/man/rk.XML.include.Rd M +2 -1 packages/rkwarddev/man/rk.XML.input.Rd M +2 -1 packages/rkwarddev/man/rk.XML.insert.Rd M +2 -1 packages/rkwarddev/man/rk.XML.logic.Rd M +15 -8 packages/rkwarddev/man/rk.XML.matrix.Rd M +2 -1 packages/rkwarddev/man/rk.XML.menu.Rd M +2 -1 packages/rkwarddev/man/rk.XML.option.Rd M +2 -1 packages/rkwarddev/man/rk.XML.optioncolumn.Rd M +2 -1 packages/rkwarddev/man/rk.XML.optiondisplay.Rd M +2 -1 packages/rkwarddev/man/rk.XML.optionset.Rd M +2 -1 packages/rkwarddev/man/rk.XML.page.Rd M +2 -1 packages/rkwarddev/man/rk.XML.plugin.Rd M +7 -5 packages/rkwarddev/man/rk.XML.pluginmap.Rd M +2 -1 packages/rkwarddev/man/rk.XML.preview.Rd M +2 -1 packages/rkwarddev/man/rk.XML.radio.Rd M +2 -1 packages/rkwarddev/man/rk.XML.require.Rd M +2 -1 packages/rkwarddev/man/rk.XML.row.Rd M +2 -1 packages/rkwarddev/man/rk.XML.saveobj.Rd M +2 -1 packages/rkwarddev/man/rk.XML.select.Rd M +2 -1 packages/rkwarddev/man/rk.XML.set.Rd M +2 -1 packages/rkwarddev/man/rk.XML.snippet.Rd M +2 -1 packages/rkwarddev/man/rk.XML.snippets.Rd M +2 -1 packages/rkwarddev/man/rk.XML.spinbox.Rd M +2 -1 packages/rkwarddev/man/rk.XML.stretch.Rd M +2 -1 packages/rkwarddev/man/rk.XML.switch.Rd M +2 -1 packages/rkwarddev/man/rk.XML.tabbook.Rd M +2 -1 packages/rkwarddev/man/rk.XML.text.Rd M +2 -1 packages/rkwarddev/man/rk.XML.values.Rd M +2 -1 packages/rkwarddev/man/rk.XML.valueselector.Rd M +2 -1 packages/rkwarddev/man/rk.XML.valueslot.Rd M +2 -1 packages/rkwarddev/man/rk.XML.vars.Rd M +2 -1 packages/rkwarddev/man/rk.XML.varselector.Rd M +2 -1 packages/rkwarddev/man/rk.XML.varslot.Rd M +2 -1 packages/rkwarddev/man/rk.XML.wizard.Rd M +2 -1 packages/rkwarddev/man/rk.build.plugin.Rd M +2 -1 packages/rkwarddev/man/rk.comment.Rd M +2 -1 packages/rkwarddev/man/rk.get.comp.Rd M +2 -1 packages/rkwarddev/man/rk.get.rkh.prompter.Rd M +2 -1 packages/rkwarddev/man/rk.i18n.comment.Rd M +2 -1 packages/rkwarddev/man/rk.paste.JS.Rd M +2 -1 packages/rkwarddev/man/rk.paste.JS.graph.Rd M +2 -1 packages/rkwarddev/man/rk.plot.opts-class.Rd M +2 -1 packages/rkwarddev/man/rk.plotOptions.Rd M +2 -1 packages/rkwarddev/man/rk.plug.comp-class.Rd M +2 -1 packages/rkwarddev/man/rk.plugin.component.Rd M +11 -3 packages/rkwarddev/man/rk.plugin.skeleton.Rd M +2 -1 packages/rkwarddev/man/rk.rkh.caption.Rd M +2 -1 packages/rkwarddev/man/rk.rkh.doc.Rd M +2 -1 packages/rkwarddev/man/rk.rkh.link.Rd M +2 -1 packages/rkwarddev/man/rk.rkh.related.Rd M +2 -1 packages/rkwarddev/man/rk.rkh.scan.Rd M +2 -1 packages/rkwarddev/man/rk.rkh.section.Rd M +2 -1 packages/rkwarddev/man/rk.rkh.setting.Rd M +2 -1 packages/rkwarddev/man/rk.rkh.settings.Rd M +2 -1 packages/rkwarddev/man/rk.rkh.summary.Rd M +2 -1 packages/rkwarddev/man/rk.rkh.technical.Rd M +2 -1 packages/rkwarddev/man/rk.rkh.title.Rd M +2 -1 packages/rkwarddev/man/rk.rkh.usage.Rd M +2 -1 packages/rkwarddev/man/rk.set.comp.Rd M +2 -1 packages/rkwarddev/man/rk.set.rkh.prompter.Rd M +2 -1 packages/rkwarddev/man/rk.testsuite.doc.Rd M +2 -1 packages/rkwarddev/man/rk.uniqueIDs.Rd M +3 -2 packages/rkwarddev/man/rkwarddev-package.Rd M +2 -1 packages/rkwarddev/man/rkwarddev.required.Rd M +2 -1 packages/rkwarddev/man/show-methods.Rd M +2 -1 packages/rkwarddev/man/tf.Rd http://commits.kde.org/rkward/6eb45eed3e7aa1afd27620a245ebb97a3e386412 diff --git a/packages/rkwarddev/ChangeLog b/packages/rkwarddev/ChangeLog index 528129f..0271963 100644 --- a/packages/rkwarddev/ChangeLog +++ b/packages/rkwarddev/ChangeLog @@ -1,6 +1,6 @@ ChangeLog for package rkwarddev -changes in version 0.07-1 (2015-01-20) +changes in version 0.07-1 (2015-02-01) fixed: - rk.XML.optionset() does now allow to re-use objects defined in the same function call (i.e., refer to optioncolumns in the logic section) @@ -45,7 +45,8 @@ added: rk.XML.vars() to also accept "duplicates" - new argument "var" in rk.paste.JS() to define whether the JS keyword "var" should be used or omitted for rk.JS.var objects - - rk.XML.matrix() now also accepts the arguments "min_rows" and "min_columns" + - rk.XML.matrix() now also accepts the arguments "min_rows" and + "min_columns" changed: - function i18n() was changed to be used in JavaScript generation only; this breaks code using the function introduced with 0.06-4, but that was to @@ -68,8 +69,11 @@ changed: 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 - - rk.plugin.component() will now also move <dependencies> from <about> - to a top level child node of plugin XML code, with a warning + - rk.plugin.component() will now also move <dependencies> from <about> to a + top level child node of plugin XML code, with a warning + - rk.plugin.skeleton() has a new logical switch called "internal", to set + some defaults for plugins to be distributed with RKWard itself + - the "pluginmap" argument of rk.plugin.skeleton() now also accepts "namespace" removed: - the functions rk.set.language() rk.get.language() were no longer useful and therefore removed diff --git a/packages/rkwarddev/DESCRIPTION b/packages/rkwarddev/DESCRIPTION index e7f5f40..2b9d265 100644 --- a/packages/rkwarddev/DESCRIPTION +++ b/packages/rkwarddev/DESCRIPTION @@ -8,16 +8,15 @@ Depends: Suggests: testthat Enhances: rkward -Description: Provides functions to create plugin skeletons and XML - structures for RKWard. +Description: Provides functions to create plugin skeletons and XML structures + for RKWard. License: GPL (>= 3) Encoding: UTF-8 LazyLoad: yes URL: http://rkward.sourceforge.net -Authors@R: c(person(given="m.eik", family="michalke", - email="mei...@hh...", role=c("aut", "cre"))) +Authors@R: c(person(given="m.eik", family="michalke", email="mei...@hh...", role=c("aut", "cre"))) Version: 0.07-1 -Date: 2015-01-13 +Date: 2015-02-01 Collate: '00_class_01_rk.JS.arr.R' '00_class_02_rk.JS.var.R' diff --git a/packages/rkwarddev/NAMESPACE b/packages/rkwarddev/NAMESPACE index c8fa4b2..2857174 100644 --- a/packages/rkwarddev/NAMESPACE +++ b/packages/rkwarddev/NAMESPACE @@ -1,4 +1,4 @@ -# Generated by roxygen2 (4.0.2): do not edit by hand +# Generated by roxygen2 (4.1.0): do not edit by hand export(R.comment) export(echo) diff --git a/packages/rkwarddev/R/rk.XML.pluginmap.R b/packages/rkwarddev/R/rk.XML.pluginmap.R index c8ac9fc..e2307f7 100644 --- a/packages/rkwarddev/R/rk.XML.pluginmap.R +++ b/packages/rkwarddev/R/rk.XML.pluginmap.R @@ -45,11 +45,12 @@ #' that it was generated by \code{rkwarddev} and changes should be done to the script. #' @param dependencies An object of class \code{XiMpLe.node} to be pasted as the \code{<dependencies>} section, #' See \code{\link[rkwarddev:rk.XML.dependencies]{rk.XML.dependencies}} for details. Skipped if \code{NULL}. -#' @param namespace Character string, the namespace attribute of the \code{<document>} node, defaults to the plugin name (which you probably shouldn't touch...) +#' @param namespace Character string, the namespace attribute of the \code{<document>} node, defaults to the plugin name (which you probably shouldn't touch...). +#' RKWard's internal plugins should use the namespace \code{rkward}. This is taken care of by \code{\link[rkwarddev::rk.plugin.skeleton]{rk.plugin.skeleton}} +#' if you set \code{internal=TRUE}. #' @param priority Character string, the priority attribute of the \code{<document>} node. Must be either "hidden", "low", "medium", or "high", #' defaults to "medium". -#' @param id.name Character string, a unique ID for this plugin element. -#' If \code{"auto"} and a label was provided, an ID will be generated automatically from the label. +#' @param id.name Character string, a unique ID for this plugin element. If \code{"auto"}, an ID will be generated automatically from \code{name}. #' @seealso \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard} #' @return An object of class \code{XiMpLe.node}. #' @export diff --git a/packages/rkwarddev/R/rk.plugin.skeleton.R b/packages/rkwarddev/R/rk.plugin.skeleton.R index 83eb764..a856e82 100644 --- a/packages/rkwarddev/R/rk.plugin.skeleton.R +++ b/packages/rkwarddev/R/rk.plugin.skeleton.R @@ -53,7 +53,7 @@ #' If not set, their default values are used. See \code{\link[rkwarddev:rk.JS.doc]{rk.JS.doc}} for details. #' @param pluginmap A named list of options to be forwarded to \code{\link[rkwarddev:rk.XML.pluginmap]{rk.XML.pluginmap}}, to generate the pluginmap file. #' Not all options are supported because some don't make sense in this context. Valid options are: -#' \code{"name"}, \code{"hierarchy"} and \code{"require"}. +#' \code{"name"}, \code{"namespace"} (see also \code{internal}), \code{"hierarchy"} and \code{"require"}. #' If not set, their default values are used. See \code{\link[rkwarddev:rk.XML.pluginmap]{rk.XML.pluginmap}} for details. #' @param rkh A named list of options to be forwarded to \code{\link[rkwarddev:rk.rkh.doc]{rk.rkh.doc}}, to generate the help file. #' Not all options are supported because some don't make sense in this context. Valid options are: @@ -90,6 +90,9 @@ #' that they were generated by \code{rkwarddev} and changes should be done to the script. #' @param hints Logical, if \code{TRUE} and you leave out optional entries (like \code{dependencies=NULL}), dummy sections will be added as comments. #' @param indent.by A character string defining the indentation string to use. +#' @param internal Logical, a simple switch to build an internal plugin for official distribution with RKWard. If set to \code{TRUE}, the +#' plugin will have its namespace set to \code{"rkward"} and \code{<about>} info in the main component. No \code{DESCRIPTION} or +#' \code{NAMESPACE} file will be written. #' @return Character string with the path to the plugin root directory. #' @seealso \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard} #' @export @@ -159,7 +162,7 @@ rk.plugin.skeleton <- function(about, path=tempdir(), overwrite=FALSE, tests=TRUE, lazyLoad=TRUE, create=c("pmap", "xml", "js", "rkh", "desc", "clog"), suggest.required=TRUE, components=list(), dependencies=NULL, edit=FALSE, load=FALSE, show=FALSE, gen.info=TRUE, - hints=TRUE, indent.by="\t"){ + hints=TRUE, indent.by="\t", internal=FALSE){ if(is.XiMpLe.node(about)){ # check about and dependencies @@ -179,6 +182,10 @@ rk.plugin.skeleton <- function(about, path=tempdir(), } else { stop(simpleError("'about' must be a character string or XiMpLe.node, see ?rk.XML.about()!")) } + # internal plugins don't need their own DESCRIPTION file + if(isTRUE(internal)){ + create <- create[!create %in% "desc"] + } else {} # to besure, remove all non-character symbols from name name.orig <- name @@ -232,8 +239,15 @@ rk.plugin.skeleton <- function(about, path=tempdir(), if(!"hierarchy" %in% got.pm.options) { pluginmap[["hierarchy"]] <- eval(formals(rk.XML.pluginmap)[["hierarchy"]]) } else {} + if(isTRUE(internal)){ + main.comp.about <- about + # make sure the main component is named after the pluginmap entry + XMLAttrs(main.comp.about)[["name"]] <- pluginmap[["name"]] + } else { + main.comp.about <- pluginmap[["name"]] + } main.component <- rk.plugin.component( - about=pluginmap[["name"]], + about=main.comp.about, xml=xml, js=js, rkh=rkh, @@ -307,6 +321,15 @@ rk.plugin.skeleton <- function(about, path=tempdir(), if(!"name" %in% got.pm.options){ pluginmap[["name"]] <- name.orig } else {} + # needed for "show" later + pm.id.name <- gsub("[^[:alnum:]_]*", "", pluginmap[["name"]]) + if(isTRUE(internal)){ + pluginmap[["namespace"]] <- "rkward" + } else { + if(!"namespace" %in% got.pm.options){ + pluginmap[["namespace"]] <- pm.id.name + } else {} + } # get components and hierarchy info from the components list all.components <- sapply(components, function(this.comp){ comp.name <- slot(this.comp, "name") @@ -329,11 +352,10 @@ rk.plugin.skeleton <- function(about, path=tempdir(), hints=hints, gen.info=gen.info, dependencies=dependencies.node, + namespace=pluginmap[["namespace"]], # id.name=paste(gsub("[.]*|[[:space:]]*", "", pluginmap[["name"]]), "rkward", sep="_")) - id.name=paste(gsub("[^[:alnum:]_]*", "", pluginmap[["name"]]), "rkward", sep="_")) + id.name=paste(pm.id.name, "rkward", sep="_")) cat(pasteXML(XML.pluginmap, shine=2, indent.by=indent.by), file=plugin.pluginmap) - # needed for "show" - pm.id.name <- gsub("[^[:alnum:]_]*", "", pluginmap[["name"]]) } else { pm.id.name <- name } @@ -346,8 +368,7 @@ rk.plugin.skeleton <- function(about, path=tempdir(), if(isTRUE(show)){ # call the plugin; reconstructed the ID generation from rk.XML.pluginmap() plugin.ID <- auto.ids(paste0(pm.id.name, pm.id.name), prefix=ID.prefix("component"), chars=25) - # namespace should be the plugin name - rk.call.plugin(paste0(pm.id.name, "::", plugin.ID)) + rk.call.plugin(paste0(pluginmap[["namespace"]], "::", plugin.ID)) } else {} } else {} } else {} diff --git a/packages/rkwarddev/R/rkwarddev-package.R b/packages/rkwarddev/R/rkwarddev-package.R index f164f3b..1fbdc73 100644 --- a/packages/rkwarddev/R/rkwarddev-package.R +++ b/packages/rkwarddev/R/rkwarddev-package.R @@ -4,7 +4,7 @@ #' Package: \tab rkwarddev\cr #' Type: \tab Package\cr #' Version: \tab 0.07-1\cr -#' Date: \tab 2015-01-13\cr +#' Date: \tab 2015-02-01\cr #' Depends: \tab R (>= 2.9.0),methods,XiMpLe (>= 0.03-21),rkward (>= 0.5.7)\cr #' Enhances: \tab rkward\cr #' Encoding: \tab UTF-8\cr diff --git a/packages/rkwarddev/inst/NEWS.Rd b/packages/rkwarddev/inst/NEWS.Rd index 8d8fb39..e437735 100644 --- a/packages/rkwarddev/inst/NEWS.Rd +++ b/packages/rkwarddev/inst/NEWS.Rd @@ -1,7 +1,7 @@ \name{NEWS} \title{News for Package 'rkwarddev'} \encoding{UTF-8} -\section{Changes in rkwarddev version 0.07-1 (2015-01-13)}{ +\section{Changes in rkwarddev version 0.07-1 (2015-02-01)}{ \subsection{fixed}{ \itemize{ \item \code{rk.XML.optionset()} does now allow to re-use objects defined in the same @@ -50,6 +50,8 @@ \code{rk.XML.vars()} to also accept \code{"duplicates"} \item new argument \code{"var"} in \code{rk.paste.JS()} to define whether the JS keyword \code{"var"} should be used or omitted for rk.JS.var objects + \item \code{rk.XML.matrix()} now also accepts the arguments \code{"min_rows"} and + \code{"min_columns"} } } \subsection{changed}{ @@ -75,8 +77,10 @@ remove quotes you added for rkwarddev >= 0.05-0 \item updated the generation of author and maintainer fileds in DESCRIPTIONs made by \code{rk.plugin.skeleton()}, borrowing \code{get.authors()} from roxyPackage - \item \code{rk.plugin.component()} will now also move <dependencies> from <about> - to a top level child node of plugin XML code, with a warning + \item \code{rk.plugin.component()} will now also move <dependencies> from <about> to a + top level child node of plugin XML code, with a warning + \item \code{rk.plugin.skeleton()} has a new logical switch called \code{"internal"}, to set + some defaults for plugins to be distributed with RKWard itself } } \subsection{removed}{ diff --git a/packages/rkwarddev/inst/doc/rkwarddev_vignette.pdf b/packages/rkwarddev/inst/doc/rkwarddev_vignette.pdf index c8f0ad1..74e68aa 100644 Binary files a/packages/rkwarddev/inst/doc/rkwarddev_vignette.pdf and b/packages/rkwarddev/inst/doc/rkwarddev_vignette.pdf differ diff --git a/packages/rkwarddev/man/R.comment.Rd b/packages/rkwarddev/man/R.comment.Rd index dd21683..244a103 100644 --- a/packages/rkwarddev/man/R.comment.Rd +++ b/packages/rkwarddev/man/R.comment.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/R.comment.R \name{R.comment} \alias{R.comment} \title{Create R comment with JavaScript in RKWard plugin code} diff --git a/packages/rkwarddev/man/echo.Rd b/packages/rkwarddev/man/echo.Rd index bd25944..d1ab558 100644 --- a/packages/rkwarddev/man/echo.Rd +++ b/packages/rkwarddev/man/echo.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/echo.R \name{echo} \alias{echo} \title{Generate JavaScript echo command call} diff --git a/packages/rkwarddev/man/i18n.Rd b/packages/rkwarddev/man/i18n.Rd index ef30f5d..4c68a1a 100644 --- a/packages/rkwarddev/man/i18n.Rd +++ b/packages/rkwarddev/man/i18n.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/i18n.R \name{i18n} \alias{i18n} \title{Mark JavaScript strings as translatable} diff --git a/packages/rkwarddev/man/id.Rd b/packages/rkwarddev/man/id.Rd index b37c1cf..b43c2f5 100644 --- a/packages/rkwarddev/man/id.Rd +++ b/packages/rkwarddev/man/id.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/id.R \name{id} \alias{id} \title{Replace XiMpLe.node objects with their ID value} diff --git a/packages/rkwarddev/man/ite.Rd b/packages/rkwarddev/man/ite.Rd index 5cd51d9..e6d670c 100644 --- a/packages/rkwarddev/man/ite.Rd +++ b/packages/rkwarddev/man/ite.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/ite.R \name{ite} \alias{ite} \title{Generate JavaScript if/then/else constructs} diff --git a/packages/rkwarddev/man/join.Rd b/packages/rkwarddev/man/join.Rd index 0450351..4e3d3e4 100644 --- a/packages/rkwarddev/man/join.Rd +++ b/packages/rkwarddev/man/join.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/join.R \name{join} \alias{join} \title{Generate JavaScript to join an array object} diff --git a/packages/rkwarddev/man/qp.Rd b/packages/rkwarddev/man/qp.Rd index f69fd99..94a7334 100644 --- a/packages/rkwarddev/man/qp.Rd +++ b/packages/rkwarddev/man/qp.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/qp.R \name{qp} \alias{qp} \title{Replace XiMpLe.node objects with their ID value} diff --git a/packages/rkwarddev/man/rk.JS.arr-class.Rd b/packages/rkwarddev/man/rk.JS.arr-class.Rd index f3f1f38..048c7cb 100644 --- a/packages/rkwarddev/man/rk.JS.arr-class.Rd +++ b/packages/rkwarddev/man/rk.JS.arr-class.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/00_class_01_rk.JS.arr.R \docType{class} \name{rk.JS.arr-class} \alias{rk.JS.arr-class} diff --git a/packages/rkwarddev/man/rk.JS.array.Rd b/packages/rkwarddev/man/rk.JS.array.Rd index 7bce8da..41b3c9b 100644 --- a/packages/rkwarddev/man/rk.JS.array.Rd +++ b/packages/rkwarddev/man/rk.JS.array.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.JS.array.R \name{rk.JS.array} \alias{rk.JS.array} \title{Create a simple JavaScript array} diff --git a/packages/rkwarddev/man/rk.JS.doc.Rd b/packages/rkwarddev/man/rk.JS.doc.Rd index 4e1129b..bd8c065 100644 --- a/packages/rkwarddev/man/rk.JS.doc.Rd +++ b/packages/rkwarddev/man/rk.JS.doc.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.JS.doc.R \name{rk.JS.doc} \alias{rk.JS.doc} \title{Create JavaScript outline from RKWard plugin XML} diff --git a/packages/rkwarddev/man/rk.JS.header.Rd b/packages/rkwarddev/man/rk.JS.header.Rd index a0dafb1..bfe80b1 100644 --- a/packages/rkwarddev/man/rk.JS.header.Rd +++ b/packages/rkwarddev/man/rk.JS.header.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.JS.header.R \name{rk.JS.header} \alias{rk.JS.header} \title{Generate JavaScript header object} diff --git a/packages/rkwarddev/man/rk.JS.ite-class.Rd b/packages/rkwarddev/man/rk.JS.ite-class.Rd index 4d12a00..74273b0 100644 --- a/packages/rkwarddev/man/rk.JS.ite-class.Rd +++ b/packages/rkwarddev/man/rk.JS.ite-class.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/00_class_03_rk.JS.ite.R \docType{class} \name{rk.JS.ite-class} \alias{rk.JS.ite-class} diff --git a/packages/rkwarddev/man/rk.JS.opt-class.Rd b/packages/rkwarddev/man/rk.JS.opt-class.Rd index 8e9e5ac..87a8be5 100644 --- a/packages/rkwarddev/man/rk.JS.opt-class.Rd +++ b/packages/rkwarddev/man/rk.JS.opt-class.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/00_class_04_rk.JS.opt.R \docType{class} \name{rk.JS.opt-class} \alias{rk.JS.opt-class} diff --git a/packages/rkwarddev/man/rk.JS.options.Rd b/packages/rkwarddev/man/rk.JS.options.Rd index 9e4701f..5e67f69 100644 --- a/packages/rkwarddev/man/rk.JS.options.Rd +++ b/packages/rkwarddev/man/rk.JS.options.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.JS.options.R \name{rk.JS.options} \alias{rk.JS.options} \title{Combine several options in one JavaScript variable} diff --git a/packages/rkwarddev/man/rk.JS.optionset.Rd b/packages/rkwarddev/man/rk.JS.optionset.Rd index 561938b..26ebb15 100644 --- a/packages/rkwarddev/man/rk.JS.optionset.Rd +++ b/packages/rkwarddev/man/rk.JS.optionset.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.JS.optionset.R \name{rk.JS.optionset} \alias{rk.JS.optionset} \title{Evaluate optionset objects in plugin JavaScript} diff --git a/packages/rkwarddev/man/rk.JS.oset-class.Rd b/packages/rkwarddev/man/rk.JS.oset-class.Rd index 4538f07..1d679df 100644 --- a/packages/rkwarddev/man/rk.JS.oset-class.Rd +++ b/packages/rkwarddev/man/rk.JS.oset-class.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/00_class_05_rk.JS.oset.R \docType{class} \name{rk.JS.oset-class} \alias{rk.JS.oset-class} diff --git a/packages/rkwarddev/man/rk.JS.saveobj.Rd b/packages/rkwarddev/man/rk.JS.saveobj.Rd index d9a34b0..ba9e172 100644 --- a/packages/rkwarddev/man/rk.JS.saveobj.Rd +++ b/packages/rkwarddev/man/rk.JS.saveobj.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.JS.saveobj.R \name{rk.JS.saveobj} \alias{rk.JS.saveobj} \title{Create JavaScript saveobject code from plugin XML} diff --git a/packages/rkwarddev/man/rk.JS.scan.Rd b/packages/rkwarddev/man/rk.JS.scan.Rd index 482bd70..75bfdb1 100644 --- a/packages/rkwarddev/man/rk.JS.scan.Rd +++ b/packages/rkwarddev/man/rk.JS.scan.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.JS.scan.R \name{rk.JS.scan} \alias{rk.JS.scan} \title{Create JavaScript variables from plugin XML} diff --git a/packages/rkwarddev/man/rk.JS.var-class.Rd b/packages/rkwarddev/man/rk.JS.var-class.Rd index 04733c3..d61d853 100644 --- a/packages/rkwarddev/man/rk.JS.var-class.Rd +++ b/packages/rkwarddev/man/rk.JS.var-class.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/00_class_02_rk.JS.var.R \docType{class} \name{rk.JS.var-class} \alias{rk.JS.var-class} diff --git a/packages/rkwarddev/man/rk.JS.vars.Rd b/packages/rkwarddev/man/rk.JS.vars.Rd index 39357f8..883a79d 100644 --- a/packages/rkwarddev/man/rk.JS.vars.Rd +++ b/packages/rkwarddev/man/rk.JS.vars.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.JS.vars.R \name{rk.JS.vars} \alias{rk.JS.vars} \title{Define variables in JavaScript code} diff --git a/packages/rkwarddev/man/rk.XML.about.Rd b/packages/rkwarddev/man/rk.XML.about.Rd index 77ceb0f..b3ae2c5 100644 --- a/packages/rkwarddev/man/rk.XML.about.Rd +++ b/packages/rkwarddev/man/rk.XML.about.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.about.R \name{rk.XML.about} \alias{rk.XML.about} \title{Create XML node "about" for RKWard pluginmaps} diff --git a/packages/rkwarddev/man/rk.XML.attribute.Rd b/packages/rkwarddev/man/rk.XML.attribute.Rd index 27e7757..8095c74 100644 --- a/packages/rkwarddev/man/rk.XML.attribute.Rd +++ b/packages/rkwarddev/man/rk.XML.attribute.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.attribute.R \name{rk.XML.attribute} \alias{rk.XML.attribute} \title{Create XML "attribute" node for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.browser.Rd b/packages/rkwarddev/man/rk.XML.browser.Rd index d7d289e..097fec3 100644 --- a/packages/rkwarddev/man/rk.XML.browser.Rd +++ b/packages/rkwarddev/man/rk.XML.browser.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.browser.R \name{rk.XML.browser} \alias{rk.XML.browser} \title{Create XML node "browser" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.cbox.Rd b/packages/rkwarddev/man/rk.XML.cbox.Rd index e619d69..a21502e 100644 --- a/packages/rkwarddev/man/rk.XML.cbox.Rd +++ b/packages/rkwarddev/man/rk.XML.cbox.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.cbox.R \name{rk.XML.cbox} \alias{rk.XML.cbox} \alias{rk.XML.checkbox} diff --git a/packages/rkwarddev/man/rk.XML.code.Rd b/packages/rkwarddev/man/rk.XML.code.Rd index 1b96d7e..4e09999 100644 --- a/packages/rkwarddev/man/rk.XML.code.Rd +++ b/packages/rkwarddev/man/rk.XML.code.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.code.R \name{rk.XML.code} \alias{rk.XML.code} \title{Create XML node "code" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.col.Rd b/packages/rkwarddev/man/rk.XML.col.Rd index 78354cd..a5268c5 100644 --- a/packages/rkwarddev/man/rk.XML.col.Rd +++ b/packages/rkwarddev/man/rk.XML.col.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.col.R \name{rk.XML.col} \alias{rk.XML.col} \title{Create XML node "column" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.component.Rd b/packages/rkwarddev/man/rk.XML.component.Rd index f4209fe..49bbf9c 100644 --- a/packages/rkwarddev/man/rk.XML.component.Rd +++ b/packages/rkwarddev/man/rk.XML.component.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.component.R \name{rk.XML.component} \alias{rk.XML.component} \title{Create XML "component" node for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.components.Rd b/packages/rkwarddev/man/rk.XML.components.Rd index 6bb3fe7..077922c 100644 --- a/packages/rkwarddev/man/rk.XML.components.Rd +++ b/packages/rkwarddev/man/rk.XML.components.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.components.R \name{rk.XML.components} \alias{rk.XML.components} \title{Create XML "components" node for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.connect.Rd b/packages/rkwarddev/man/rk.XML.connect.Rd index 484f5df..ed40f11 100644 --- a/packages/rkwarddev/man/rk.XML.connect.Rd +++ b/packages/rkwarddev/man/rk.XML.connect.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.connect.R \name{rk.XML.connect} \alias{rk.XML.connect} \title{Create XML node "connect" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.context.Rd b/packages/rkwarddev/man/rk.XML.context.Rd index c0ed8fe..2d65fc7 100644 --- a/packages/rkwarddev/man/rk.XML.context.Rd +++ b/packages/rkwarddev/man/rk.XML.context.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.context.R \name{rk.XML.context} \alias{rk.XML.context} \title{Create XML "context" node for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.convert.Rd b/packages/rkwarddev/man/rk.XML.convert.Rd index 0d495b7..b20139c 100644 --- a/packages/rkwarddev/man/rk.XML.convert.Rd +++ b/packages/rkwarddev/man/rk.XML.convert.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.convert.R \name{rk.XML.convert} \alias{rk.XML.convert} \title{Create XML node convert for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.copy.Rd b/packages/rkwarddev/man/rk.XML.copy.Rd index f96fba8..1d269a4 100644 --- a/packages/rkwarddev/man/rk.XML.copy.Rd +++ b/packages/rkwarddev/man/rk.XML.copy.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.copy.R \name{rk.XML.copy} \alias{rk.XML.copy} \title{Create XML copy node for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.dependencies.Rd b/packages/rkwarddev/man/rk.XML.dependencies.Rd index 2304050..5bc3181 100644 --- a/packages/rkwarddev/man/rk.XML.dependencies.Rd +++ b/packages/rkwarddev/man/rk.XML.dependencies.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.dependencies.R \name{rk.XML.dependencies} \alias{rk.XML.dependencies} \title{Create XML node "dependencies" for RKWard pluginmaps} diff --git a/packages/rkwarddev/man/rk.XML.dependency_check.Rd b/packages/rkwarddev/man/rk.XML.dependency_check.Rd index 6859a56..62118bb 100644 --- a/packages/rkwarddev/man/rk.XML.dependency_check.Rd +++ b/packages/rkwarddev/man/rk.XML.dependency_check.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.dependency_check.R \name{rk.XML.dependency_check} \alias{rk.XML.dependency_check} \title{Create XML node "dependency_check" for RKWard pluginmaps} diff --git a/packages/rkwarddev/man/rk.XML.dialog.Rd b/packages/rkwarddev/man/rk.XML.dialog.Rd index 9b6e773..94ea9e1 100644 --- a/packages/rkwarddev/man/rk.XML.dialog.Rd +++ b/packages/rkwarddev/man/rk.XML.dialog.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.dialog.R \name{rk.XML.dialog} \alias{rk.XML.dialog} \title{Create XML dialog section for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.dropdown.Rd b/packages/rkwarddev/man/rk.XML.dropdown.Rd index f3734cd..9e87dcf 100644 --- a/packages/rkwarddev/man/rk.XML.dropdown.Rd +++ b/packages/rkwarddev/man/rk.XML.dropdown.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.dropdown.R \name{rk.XML.dropdown} \alias{rk.XML.dropdown} \title{Create XML node "dropdown" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.embed.Rd b/packages/rkwarddev/man/rk.XML.embed.Rd index a44b3c6..9073564 100644 --- a/packages/rkwarddev/man/rk.XML.embed.Rd +++ b/packages/rkwarddev/man/rk.XML.embed.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.embed.R \name{rk.XML.embed} \alias{rk.XML.embed} \title{Create XML node "embed" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.entry.Rd b/packages/rkwarddev/man/rk.XML.entry.Rd index 0e3599d..613b220 100644 --- a/packages/rkwarddev/man/rk.XML.entry.Rd +++ b/packages/rkwarddev/man/rk.XML.entry.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.entry.R \name{rk.XML.entry} \alias{rk.XML.entry} \title{Create XML "entry" node for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.external.Rd b/packages/rkwarddev/man/rk.XML.external.Rd index 3f10e93..dc78e80 100644 --- a/packages/rkwarddev/man/rk.XML.external.Rd +++ b/packages/rkwarddev/man/rk.XML.external.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.external.R \name{rk.XML.external} \alias{rk.XML.external} \title{Create XML node "external" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.formula.Rd b/packages/rkwarddev/man/rk.XML.formula.Rd index 896a3fd..9a99ee0 100644 --- a/packages/rkwarddev/man/rk.XML.formula.Rd +++ b/packages/rkwarddev/man/rk.XML.formula.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.formula.R \name{rk.XML.formula} \alias{rk.XML.formula} \title{Create XML node "formula" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.frame.Rd b/packages/rkwarddev/man/rk.XML.frame.Rd index 0d0bd46..7b4e492 100644 --- a/packages/rkwarddev/man/rk.XML.frame.Rd +++ b/packages/rkwarddev/man/rk.XML.frame.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.frame.R \name{rk.XML.frame} \alias{rk.XML.frame} \title{Create XML node "frame" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.help.Rd b/packages/rkwarddev/man/rk.XML.help.Rd index 65e3e44..1cb6eba 100644 --- a/packages/rkwarddev/man/rk.XML.help.Rd +++ b/packages/rkwarddev/man/rk.XML.help.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.help.R \name{rk.XML.help} \alias{rk.XML.help} \title{Create XML node "help" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.hierarchy.Rd b/packages/rkwarddev/man/rk.XML.hierarchy.Rd index c55f54c..b8c57ce 100644 --- a/packages/rkwarddev/man/rk.XML.hierarchy.Rd +++ b/packages/rkwarddev/man/rk.XML.hierarchy.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.hierarchy.R \name{rk.XML.hierarchy} \alias{rk.XML.hierarchy} \title{Create XML hierarchy section for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.include.Rd b/packages/rkwarddev/man/rk.XML.include.Rd index 019bd53..e0c59e2 100644 --- a/packages/rkwarddev/man/rk.XML.include.Rd +++ b/packages/rkwarddev/man/rk.XML.include.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.include.R \name{rk.XML.include} \alias{rk.XML.include} \title{Create XML node "include" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.input.Rd b/packages/rkwarddev/man/rk.XML.input.Rd index 117c316..0299f93 100644 --- a/packages/rkwarddev/man/rk.XML.input.Rd +++ b/packages/rkwarddev/man/rk.XML.input.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.input.R \name{rk.XML.input} \alias{rk.XML.input} \title{Create XML node "input" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.insert.Rd b/packages/rkwarddev/man/rk.XML.insert.Rd index 22dafa8..9fb199b 100644 --- a/packages/rkwarddev/man/rk.XML.insert.Rd +++ b/packages/rkwarddev/man/rk.XML.insert.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.insert.R \name{rk.XML.insert} \alias{rk.XML.insert} \title{Create XML node "insert" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.logic.Rd b/packages/rkwarddev/man/rk.XML.logic.Rd index a04f3f2..fb4e618 100644 --- a/packages/rkwarddev/man/rk.XML.logic.Rd +++ b/packages/rkwarddev/man/rk.XML.logic.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.logic.R \name{rk.XML.logic} \alias{rk.XML.logic} \title{Create XML logic section for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.matrix.Rd b/packages/rkwarddev/man/rk.XML.matrix.Rd index a3492b9..6edb732 100644 --- a/packages/rkwarddev/man/rk.XML.matrix.Rd +++ b/packages/rkwarddev/man/rk.XML.matrix.Rd @@ -1,13 +1,15 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.matrix.R \name{rk.XML.matrix} \alias{rk.XML.matrix} \title{Create XML "matrix" node for RKWard plugins} \usage{ rk.XML.matrix(label, mode = "real", rows = 2, columns = 2, min = NULL, - max = NULL, allow_missings = FALSE, allow_user_resize_columns = TRUE, - allow_user_resize_rows = TRUE, fixed_width = FALSE, - fixed_height = FALSE, horiz_headers = NULL, vert_headers = NULL, - id.name = "auto", help = NULL, component = rk.get.comp(), i18n = NULL) + max = NULL, min_rows = 0, min_columns = 0, allow_missings = FALSE, + allow_user_resize_columns = TRUE, allow_user_resize_rows = TRUE, + fixed_width = FALSE, fixed_height = FALSE, horiz_headers = NULL, + vert_headers = NULL, id.name = "auto", help = NULL, + component = rk.get.comp(), i18n = NULL) } \arguments{ \item{label}{Character string, a label for the matrix.} @@ -26,6 +28,10 @@ smallest representable value.} \item{max}{Maximum acceptable value (if \code{type} is "integer" or "real"). Defaults to the largest representable value.} +\item{min_rows}{Minimum number of rows, matrix will refuse shrink below this size.} + +\item{min_columns}{Minimum number of columns, matrix will refuse shrink below this size.} + \item{allow_missings}{Logical, whether missing (empty) values are allowed in the matrix (if \code{type} is "string").} @@ -38,9 +44,10 @@ on the rightmost (inactive) cells.} bottommost (inactive) cells.} \item{fixed_width}{Logical, - 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").} + 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").} \item{fixed_height}{Logical, force the GUI element to stay at its initial height. Do not use in diff --git a/packages/rkwarddev/man/rk.XML.menu.Rd b/packages/rkwarddev/man/rk.XML.menu.Rd index be71c56..24344bb 100644 --- a/packages/rkwarddev/man/rk.XML.menu.Rd +++ b/packages/rkwarddev/man/rk.XML.menu.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.menu.R \name{rk.XML.menu} \alias{rk.XML.menu} \title{Create XML "menu" node for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.option.Rd b/packages/rkwarddev/man/rk.XML.option.Rd index 591abd2..2183af7 100644 --- a/packages/rkwarddev/man/rk.XML.option.Rd +++ b/packages/rkwarddev/man/rk.XML.option.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.option.R \name{rk.XML.option} \alias{rk.XML.option} \title{Create XML node "option" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.optioncolumn.Rd b/packages/rkwarddev/man/rk.XML.optioncolumn.Rd index 47f9e82..f52d40f 100644 --- a/packages/rkwarddev/man/rk.XML.optioncolumn.Rd +++ b/packages/rkwarddev/man/rk.XML.optioncolumn.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.optioncolumn.R \name{rk.XML.optioncolumn} \alias{rk.XML.optioncolumn} \title{Create XML node "optioncolumn" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.optiondisplay.Rd b/packages/rkwarddev/man/rk.XML.optiondisplay.Rd index 11c942c..d682beb 100644 --- a/packages/rkwarddev/man/rk.XML.optiondisplay.Rd +++ b/packages/rkwarddev/man/rk.XML.optiondisplay.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.optiondisplay.R \name{rk.XML.optiondisplay} \alias{rk.XML.optiondisplay} \title{Create XML node "optiondisplay" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.optionset.Rd b/packages/rkwarddev/man/rk.XML.optionset.Rd index 9049051..67f3dc8 100644 --- a/packages/rkwarddev/man/rk.XML.optionset.Rd +++ b/packages/rkwarddev/man/rk.XML.optionset.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.optionset.R \name{rk.XML.optionset} \alias{rk.XML.optionset} \title{Create XML node "optionset" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.page.Rd b/packages/rkwarddev/man/rk.XML.page.Rd index d849994..da5a081 100644 --- a/packages/rkwarddev/man/rk.XML.page.Rd +++ b/packages/rkwarddev/man/rk.XML.page.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.page.R \name{rk.XML.page} \alias{rk.XML.page} \title{Create XML "page" node for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.plugin.Rd b/packages/rkwarddev/man/rk.XML.plugin.Rd index df3e2ce..bb1caa2 100644 --- a/packages/rkwarddev/man/rk.XML.plugin.Rd +++ b/packages/rkwarddev/man/rk.XML.plugin.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.plugin.R \name{rk.XML.plugin} \alias{rk.XML.plugin} \title{Create XML document for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.pluginmap.Rd b/packages/rkwarddev/man/rk.XML.pluginmap.Rd index cbca01e..82d64cb 100644 --- a/packages/rkwarddev/man/rk.XML.pluginmap.Rd +++ b/packages/rkwarddev/man/rk.XML.pluginmap.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.pluginmap.R \name{rk.XML.pluginmap} \alias{rk.XML.pluginmap} \title{Write a pluginmap file for RKWard} @@ -58,15 +59,16 @@ that it was generated by \code{rkwarddev} and changes should be done to the scri See \code{\link[rkwarddev:rk.XML.dependencies]{rk.XML.dependencies}} for details. Skipped if \code{NULL}.} \item{namespace}{Character string, the namespace attribute of the \code{<document>} node, - defaults to the plugin name (which you probably shouldn't touch...)} + defaults to the plugin name (which you probably shouldn't touch...). +RKWard's internal plugins should use the namespace \code{rkward}. This is taken care of by \code{\link[rkwarddev::rk.plugin.skeleton]{rk.plugin.skeleton}} +if you set \code{internal=TRUE}.} \item{priority}{Character string, the priority attribute of the \code{<document>} node. Must be either "hidden", "low", "medium", or "high", defaults to "medium".} -\item{id.name}{Character string, a unique ID for this plugin element. -If \code{"auto"} and a label was provided, - an ID will be generated automatically from the label.} +\item{id.name}{Character string, a unique ID for this plugin element. If \code{"auto"}, + an ID will be generated automatically from \code{name}.} } \value{ An object of class \code{XiMpLe.node}. diff --git a/packages/rkwarddev/man/rk.XML.preview.Rd b/packages/rkwarddev/man/rk.XML.preview.Rd index 7c20061..40a7ac3 100644 --- a/packages/rkwarddev/man/rk.XML.preview.Rd +++ b/packages/rkwarddev/man/rk.XML.preview.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.preview.R \name{rk.XML.preview} \alias{rk.XML.preview} \title{Create XML node "preview" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.radio.Rd b/packages/rkwarddev/man/rk.XML.radio.Rd index e8595b6..927e61c 100644 --- a/packages/rkwarddev/man/rk.XML.radio.Rd +++ b/packages/rkwarddev/man/rk.XML.radio.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.radio.R \name{rk.XML.radio} \alias{rk.XML.radio} \title{Create XML node "radio" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.require.Rd b/packages/rkwarddev/man/rk.XML.require.Rd index 836a1e4..3d262e7 100644 --- a/packages/rkwarddev/man/rk.XML.require.Rd +++ b/packages/rkwarddev/man/rk.XML.require.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.require.R \name{rk.XML.require} \alias{rk.XML.require} \title{Create XML "require" node for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.row.Rd b/packages/rkwarddev/man/rk.XML.row.Rd index 549bda8..e14a36c 100644 --- a/packages/rkwarddev/man/rk.XML.row.Rd +++ b/packages/rkwarddev/man/rk.XML.row.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.row.R \name{rk.XML.row} \alias{rk.XML.row} \title{Create XML node "row" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.saveobj.Rd b/packages/rkwarddev/man/rk.XML.saveobj.Rd index 6370d3a..a4b192c 100644 --- a/packages/rkwarddev/man/rk.XML.saveobj.Rd +++ b/packages/rkwarddev/man/rk.XML.saveobj.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.saveobj.R \name{rk.XML.saveobj} \alias{rk.XML.saveobj} \title{Create XML node "saveobject" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.select.Rd b/packages/rkwarddev/man/rk.XML.select.Rd index 8206814..acdcf22 100644 --- a/packages/rkwarddev/man/rk.XML.select.Rd +++ b/packages/rkwarddev/man/rk.XML.select.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.select.R \name{rk.XML.select} \alias{rk.XML.select} \title{Create XML node "select" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.set.Rd b/packages/rkwarddev/man/rk.XML.set.Rd index 215dc4d..4893c9f 100644 --- a/packages/rkwarddev/man/rk.XML.set.Rd +++ b/packages/rkwarddev/man/rk.XML.set.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.set.R \name{rk.XML.set} \alias{rk.XML.set} \title{Create XML node "set" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.snippet.Rd b/packages/rkwarddev/man/rk.XML.snippet.Rd index c517dd1..c8313a5 100644 --- a/packages/rkwarddev/man/rk.XML.snippet.Rd +++ b/packages/rkwarddev/man/rk.XML.snippet.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.snippet.R \name{rk.XML.snippet} \alias{rk.XML.snippet} \title{Create XML "snippet" node for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.snippets.Rd b/packages/rkwarddev/man/rk.XML.snippets.Rd index 5d8ad23..7f52b81 100644 --- a/packages/rkwarddev/man/rk.XML.snippets.Rd +++ b/packages/rkwarddev/man/rk.XML.snippets.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.snippets.R \name{rk.XML.snippets} \alias{rk.XML.snippets} \title{Create XML "snippets" node for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.spinbox.Rd b/packages/rkwarddev/man/rk.XML.spinbox.Rd index 448356d..f0f9d3c 100644 --- a/packages/rkwarddev/man/rk.XML.spinbox.Rd +++ b/packages/rkwarddev/man/rk.XML.spinbox.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.spinbox.R \name{rk.XML.spinbox} \alias{rk.XML.spinbox} \title{Create XML node "spinbox" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.stretch.Rd b/packages/rkwarddev/man/rk.XML.stretch.Rd index 0cc6c5d..2d0ecf8 100644 --- a/packages/rkwarddev/man/rk.XML.stretch.Rd +++ b/packages/rkwarddev/man/rk.XML.stretch.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.stretch.R \name{rk.XML.stretch} \alias{rk.XML.stretch} \title{Create XML empty node "stretch" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.switch.Rd b/packages/rkwarddev/man/rk.XML.switch.Rd index 24ff6e0..74d7814 100644 --- a/packages/rkwarddev/man/rk.XML.switch.Rd +++ b/packages/rkwarddev/man/rk.XML.switch.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.switch.R \name{rk.XML.switch} \alias{rk.XML.switch} \title{Create XML node "switch" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.tabbook.Rd b/packages/rkwarddev/man/rk.XML.tabbook.Rd index a0c75b4..2e1cce7 100644 --- a/packages/rkwarddev/man/rk.XML.tabbook.Rd +++ b/packages/rkwarddev/man/rk.XML.tabbook.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.tabbook.R \name{rk.XML.tabbook} \alias{rk.XML.tabbook} \title{Create XML node "tabbook" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.text.Rd b/packages/rkwarddev/man/rk.XML.text.Rd index 2e0ee2b..362caef 100644 --- a/packages/rkwarddev/man/rk.XML.text.Rd +++ b/packages/rkwarddev/man/rk.XML.text.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.text.R \name{rk.XML.text} \alias{rk.XML.text} \title{Create XML node "text" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.values.Rd b/packages/rkwarddev/man/rk.XML.values.Rd index ceed367..26899fd 100644 --- a/packages/rkwarddev/man/rk.XML.values.Rd +++ b/packages/rkwarddev/man/rk.XML.values.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.values.R \name{rk.XML.values} \alias{rk.XML.values} \title{Create a value selector for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.valueselector.Rd b/packages/rkwarddev/man/rk.XML.valueselector.Rd index c44d223..f7736b9 100644 --- a/packages/rkwarddev/man/rk.XML.valueselector.Rd +++ b/packages/rkwarddev/man/rk.XML.valueselector.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.valueselector.R \name{rk.XML.valueselector} \alias{rk.XML.valueselector} \title{Create node "valueselector" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.valueslot.Rd b/packages/rkwarddev/man/rk.XML.valueslot.Rd index 06f1b57..0ab3a49 100644 --- a/packages/rkwarddev/man/rk.XML.valueslot.Rd +++ b/packages/rkwarddev/man/rk.XML.valueslot.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.valueslot.R \name{rk.XML.valueslot} \alias{rk.XML.valueslot} \title{Create a XML node "valueslot" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.vars.Rd b/packages/rkwarddev/man/rk.XML.vars.Rd index 9720ba0..1213761 100644 --- a/packages/rkwarddev/man/rk.XML.vars.Rd +++ b/packages/rkwarddev/man/rk.XML.vars.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.vars.R \name{rk.XML.vars} \alias{rk.XML.vars} \title{Create a variable selector for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.varselector.Rd b/packages/rkwarddev/man/rk.XML.varselector.Rd index 60367d7..acc249f 100644 --- a/packages/rkwarddev/man/rk.XML.varselector.Rd +++ b/packages/rkwarddev/man/rk.XML.varselector.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.varselector.R \name{rk.XML.varselector} \alias{rk.XML.varselector} \title{Create node "varselector" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.varslot.Rd b/packages/rkwarddev/man/rk.XML.varslot.Rd index 910b3f3..e59a4ea 100644 --- a/packages/rkwarddev/man/rk.XML.varslot.Rd +++ b/packages/rkwarddev/man/rk.XML.varslot.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.varslot.R \name{rk.XML.varslot} \alias{rk.XML.varslot} \title{Create a XML node "varslot" for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.XML.wizard.Rd b/packages/rkwarddev/man/rk.XML.wizard.Rd index b694cae..22607bd 100644 --- a/packages/rkwarddev/man/rk.XML.wizard.Rd +++ b/packages/rkwarddev/man/rk.XML.wizard.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.XML.wizard.R \name{rk.XML.wizard} \alias{rk.XML.wizard} \title{Create XML wizard section for RKWard plugins} diff --git a/packages/rkwarddev/man/rk.build.plugin.Rd b/packages/rkwarddev/man/rk.build.plugin.Rd index e5d4079..0cb3857 100644 --- a/packages/rkwarddev/man/rk.build.plugin.Rd +++ b/packages/rkwarddev/man/rk.build.plugin.Rd @@ -1,4 +1,5 @@ -% Generated by roxygen2 (4.0.2): do not edit by hand +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/rk.build.plugin.R \name{rk.build.plugin} \alias{rk.build.plugin} \title{Build an RKWard plugin package} diff --git a/packages/rkwarddev/man/rk.comment.Rd b/packages/rkwarddev/man/rk.comment.Rd index f0d9564..9f2a412 100644 --- a/packages/rkwarddev/man/rk.comment.Rd +++ b/packages/rkwarddev/man/rk.comment.Rd @@ -1,4 +1,5 @@ -% Generated by r... [truncated message content] |
From: Yuri C. <yu...@uk...> - 2015-02-01 10:40:46
|
Git commit c7dacbf3c39c38f2167224051dec88cd7d0a6db1 by Yuri Chornoivan. Committed on 01/02/2015 at 10:40. Pushed by yurchor into branch 'master'. Fix various minor typos M +1 -1 rkward/plugins/distributions/binomial.rkh M +1 -1 rkward/plugins/distributions/clt/plot_clt_help_snippets.xml M +1 -1 rkward/plugins/distributions/clt/plot_negbinomial_clt.xml M +4 -4 rkward/plugins/distributions/dist_help_snippets.xml M +1 -1 rkward/plugins/distributions/plot_dist_common_snippets.xml M +3 -3 rkward/plugins/distributions/plot_negbinomial_distribution.rkh M +1 -1 rkward/plugins/distributions/plot_negbinomial_distribution.xml M +1 -1 rkward/plugins/distributions/weibull.js http://commits.kde.org/rkward/c7dacbf3c39c38f2167224051dec88cd7d0a6db1 diff --git a/rkward/plugins/distributions/binomial.rkh b/rkward/plugins/distributions/binomial.rkh index 0a72d8f..5e9056c 100644 --- a/rkward/plugins/distributions/binomial.rkh +++ b/rkward/plugins/distributions/binomial.rkh @@ -4,7 +4,7 @@ <include file="dist_help_snippets.xml"/> </snippets> <summary> - Provides a calculator for probabilities, quantiles, and densities in the binonmial distribution. + Provides a calculator for probabilities, quantiles, and densities in the binomial distribution. Note: For the binomial distribution, quantiles can be interpreted as number of successes in the given number of trials. </summary> diff --git a/rkward/plugins/distributions/clt/plot_clt_help_snippets.xml b/rkward/plugins/distributions/clt/plot_clt_help_snippets.xml index 3b0232c..6b85f5e 100644 --- a/rkward/plugins/distributions/clt/plot_clt_help_snippets.xml +++ b/rkward/plugins/distributions/clt/plot_clt_help_snippets.xml @@ -20,7 +20,7 @@ <setting id="plotoptions">Various plot options.</setting> <setting id="preview">Preview button.</setting> <caption id="tab_histoptions"/> - <setting id="histogram_opt">The 'Frequency' checkbox is unavailable because, in this situation, drawing the histogram with <i>freq=TRUE</i> doesnot make sense. Also, since histogram is the main plot, 'Add to current plot' checkbox has also been disabled. See RKWard help on <link href="rkward://component/histogram_options"/> for other histogram centric details.</setting> + <setting id="histogram_opt">The 'Frequency' checkbox is unavailable because, in this situation, drawing the histogram with <i>freq=TRUE</i> does not make sense. Also, since histogram is the main plot, 'Add to current plot' checkbox has also been disabled. See RKWard help on <link href="rkward://component/histogram_options"/> for other histogram centric details.</setting> <caption id="tab_distfunction"/> <setting id="dist_stepfun" label="Stepfunction options">See the help on the <link href="rkward://component/plot_stepfun_options"/> plugin. The 'Add to current plot' option is unavailable.</setting> </settings> diff --git a/rkward/plugins/distributions/clt/plot_negbinomial_clt.xml b/rkward/plugins/distributions/clt/plot_negbinomial_clt.xml index ae87e6d..b500cae 100644 --- a/rkward/plugins/distributions/clt/plot_negbinomial_clt.xml +++ b/rkward/plugins/distributions/clt/plot_negbinomial_clt.xml @@ -13,7 +13,7 @@ <spinbox default_precision="1" type="real" id="mu" initial="4" min="0.01" label="Mean (mu)" /> </column> <column> - <radio id="param" label="Type of Parameterization" > + <radio id="param" label="Type of Parametrization" > <option value="pprob" label="Success probability" /> <option value="pmu" label="Mean (mu)" /> </radio> diff --git a/rkward/plugins/distributions/dist_help_snippets.xml b/rkward/plugins/distributions/dist_help_snippets.xml index c4736c9..59e5f8c 100644 --- a/rkward/plugins/distributions/dist_help_snippets.xml +++ b/rkward/plugins/distributions/dist_help_snippets.xml @@ -1,15 +1,15 @@ <document> <snippet id="dialog_settings"> <caption title="Generic settings"/> - <setting id="mode">Specify the quantitiy to be calculated (probabilites, densities, or quantiles), and the quantity given (probabilities or quantiles)</setting> - <setting id="q">When calculating densities or probabilites, specify one or more quantiles. If this setting is left empty, a sequence of evenly spaced quantiles will be used, instead.</setting> + <setting id="mode">Specify the quantity to be calculated (probabilities, densities, or quantiles), and the quantity given (probabilities or quantiles)</setting> + <setting id="q">When calculating densities or probabilities, specify one or more quantiles. If this setting is left empty, a sequence of evenly spaced quantiles will be used, instead.</setting> <setting id="p">When calculating quantiles, specify one or more probabilities, optionally logarithmic (see below). If this setting is left empty, a sequence sequence of evenly spaced (log) probabilities will be used, instead.</setting> - <setting id="logp">When calculating probabilities, return these as log (p). When specifying probabilites, these are supplied as log (p).</setting> + <setting id="logp">When calculating probabilities, return these as log (p). When specifying probabilities, these are supplied as log (p).</setting> <setting id="logd">When calculating densities, return these as log (d).</setting> <setting id="lower">If checked (the default) probabilities are P[X ≤ x]. Otherwise (upper tail) probabilities are P[X > x]</setting> <caption title="Distribution specific settings"/> </snippet> <snippet id="dialog_usage"> - <usage>Select the desired mode of operation, then specify the values of interest. The input values (quantiles or probabilies) can be left empty, in which case a short sequence of evenly spaced values will be filled in, automatically.</usage> + <usage>Select the desired mode of operation, then specify the values of interest. The input values (quantiles or probabilities) can be left empty, in which case a short sequence of evenly spaced values will be filled in, automatically.</usage> </snippet> </document> diff --git a/rkward/plugins/distributions/plot_dist_common_snippets.xml b/rkward/plugins/distributions/plot_dist_common_snippets.xml index ebe0764..91d8214 100644 --- a/rkward/plugins/distributions/plot_dist_common_snippets.xml +++ b/rkward/plugins/distributions/plot_dist_common_snippets.xml @@ -39,7 +39,7 @@ </snippet> <snippet id="general_usage_help"> <usage> - Choose appropriate values for the various parameters of the distribution and select the type of function. The "Submit" button will export the plot to the "Output" window. To dynamically visualise the plot check the "Preview" box. + Choose appropriate values for the various parameters of the distribution and select the type of function. The "Submit" button will export the plot to the "Output" window. To dynamically visualize the plot check the "Preview" box. </usage> </snippet> <snippet id="density_help"> diff --git a/rkward/plugins/distributions/plot_negbinomial_distribution.rkh b/rkward/plugins/distributions/plot_negbinomial_distribution.rkh index 5a2542c..d017ef3 100644 --- a/rkward/plugins/distributions/plot_negbinomial_distribution.rkh +++ b/rkward/plugins/distributions/plot_negbinomial_distribution.rkh @@ -13,11 +13,11 @@ Density and distribution function plots for the Negative Binomial distribution. <settings> <insert snippet="density_help"/> <insert snippet="discont_range_help"/> - <setting id="size_trial">This is the <i>size</i> parameter when the 'probability' form of the parameterisation is used. This is always a non-negative integer. See R reference on Negative Binomial distribution.</setting> - <setting id="size_disp">This is the <i>size</i> parameter when the 'mu' form of the parameterisation is used. This is a non-negative real number. See R reference on Negative Binomial distribution.</setting> + <setting id="size_trial">This is the <i>size</i> parameter when the 'probability' form of the parametrization is used. This is always a non-negative integer. See R reference on Negative Binomial distribution.</setting> + <setting id="size_disp">This is the <i>size</i> parameter when the 'mu' form of the parametrization is used. This is a non-negative real number. See R reference on Negative Binomial distribution.</setting> <setting id="prob">See R reference on Negative Binomial distribution.</setting> <setting id="mu">See R reference on Negative Binomial distribution.</setting> - <setting id="param">The type of the parameterization to be used. See R reference on Negative Binomial distribution.</setting> + <setting id="param">The type of the parametrization to be used. See R reference on Negative Binomial distribution.</setting> <insert snippet="common_options_help"/> </settings> diff --git a/rkward/plugins/distributions/plot_negbinomial_distribution.xml b/rkward/plugins/distributions/plot_negbinomial_distribution.xml index 59db354..a6c32f3 100644 --- a/rkward/plugins/distributions/plot_negbinomial_distribution.xml +++ b/rkward/plugins/distributions/plot_negbinomial_distribution.xml @@ -29,7 +29,7 @@ <spinbox default_precision="2" type="real" id="mu" initial="4" min="0.01" label="Mean (alternate parameter, mu)" /> </column> <column> - <radio id="param" label="Type of Parameterization" > + <radio id="param" label="Type of Parametrization" > <option value="pprob" label="Success probability" /> <option value="pmu" label="Mean (mu)" /> </radio> diff --git a/rkward/plugins/distributions/weibull.js b/rkward/plugins/distributions/weibull.js index dd74d2c..32c569e 100755 --- a/rkward/plugins/distributions/weibull.js +++ b/rkward/plugins/distributions/weibull.js @@ -1,5 +1,5 @@ include ("dist_common.js"); function getDistSpecifics () { - return initDistSpecifics (i18n ('Weilbull distribution'), 'weibull', ["shape", "scale"], [0, undefined], continuous); + return initDistSpecifics (i18n ('Weibull distribution'), 'weibull', ["shape", "scale"], [0, undefined], continuous); } |
From: Yuri C. <yu...@uk...> - 2015-02-01 07:49:19
|
Git commit 1491c56dd938f5831e58edef33f8e555631f4f6b by Yuri Chornoivan. Committed on 01/02/2015 at 07:48. Pushed by yurchor into branch 'master'. Do not choke on lambdas M +1 -1 scripts/update_plugin_messages.py http://commits.kde.org/rkward/1491c56dd938f5831e58edef33f8e555631f4f6b diff --git a/scripts/update_plugin_messages.py b/scripts/update_plugin_messages.py index ce0ee06..18cb068 100755 --- a/scripts/update_plugin_messages.py +++ b/scripts/update_plugin_messages.py @@ -148,7 +148,7 @@ def quote (text): try: text = text.decode ('utf-8', 'ignore') except: - print ("Python has trouble decoding this text: " + text) + print ("Python has trouble decoding this text: " + text.encode('utf-8')) text = HTMLParser.HTMLParser ().unescape (text) # unescape character entities, Qt does so while parsing the xml return "\"" + text.replace ("\\", "\\\\").replace ("\"", "\\\"") + "\"" |
From: Thomas F. <tho...@ru...> - 2015-01-31 17:16:10
|
Git commit 8a748bc54ea04b76dd5e1579072ed29a0c263ead by Thomas Friedrichsmeier. Committed on 31/01/2015 at 17:06. Pushed by tfry into branch 'master'. Extract messages from distributions.pluginmap. Hooray: This should finally cover all messages! M +2 -0 Messages.sh http://commits.kde.org/rkward/8a748bc54ea04b76dd5e1579072ed29a0c263ead diff --git a/Messages.sh b/Messages.sh index 2c200a5..401014d 100755 --- a/Messages.sh +++ b/Messages.sh @@ -22,4 +22,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/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 +# extract messages from distribution plugins: >> rkward__distributions.pot +python scripts/update_plugin_messages.py --extract-only --outdir=$podir rkward/plugins/distributions.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-31 17:16:07
|
Git commit 91cba89c82b00fca89d0bc5605045c00ef58d8d8 by Thomas Friedrichsmeier. Committed on 31/01/2015 at 17:12. Pushed by tfry into branch 'master'. Complete instructions M +13 -4 i18n/README.translations http://commits.kde.org/rkward/91cba89c82b00fca89d0bc5605045c00ef58d8d8 diff --git a/i18n/README.translations b/i18n/README.translations index b9ab6a3..5130f6f 100644 --- a/i18n/README.translations +++ b/i18n/README.translations @@ -13,11 +13,20 @@ links where to find the most recent, and authoritative version of each .po file. If you have any questions or concerns about the process, please contact us on the rkward-devel mailing list. -If all you want is a quick way to pull translations from KDE l10n, use ../scripts/SCRIPT_TO_BE_WRITTEN (only -in our git repository, not in source releases). +If all you want is a quick way to pull translations from KDE l10n, use one of: +* scripts/import_translations.py [xx] + (where the optional parameter xx is your language code, such as "de"; script to be found in our git + repository, only, not in source releases). +* git clone git://anongit.kde.org/scratch/tfry/rkward-po-export i18n/po + (this is much faster in case you want to fetch/build _all_ translations) === Developers === -- Synchronize translations from KDE l10n to git using ../scripts/SCRIPT_TO_BE_WRITTEN . +- Synchronize translations from KDE l10n to git like this: + 1. Clone (or update) the existing translation export repo: + > git clone git://anongit.kde.org/scratch/tfry/rkward-po-export i18n/po + 2. Run + > scripts/import_translations.py + (without language arg) to fetch updates + 3. git commit & push in the export repo. - For dealing with plugin messages, read the i18n-chapter in "Introduction to writing plugins for RKWard". - |
From: Thomas F. <tho...@ru...> - 2015-01-31 16:33:02
|
Git commit b25285fb92331223c265767af6b4787ec10d8703 by Thomas Friedrichsmeier. Committed on 31/01/2015 at 16:31. Pushed by tfry into branch 'master'. Implement Number of observations control as a snippet. Slightly more consistent, and silences some warnings during message extraction. M +1 -1 rkward/plugins/distributions/normal.rkh M +1 -1 rkward/plugins/distributions/plot_beta_distribution.xml M +1 -1 rkward/plugins/distributions/plot_cauchy_distribution.xml M +1 -1 rkward/plugins/distributions/plot_chi_squared_distribution.xml M +3 -0 rkward/plugins/distributions/plot_dist_common_snippets.xml M +1 -1 rkward/plugins/distributions/plot_exponential_distribution.xml M +1 -1 rkward/plugins/distributions/plot_f_distribution.xml M +1 -1 rkward/plugins/distributions/plot_gamma_distribution.xml M +1 -1 rkward/plugins/distributions/plot_logistic_distribution.xml M +1 -1 rkward/plugins/distributions/plot_lognormal_distribution.xml M +1 -1 rkward/plugins/distributions/plot_normal_distribution.xml M +2 -2 rkward/plugins/distributions/plot_t_distribution.xml M +1 -1 rkward/plugins/distributions/plot_tukey_distribution.xml M +1 -1 rkward/plugins/distributions/plot_uniform_distribution.xml M +1 -1 rkward/plugins/distributions/plot_weibull_distribution.xml http://commits.kde.org/rkward/b25285fb92331223c265767af6b4787ec10d8703 diff --git a/rkward/plugins/distributions/normal.rkh b/rkward/plugins/distributions/normal.rkh index c41441a..2dcf3cf 100644 --- a/rkward/plugins/distributions/normal.rkh +++ b/rkward/plugins/distributions/normal.rkh @@ -10,7 +10,7 @@ <settings> <insert snippet="dialog_settings"/> <setting id="mean">Mean.</setting> - <setting id="prob">Standard deviation.</setting> + <setting id="sd">Standard deviation.</setting> </settings> <related> <ul> diff --git a/rkward/plugins/distributions/plot_beta_distribution.xml b/rkward/plugins/distributions/plot_beta_distribution.xml index 649a2dc..09c4204 100644 --- a/rkward/plugins/distributions/plot_beta_distribution.xml +++ b/rkward/plugins/distributions/plot_beta_distribution.xml @@ -7,7 +7,7 @@ </logic> <snippets> <snippet id="range_options"> - <spinbox type="integer" id="n" initial="100" min="1" label="Number of Observations" /> + <insert snippet="num_observations"/> <frame label="Range" > <spinbox default_precision="2" type="real" id="min" initial="0.00" min="0" max="1" label="Lower quantile" /> <spinbox default_precision="2" type="real" id="max" initial="1.00" min="0" max="1" label="Upper quantile" /> diff --git a/rkward/plugins/distributions/plot_cauchy_distribution.xml b/rkward/plugins/distributions/plot_cauchy_distribution.xml index bd54480..db7debe 100644 --- a/rkward/plugins/distributions/plot_cauchy_distribution.xml +++ b/rkward/plugins/distributions/plot_cauchy_distribution.xml @@ -7,7 +7,7 @@ </logic> <snippets> <snippet id="range_options"> - <spinbox type="integer" id="n" min="2" initial="100" label="Number of Observations" /> + <insert snippet="num_observations"/> <frame label="Range" > <spinbox default_precision="2" type="real" id="min" initial="-3.29" label="Lower quantile" /> <spinbox default_precision="2" type="real" id="max" initial="3.29" label="Upper quantile" /> diff --git a/rkward/plugins/distributions/plot_chi_squared_distribution.xml b/rkward/plugins/distributions/plot_chi_squared_distribution.xml index d3e1c8d..2165cfe 100644 --- a/rkward/plugins/distributions/plot_chi_squared_distribution.xml +++ b/rkward/plugins/distributions/plot_chi_squared_distribution.xml @@ -7,7 +7,7 @@ </logic> <snippets> <snippet id="range_options"> - <spinbox type="integer" id="n" initial="100" min="1" label="Number of Observations" /> + <insert snippet="num_observations"/> <frame label="Range" > <spinbox default_precision="2" type="real" id="min" min="0" initial="0.30" label="Lower quantile" /> <spinbox default_precision="2" type="real" id="max" min="0" initial="24.10" label="Upper quantile" /> diff --git a/rkward/plugins/distributions/plot_dist_common_snippets.xml b/rkward/plugins/distributions/plot_dist_common_snippets.xml index d43720d..ebe0764 100644 --- a/rkward/plugins/distributions/plot_dist_common_snippets.xml +++ b/rkward/plugins/distributions/plot_dist_common_snippets.xml @@ -57,4 +57,7 @@ <setting id="min">Smallest value at which the function is to be plotted.</setting> <setting id="max">Largest value at which the function is to be plotted. Since this is a discrete distribution the function will be evaluated at all the integers between the lower quantile and the upper quantile (inclusive of the end points).</setting> </snippet> + <snippet id="num_observations"> + <spinbox type="integer" id="n" initial="100" min="1" label="Number of Observations" /> + </snippet> </document> \ No newline at end of file diff --git a/rkward/plugins/distributions/plot_exponential_distribution.xml b/rkward/plugins/distributions/plot_exponential_distribution.xml index 32e2dde..29fe3a3 100644 --- a/rkward/plugins/distributions/plot_exponential_distribution.xml +++ b/rkward/plugins/distributions/plot_exponential_distribution.xml @@ -7,7 +7,7 @@ </logic> <snippets> <snippet id="range_options"> - <spinbox type="integer" id="n" min="2" initial="100" label="Number of Observations" /> + <insert snippet="num_observations"/> <frame label="Range" > <spinbox default_precision="2" type="real" id="min" initial="0" min="0" label="Lower quantile" /> <spinbox default_precision="2" type="real" id="max" initial="10" min="0" label="Upper quantile" /> diff --git a/rkward/plugins/distributions/plot_f_distribution.xml b/rkward/plugins/distributions/plot_f_distribution.xml index fe62069..3351d46 100644 --- a/rkward/plugins/distributions/plot_f_distribution.xml +++ b/rkward/plugins/distributions/plot_f_distribution.xml @@ -7,7 +7,7 @@ </logic> <snippets> <snippet id="range_options"> - <spinbox type="integer" id="n" initial="100" min="1" label="Number of Observations" /> + <insert snippet="num_observations"/> <frame label="Range" > <spinbox default_precision="2" type="real" min="0.001" id="min" initial="0.001" label="Lower quantile" /> <spinbox default_precision="2" type="real" min="0.001" id="max" initial="25" label="Upper quantile" /> diff --git a/rkward/plugins/distributions/plot_gamma_distribution.xml b/rkward/plugins/distributions/plot_gamma_distribution.xml index 9e06a5e..baff42c 100644 --- a/rkward/plugins/distributions/plot_gamma_distribution.xml +++ b/rkward/plugins/distributions/plot_gamma_distribution.xml @@ -7,7 +7,7 @@ </logic> <snippets> <snippet id="range_options"> - <spinbox type="integer" id="n" min="2" initial="100" label="Number of Observations" /> + <insert snippet="num_observations"/> <frame label="Range" > <spinbox default_precision="2" type="real" id="min" initial="0.01" min="0.01" label="Lower quantile" /> <spinbox default_precision="2" type="real" id="max" initial="4.6" min="0.02" label="Upper quantile" /> diff --git a/rkward/plugins/distributions/plot_logistic_distribution.xml b/rkward/plugins/distributions/plot_logistic_distribution.xml index f942cb2..e3bcb3c 100644 --- a/rkward/plugins/distributions/plot_logistic_distribution.xml +++ b/rkward/plugins/distributions/plot_logistic_distribution.xml @@ -7,7 +7,7 @@ </logic> <snippets> <snippet id="range_options"> - <spinbox type="integer" id="n" min="2" initial="100" label="Number of Observations" /> + <insert snippet="num_observations"/> <frame label="Range" > <spinbox default_precision="2" type="real" id="min" initial="-3.29" label="Lower quantile" /> <spinbox default_precision="2" type="real" id="max" initial="3.29" label="Upper quantile" /> diff --git a/rkward/plugins/distributions/plot_lognormal_distribution.xml b/rkward/plugins/distributions/plot_lognormal_distribution.xml index f749b81..62db829 100644 --- a/rkward/plugins/distributions/plot_lognormal_distribution.xml +++ b/rkward/plugins/distributions/plot_lognormal_distribution.xml @@ -7,7 +7,7 @@ </logic> <snippets> <snippet id="range_options"> - <spinbox type="integer" id="n" min="2" initial="100" label="Number of Observations" /> + <insert snippet="num_observations"/> <frame label="Range" > <spinbox default_precision="2" type="real" id="min" initial="0.01" min="0.01" label="Lower quantile" /> <spinbox default_precision="2" type="real" id="max" initial="3.29" min="0.02" label="Upper quantile" /> diff --git a/rkward/plugins/distributions/plot_normal_distribution.xml b/rkward/plugins/distributions/plot_normal_distribution.xml index b123471..a60d616 100644 --- a/rkward/plugins/distributions/plot_normal_distribution.xml +++ b/rkward/plugins/distributions/plot_normal_distribution.xml @@ -7,7 +7,7 @@ </logic> <snippets> <snippet id="range_options"> - <spinbox type="integer" id="n" min="2" initial="100" label="Number of Observations" /> + <insert snippet="num_observations"/> <frame label="Range" > <spinbox default_precision="2" type="real" id="min" initial="-3.29" label="Lower quantile" /> <spinbox default_precision="2" type="real" id="max" initial="3.29" label="Upper quantile" /> diff --git a/rkward/plugins/distributions/plot_t_distribution.xml b/rkward/plugins/distributions/plot_t_distribution.xml index 3bac4b1..0c5627c 100644 --- a/rkward/plugins/distributions/plot_t_distribution.xml +++ b/rkward/plugins/distributions/plot_t_distribution.xml @@ -6,9 +6,8 @@ <insert snippet="common_logic"/> </logic> <snippets> - <include file="plot_dist_common_snippets.xml"/> <snippet id="range_options"> - <spinbox type="integer" id="n" initial="100" min="1" label="Number of Observations" /> + <insert snippet="num_observations"/> <frame label="Range" > <spinbox default_precision="2" type="real" id="min" initial="-12.924" label="Lower quantile" /> <spinbox default_precision="2" type="real" id="max" initial="12.924" label="Upper quantile" /> @@ -20,6 +19,7 @@ <spinbox default_precision="2" type="real" id="ncp" initial="0" label="Non-centrality parameter" /> </frame> </snippet> + <include file="plot_dist_common_snippets.xml"/> </snippets> <dialog label="Plot Student T probabilities" > <insert snippet="dialog_layout"/> diff --git a/rkward/plugins/distributions/plot_tukey_distribution.xml b/rkward/plugins/distributions/plot_tukey_distribution.xml index cdad417..1c7fa45 100644 --- a/rkward/plugins/distributions/plot_tukey_distribution.xml +++ b/rkward/plugins/distributions/plot_tukey_distribution.xml @@ -10,7 +10,7 @@ </logic> <snippets> <snippet id="range_options"> - <spinbox type="integer" id="n" min="2" initial="101" label="Number of Observations" /> + <insert snippet="num_observations"/> <frame label="Range" > <spinbox default_precision="2" type="real" id="min" initial="-1" min="-1" label="Lower quantile" /> <spinbox default_precision="2" type="real" id="max" initial="8" min="0" label="Upper quantile" /> diff --git a/rkward/plugins/distributions/plot_uniform_distribution.xml b/rkward/plugins/distributions/plot_uniform_distribution.xml index 16dc247..67600f2 100644 --- a/rkward/plugins/distributions/plot_uniform_distribution.xml +++ b/rkward/plugins/distributions/plot_uniform_distribution.xml @@ -7,7 +7,7 @@ </logic> <snippets> <snippet id="range_options"> - <spinbox type="integer" id="n" min="2" initial="100" label="Number of Observations" /> + <insert snippet="num_observations"/> <frame label="Range" > <spinbox default_precision="2" type="real" id="min" initial="-1" label="Lower quantile" /> <spinbox default_precision="2" type="real" id="max" initial="2" label="Upper quantile" /> diff --git a/rkward/plugins/distributions/plot_weibull_distribution.xml b/rkward/plugins/distributions/plot_weibull_distribution.xml index bc313c0..cd79e8f 100644 --- a/rkward/plugins/distributions/plot_weibull_distribution.xml +++ b/rkward/plugins/distributions/plot_weibull_distribution.xml @@ -7,7 +7,7 @@ </logic> <snippets> <snippet id="range_options"> - <spinbox type="integer" id="n" min="2" initial="100" label="Number of Observations" /> + <insert snippet="num_observations"/> <frame label="Range" > <spinbox default_precision="2" type="real" id="min" initial="0" min="0" label="Lower quantile" /> <spinbox default_precision="2" type="real" id="max" initial="5" min="0" label="Upper quantile" /> |