<?xml version="1.0" encoding="UTF-8" ?>
<!-- RSS generated by PHPBoost on Sun, 12 Apr 2026 14:43:38 +0200 -->

<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Documentation]]></title>
		<atom:link href="https://www.sthda.com/french/syndication/rss/wiki/11" rel="self" type="application/rss+xml"/>
		<link>https://www.sthda.com</link>
		<description><![CDATA[Derniers articles de la catégorie Tutoriels]]></description>
		<copyright>(C) 2005-2026 PHPBoost</copyright>
		<language>fr</language>
		<generator>PHPBoost</generator>
		
		
		<item>
			<title><![CDATA[Importation et exportation des données avec RQuery-1.0]]></title>
			<link>https://www.sthda.com/french/wiki/importation-et-exportation-des-donnees-avec-rquery-1-0</link>
			<guid>https://www.sthda.com/french/wiki/importation-et-exportation-des-donnees-avec-rquery-1-0</guid>
			<description><![CDATA[<h2 class="formatter-title wiki-paragraph-2" id="paragraph-importation-des-donnees-dans-r">Importation des donn?es dans R </h2><br />
<br />
L'objectif est d'importer des donn?es dans R ? partir d'un fichier. Pour cela, nous allons utiliser la fonction <strong><span style="color:blue;">rquery.read_file</span></strong>.<br />
<br />
<strong><span style="color:blue;">Formats de fichiers compatibles</span></strong> : .txt, .csv, .xls, .xlsx, .rdata<br />
<br />
T?l?charger, en suivant ce lien, un fichier typiquement compatible ? RQuery :  <a href="https://www.sthda.com/french/french/upload/decathlon.txt">decathlon.txt</a><br />
<br />
<br />
<span class="warning"><br />
R?commandation :<br />
<ul class="formatter-ul">
    <li class="formatter-li">Fichiers au format *.txt tabulation
    </li><li class="formatter-li">Le s?parateur de d?cimal doit ?tre un point et non une virgule  par exemple (2.5).
    </li><li class="formatter-li">Pas de doublons dans le nom des lignes ni dans celui des colonnes.
    </li><li class="formatter-li">?viter des caract?res accentu?s, des espaces dans le nom des colonnes et des lignes. Remplacer les espaces par un 'underscore'. Ex : utiliser plut?t 'voiture_renault' au lieu de 'voiture renault'.
    </li><li class="formatter-li">?viter des noms de colonnes commen?ant par un chiffre. Ex : utiliser plut?t C1 au lieu de 1C<br />
</li></ul><br />
<br />
</span><br />
<br />
<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;">&nbsp;
<span style="color: #228B22;">#chargement des fonctions rquery</span>
<span style="color: #0000FF; font-weight: bold;">source</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">"https://www.sthda.com/upload/rquery.r"</span><span style="color: #080;">&#41;</span>
&nbsp;
<span style="color: #228B22;">#Importation des donn?es</span>
<span style="color: #228B22;">#R vous demandera de choisir le fichier ? importer</span>
mydata<span style="color: #080;"><-</span><span style="color: #0000FF; font-weight: bold;">rquery.<span style="">read_file</span></span><span style="color: #080;">&#40;</span><span style="color: #080;">&#41;</span>
&nbsp;
<span style="color: #228B22;">#Aper?u des donn?es</span>
<span style="color: #0000FF; font-weight: bold;">head</span><span style="color: #080;">&#40;</span>mydata<span style="color: #080;">&#41;</span>
&nbsp;</pre></pre></div><br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-exportation-des-donnees-dans-un-fichier-txt-tabulation">Exportation des donn?es dans un fichier * .txt  tabulation</h2><br />
<br />
La fonction s'appelle <strong>rquery.write_file</strong>.<br />
param?tres :<br />
<strong>mydata</strong> = le nom de votre variable ? exporter.<br />
<strong>file.name</strong>= le nom du fichier qui contiendra votre jeu de donn?e.<br />
<br />
<span class="formatter-code">Code R :</span><div class="code"><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;">&#40;</span>mydata, file.<span style="">name</span><span style="color: #080;">=</span><span style="color: #ff0000;">"res.txt"</span><span style="color: #080;">&#41;</span></pre></pre></div><br />
<br />
Le fichier est cr?er dans votre r?pertoire courant. Pour connaitre votre r?pertoire courant ,utiliser la commande <strong>getwd()</strong><br />
<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;"><span style="color: #0000FF; font-weight: bold;">getwd</span><span style="color: #080;">&#40;</span><span style="color: #080;">&#41;</span></pre></pre></div><br />
<br />
Le fichier est ouvert automatiquement par R apr?s enregistrement du fichier.]]></description>
			<pubDate>Tue, 02 Apr 2013 00:00:09 +0200</pubDate>
			
		</item>
		
		<item>
			<title><![CDATA[Tutoriels]]></title>
			<link>https://www.sthda.com/french/wiki/tutoriels</link>
			<guid>https://www.sthda.com/french/wiki/tutoriels</guid>
			<description><![CDATA[Tutoriels sur les fonctions de RQuery<br />
<br />
<span class="success">Voir aussi : <a href="https://www.sthda.com/french/french/wiki/rquery-en-image">RQuery en image</a></span>]]></description>
			<pubDate>Sun, 28 Aug 2011 16:43:43 +0200</pubDate>
			
		</item>
		
	</channel>
</rss>
