<?xml version="1.0" encoding="UTF-8" ?>
<!-- RSS generated by PHPBoost on Sat, 16 May 2026 16:14:49 +0200 -->

<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Easy Guides]]></title>
		<atom:link href="https://www.sthda.com/english/syndication/rss/wiki/8" rel="self" type="application/rss+xml"/>
		<link>https://www.sthda.com</link>
		<description><![CDATA[Last articles of the category: Tutorials]]></description>
		<copyright>(C) 2005-2026 PHPBoost</copyright>
		<language>en</language>
		<generator>PHPBoost</generator>
		
		
		<item>
			<title><![CDATA[Import and export data]]></title>
			<link>https://www.sthda.com/english/wiki/import-and-export-data</link>
			<guid>https://www.sthda.com/english/wiki/import-and-export-data</guid>
			<description><![CDATA[RQuery file is created by STHDA team.<br />
<br />
<img src="https://www.sthda.com/english/english/templates/sthda_design3/images/question.png" alt="" class="valign_" /> <span style="color:#304c68;"><strong>What is RQuery?</strong></span><br />
<br />
RQuery has been created for beginners in R. It can also be useful to an advanced programmer in R.<br />
This file contains a set of R functions to simplify your life in R programming<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-file-formats-for-rquery">File formats for RQuery</h2><br /><br />
Download an example of file format for RQuery:  <a href="https://www.sthda.com/english/upload/decathlon.txt">decathlon.txt</a><br />
<br />
<br />
<img src="https://www.sthda.com/english/english/templates/sthda_design3/images/important.png" alt="" class="valign_" />  Files must be absolutely in *. txt tabulation<br />
<br />
<img src="https://www.sthda.com/english/english/templates/sthda_design3/images/important.png" alt="" class="valign_" /> The decimal separator must be a dot and not a comma, for example (2.5). Please replace the commas with dots in your file.<br />
<br />
<img src="https://www.sthda.com/english/english/templates/sthda_design3/images/important.png" alt="" class="valign_" /> No duplicates in row names and column names.<br />
<br />
<span class="notice">To avoid error :<br />
<ul class="bb_ul"><br />
    <li class="bb_li"> Avoid column names beginning with a digit. Ex: use C1 instead of 1C<br />
    </li><li class="bb_li"> Avoid accented characters and spaces in row names and column names. Replace spaces with an 'underscore'. Ex: use 'voiture_renault' instead of 'Voiture renault'.<br />
</li></ul><br />
 </span><br />
<br />
In general, the rows correspond to individuals or samples and the columns correspond to variables or parameters describing individuals (Ex: hair_colors, eye_colors).<br />
<br />
<img src="https://www.sthda.com/english/english/templates/sthda_design/images/notice.png" alt="" class="valign_" />  If you still have problems to use RQuery please contact me at email address : <a href="mailto:mail_123soft@yahoo.fr">mail_123soft@yahoo.fr</a><br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-importing-and-exporting-data">Importing and Exporting Data</h2><br /><br /><br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-import-data-from-a-txt-tabulation-file-format">Import data from a *. txt tabulation file format </h3><br /><br />
 Use the following R code :<br />
<br />
<div class="formatter-container formatter-code code-R"><span class="formatter-title">Code R :</span><div class="formatter-content"><pre style="display:inline;"><pre class="r" style="font-family:monospace;"><span style="color: #0000FF; font-weight: bold;">rquery.<span style="">read_file</span></span><span style="color: #080;">&amp;#40;</span><span style="color: #080;">&amp;#41;</span> </pre></pre></div></div><br />
<br />
A GUI will appear asking you  to indicate the file path to import.<br />
<br />
The data are shown directly in R console.<br />
<br />
To store the data in an R object, use :<br />
<br />
<div class="formatter-container formatter-code code-R"><span class="formatter-title">Code R :</span><div class="formatter-content"><pre style="display:inline;"><pre class="r" style="font-family:monospace;">mydata<span style="color: #080;"><-</span><span style="color: #0000FF; font-weight: bold;">rquery.<span style="">read_file</span></span><span style="color: #080;">&amp;#40;</span><span style="color: #080;">&amp;#41;</span></pre></pre></div></div><br />
<br />
To ensure that your data is stored in mydata, just type in the R console the name of your variable.<br />
<br />
<div class="formatter-container formatter-code code-R"><span class="formatter-title">Code R :</span><div class="formatter-content"><pre style="display:inline;"><pre class="r" style="font-family:monospace;">mydata</pre></pre></div></div><br />
<br />
<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-export-data-in-a-txt-tabulation-file-format">Export data in a *. txt tabulation file format</h3><br /><br />
The function is called <strong>rquery.write_file</strong>.<br />
parameters:<br />
<strong>mydata </strong>= the name of your variable to be exported.<br />
<strong>file.name</strong> = the filename to save your dataset.<br />
<br />
<div class="formatter-container formatter-code code-R"><span class="formatter-title">Code R :</span><div class="formatter-content"><pre style="display:inline;"><pre class="r" style="font-family:monospace;"><span style="color: #0000FF; font-weight: bold;">rquery.<span style="">write_file</span></span><span style="color: #080;">&amp;#40;</span>mydata, file.<span style="">name</span><span style="color: #080;">=</span><span style="color: #ff0000;">"res.txt"</span><span style="color: #080;">&amp;#41;</span></pre></pre></div></div><br />
<br />
The file will be created in your working directory. To know your working directory, use the command <strong>getwd()</strong><br />
<br />
<div class="formatter-container formatter-code code-R"><span class="formatter-title">Code R :</span><div class="formatter-content"><pre style="display:inline;"><pre class="r" style="font-family:monospace;"><span style="color: #0000FF; font-weight: bold;">getwd</span><span style="color: #080;">&amp;#40;</span><span style="color: #080;">&amp;#41;</span></pre></pre></div></div><br />
<br />
The file is opened automatically by R after saving the file.]]></description>
			<pubDate>Sun, 22 Jul 2012 10:52:26 +0200</pubDate>
			
		</item>
		
		<item>
			<title><![CDATA[Tutorials]]></title>
			<link>https://www.sthda.com/english/wiki/tutorials</link>
			<guid>https://www.sthda.com/english/wiki/tutorials</guid>
			<description><![CDATA[-=-]]></description>
			<pubDate>Sat, 21 Jul 2012 21:43:21 +0200</pubDate>
			
		</item>
		
	</channel>
</rss>
