[rkward] /: Remove obsolete write_table plugin

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Fri Oct 2 18:28:41 UTC 2015


Git commit 97b7506ac09eecfa352b0a7d320a8c2a7d638db9 by Thomas Friedrichsmeier.
Committed on 02/10/2015 at 18:28.
Pushed by tfry into branch 'master'.

Remove obsolete write_table plugin

M  +1    -0    ChangeLog
D  +0    -12   rkward/plugins/00saveload/save/write_table.js
D  +0    -64   rkward/plugins/00saveload/save/write_table.xml
M  +0    -1    rkward/plugins/import_export.pluginmap
M  +2    -11   tests/import_export_plugins.R

http://commits.kde.org/rkward/97b7506ac09eecfa352b0a7d320a8c2a7d638db9

diff --git a/ChangeLog b/ChangeLog
index e0f2e96..5c93600 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+- Remove obsolete "Export tabular data" plugin (superceded by "Export Table / CSV")
 - Some usability refinements to "Import CVS" plugin
 - Disabled the "Import Data"-dialog, as it was considered too confusing. The individual importers are still available from the menu, separately.
 - For multi-item varslots and valueslots, use separate buttons for adding / removing items
diff --git a/rkward/plugins/00saveload/save/write_table.js b/rkward/plugins/00saveload/save/write_table.js
deleted file mode 100644
index e109973..0000000
--- a/rkward/plugins/00saveload/save/write_table.js
+++ /dev/null
@@ -1,12 +0,0 @@
-function calculate () {
-	echo ('write.table ( x =  ' + getValue("data") + ' , file =  "' + getValue("file") + '" , append =  ' + getValue("append") + '  ,quote = ' + getValue("quote") + ' ,  sep = ' + getValue("sep") + ' , eol = "' + getValue("eol") + '" , na = "' + getValue("na") + '" ,  dec = ' + getValue("dec") + ' , row.names =  ');
-	if (getValue("rows") == "custoRow") echo (getValue("rownames")) ;
-	else  echo (getValue("rows") + ' ,  col.names =  ');
-	if (getValue("columns") == "custoCol") echo (getValue("colnames")) ;
-	else  echo (getValue("columns") + ' , qmethod=  ' + getValue("qmethod") + ' ) \n');
-}
-
-function printout () {
-	new Header (i18n ("Write as table")).addFromUI ("file").addFromUI ("data").print ();
-}
-
diff --git a/rkward/plugins/00saveload/save/write_table.xml b/rkward/plugins/00saveload/save/write_table.xml
deleted file mode 100644
index 80d443e..0000000
--- a/rkward/plugins/00saveload/save/write_table.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<!DOCTYPE rkplugin>
-<document>
-	<code file="write_table.js"/>
-
-	<logic>
-		<convert id="customizerow" mode="equals" sources="rows.string" standard="custoRow" />
-		<convert id="customizecol" mode="equals" sources="columns.string" standard="custoCol" />
-		<connect client="rownames.enabled" governor="customizerow" />
-		<connect client="colnames.enabled" governor="customizecol" />
-	</logic>
-	<dialog label="Write as table">
-		<tabbook>
-			<tab label="Save as ..." >
-				<column>
-					<text>
-	Be careful : your data will be converted into a data frame. If you don't want that, use the plugin 'write' for mere variables.
-					</text>
-					<varselector id="vars" label="Select a variable or a table" />
-					<varslot multi="false" classes="array data.frame matrix character numeric integer" source="vars" id="data" label="Data" required="true" />
-					<browser type="savefile" size="small" id="file" initial="data" label="Name of the file" />
-				</column>
-				<frame label="Options" >
-					<row>
-						<checkbox value_unchecked="FALSE" checked="false" value="TRUE" id="append" label="Append" />
-					</row>
-				</frame>
-			</tab>
-			<tab label="Columns and Rows" >
-				<radio id="columns" label="Name of columns" >
-					<option value="TRUE" label="Use the names of the columns" />
-					<option value="FALSE" label="No names" />
-					<option value="custoCol" label="Customize" />
-				</radio>
-				<varslot multi="false" classes="integer numeric character" source="varname" id="colnames" label="Columns names" required="true"/>
-				<radio id="rows" label="Name of rows" >
-					<option value="TRUE" id="temp1" label="Use the names of the rows" />
-					<option value="FALSE" id="temp2" label="No names" />
-					<option value="custoRow" label="Customize rows" />
-				</radio>
-				<varslot multi="false" classes="integer numeric character" id="rownames" source="varname" label="Names of rows" required="true"/>
-				<varselector id="varname" />
-			</tab>
-			<tab label="Options" >
-				<radio id="dec" label="Character for decimal values" >
-					<option value="'.'" label="'.'" />
-					<option value="','" label="','" />
-				</radio>
-				<radio id="sep" label="Character to separate value" >
-					<option value="'\t'" label="Tab" />
-					<option value="';'" label="';'" />
-					<option value="','" label="','" />
-					<option value="' '" label="Coma" />
-				</radio>
-				<radio id="qmethod" label="QMethod" >
-					<option value="'escape'" label="Escape" />
-					<option value="'double'" label="Double" />
-				</radio>
-				<input size="small" id="na" initial="NA" label="Character for missing values" />
-				<input size="small" id="eol" initial="\n" label="Character for end of line" />
-				<checkbox value_unchecked="FALSE" checked="true" value="TRUE" id="quote" label="Quote" />
-			</tab>
-		</tabbook>
-	</dialog>
-</document>
diff --git a/rkward/plugins/import_export.pluginmap b/rkward/plugins/import_export.pluginmap
index 9eea77d..22cbb2c 100644
--- a/rkward/plugins/import_export.pluginmap
+++ b/rkward/plugins/import_export.pluginmap
@@ -24,7 +24,6 @@
 		</component>
 		<component type="standard" id="save_skeleton" file="save/skeleton/description.xml" label="Create package skeleton" />
 		<component type="standard" id="save_variables" file="save/write.xml" label="Export vector or matrix data" />
-		<component type="standard" id="save_table" file="save/write_table.xml" label="Export tabular data" />
 		<component type="standard" id="save_csv" file="save/write_csv.xml" label="Export Table / CSV files" />
 
 		<component type="standard" id="import_spss" file="import/import_spss.xml" label="Import SPSS">
diff --git a/tests/import_export_plugins.R b/tests/import_export_plugins.R
index 7b9aba9..439762a 100644
--- a/tests/import_export_plugins.R
+++ b/tests/import_export_plugins.R
@@ -98,24 +98,15 @@ suite <- new ("RKTestSuite", id="import_export_plugins",
 			x <- readLines ("data")
 			for (line in x) rk.print (line)
 		}),
-		new ("RKTest", id="write_table", call=function () {
+		new ("RKTest", id="write_csv", call=function () {
 			assign ("women", datasets::women, globalenv())
 			rk.sync.global()
 
-			rk.call.plugin ("rkward::save_table", append.state="FALSE", columns.string="TRUE", data.available="women", dec.string="'.'", eol.text="\\n", file.selection="data", na.text="NA", qmethod.string="'escape'", quote.state="TRUE", rows.string="FALSE", sep.string="'\\t'", submit.mode="submit")
+			rk.call.plugin ("rkward::save_csv", dec.string=".", encoding.string="", eol.string="\\n", file.selection="data", na.text="NA", qmethod.string="double", quick.string="csv", quote.state="1", rowname.string="TRUE", sep.string=",", x.available="women", submit.mode="submit")
 
 			x <- readLines ("data")
 			for (line in x) rk.print (line)
 		}),
-    new ("RKTest", id="write_csv", call=function () {
-      assign ("women", datasets::women, globalenv())
-      rk.sync.global()
-
-      rk.call.plugin ("rkward::save_csv", dec.string=".", encoding.string="", eol.string="\\n", file.selection="data", na.text="NA", qmethod.string="double", quick.string="csv", quote.state="1", rowname.string="TRUE", sep.string=",", x.available="women", submit.mode="submit")
-
-      x <- readLines ("data")
-      for (line in x) rk.print (line)
-    }),
 		new ("RKTest", id="package_skeleton", call=function () {
 			# create two functions to use
 			assign ("skel.func1", rkwardtests::rktest.getTempDir, envir=globalenv())



More information about the rkward-tracker mailing list