[rkward-cvs] SF.net SVN: rkward: [1638] trunk/rkward/rkward/plugins

tfry at users.sourceforge.net tfry at users.sourceforge.net
Mon Mar 19 18:20:19 UTC 2007


Revision: 1638
          http://svn.sourceforge.net/rkward/?rev=1638&view=rev
Author:   tfry
Date:     2007-03-19 11:20:19 -0700 (Mon, 19 Mar 2007)

Log Message:
-----------
Move write.table() plugin (also allows for simplification of import_export.pluginmap

Modified Paths:
--------------
    trunk/rkward/rkward/plugins/import_export.pluginmap

Added Paths:
-----------
    trunk/rkward/rkward/plugins/00saveload/save/write_table.php
    trunk/rkward/rkward/plugins/00saveload/save/write_table.xml

Copied: trunk/rkward/rkward/plugins/00saveload/save/write_table.php (from rev 1637, trunk/rkward/rkward/plugins/writetable/code.php)
===================================================================
--- trunk/rkward/rkward/plugins/00saveload/save/write_table.php	                        (rev 0)
+++ trunk/rkward/rkward/plugins/00saveload/save/write_table.php	2007-03-19 18:20:19 UTC (rev 1638)
@@ -0,0 +1,13 @@
+<?
+function preprocess () {
+}
+
+function calculate () {
+?>
+write.table ( x =  <? getRK("data") ; ?> , file =  "<? getRK("file") ; ?>" , append =  <? getRK("append") ; ?>  ,quote = <? getRK("quote") ?> ,  sep = <? getRK("sep") ?> , eol = "<? getRK("eol")  ?>" , na = "<? getRK("na")  ?>" ,  dec = <? getRK("dec") ?> , row.names =  <? if (getRK_val("rows") == "custoRow") getRK("rownames") ; else  getRK("rows")  ; ?> ,  col.names =  <? if (getRK_val("columns") == "custoCol") getRK("colnames") ; else  getRK("columns")  ; ?> , qmethod=  <? getRK("qmethod") ; ?> ) 
+<?
+}
+
+function printout () {
+}
+?>

Copied: trunk/rkward/rkward/plugins/00saveload/save/write_table.xml (from rev 1637, trunk/rkward/rkward/plugins/writetable/description.xml)
===================================================================
--- trunk/rkward/rkward/plugins/00saveload/save/write_table.xml	                        (rev 0)
+++ trunk/rkward/rkward/plugins/00saveload/save/write_table.xml	2007-03-19 18:20:19 UTC (rev 1638)
@@ -0,0 +1,66 @@
+<!DOCTYPE rkplugin>
+<document>
+	<code file="write_table.php"/>
+
+	<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="rownames.required" governor="customizerow" />
+		<connect client="colnames.enabled" governor="customizecol" />
+		<connect client="colnames.required" governor="customizecol" />
+	</logic>
+	<dialog label="Save 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 size="small" id="file" initial="~/rk.temp.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" />
+				<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" />
+				<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 separe 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>

Modified: trunk/rkward/rkward/plugins/import_export.pluginmap
===================================================================
--- trunk/rkward/rkward/plugins/import_export.pluginmap	2007-03-19 18:15:28 UTC (rev 1637)
+++ trunk/rkward/rkward/plugins/import_export.pluginmap	2007-03-19 18:20:19 UTC (rev 1638)
@@ -1,23 +1,23 @@
 <!DOCTYPE rkpluginmap>
 
-<document base_prefix="" namespace="rkward">
+<document base_prefix="00saveload/" namespace="rkward">
 	<components>
-		<component type="standard" id="load_r_object" file="00saveload/import/load_data.xml" label="Load an R Object" />
-		<component type="standard" id="load_source" file="00saveload/import/source.xml" label="Load R source" />
+		<component type="standard" id="load_r_object" file="import/load_data.xml" label="Load an R Object" />
+		<component type="standard" id="load_source" file="import/source.xml" label="Load R source" />
 
-		<component type="standard" id="save_r_object" file="00saveload/save/save/description.xml" label="Save an R Object" />
-		<component type="standard" id="save_skeleton" file="00saveload/save/skeleton/description.xml" label="Save package" />
-		<component type="standard" id="save_variables" file="00saveload/save/write/description.xml" label="Save variables" />
-		<component type="standard" id="save_table" file="writetable/description.xml" label="Save as table" />
+		<component type="standard" id="save_r_object" file="save/save/description.xml" label="Save an R Object" />
+		<component type="standard" id="save_skeleton" file="save/skeleton/description.xml" label="Save package" />
+		<component type="standard" id="save_variables" file="save/write/description.xml" label="Save variables" />
+		<component type="standard" id="save_table" file="save/write_table.xml" label="Save as table" />
 
-		<component type="standard" id="import_spss" file="00saveload/import/import_spss.xml" label="Import SPSS">
+		<component type="standard" id="import_spss" file="import/import_spss.xml" label="Import SPSS">
 			<attribute id="format" value="*.sav *.por" label="SPSS data files"/>
 		</component>
-		<component type="standard" id="import_csv" file="00saveload/import/import_csv.xml" label="Import Text / CSV data">
+		<component type="standard" id="import_csv" file="import/import_csv.xml" label="Import Text / CSV data">
 			<attribute id="format" value="*.txt *.csv" label="Text / Comma Separated Values"/>
 		</component>
 
-		<component type="standard" id="setworkdir" file="00saveload/setworkdir.xml" label="Set Working Directory" />
+		<component type="standard" id="setworkdir" file="setworkdir.xml" label="Set Working Directory" />
 	</components>
 
 	<hierarchy>


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list