<!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="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 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" />
				<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>
