<?xml version="1.0" encoding="UTF-8" ?>
<!-- RSS generated by PHPBoost on Tue, 12 May 2026 22:58:34 +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/6" rel="self" type="application/rss+xml"/>
		<link>https://www.sthda.com</link>
		<description><![CDATA[Derniers articles de la catégorie Logiciel R]]></description>
		<copyright>(C) 2005-2026 PHPBoost</copyright>
		<language>fr</language>
		<generator>PHPBoost</generator>
		
		
		<item>
			<title><![CDATA[Logiciel R]]></title>
			<link>https://www.sthda.com/french/wiki/logiciel-r</link>
			<guid>https://www.sthda.com/french/wiki/logiciel-r</guid>
			<description><![CDATA[<p class="float-left"><img src="https://www.sthda.com/french/french/images/sthda/r.png" alt="" class="valign_" /></p><br />
<br />
<br />
R est un langage et un environnement d'analyse statistiques et graphiques. Il est compatible Windows/MAC/Linux.<br />
L'adresse du site officiel est: <a href="http://www.r-project.org/">http://www.r-project.org/</a><br />
<br />
<br />
<br />
<!-- START HTML -->

<div class="chapter">I-Débuter avec R</div>
<div class="sub_chapter"> <a href="https://www.sthda.com/french/french/wiki/installation-et-utilisation-de-r">Installation et utilisation de R</a></div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/obtenir-de-l-aide-sur-r">Obtenir de l'aide sur R</a></div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/l-espace-de-travail-r">L'espace de travail R</a></div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/execution-d-un-script-r-contenu-dans-un-fichier-et-redirection-des-resultats-r-vers-un-fichier">Exécution d'un script R contenu dans un fichier et redirection des résultats R vers un fichier</a></div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/packages-r">Packages R</a></div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/editeur-de-code-r">Editeur de code R</a></div>
<div class="chapter">II-Saisie des données dans R : Les différents types de données</div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/notion-d-objets-et-enregistrement-de-l-espace-de-travail">Notion d'objets et enregistrement de l'espace de travail</a></div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/les-vecteurs-vector">Les vecteurs : vector</a></div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/les-facteurs-factor">Les facteurs : factor</a></div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/les-matrices-matrix">Les matrices : matrix</a></div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/les-listes-list">Les listes : list</a></div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/les-data-frame">Les data.frame</a></div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/les-dates">Les dates</a></div>
<div class="chapter">III-Importation et exportation des données dans R</div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/importation-des-donnees-dans-r">Importation des données dans R</a></div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/exportation-des-donnees-de-r-vers-un-fichier">Exportation des données de R vers un fichier</a></div>
<div class="chapter">IV-Gestion des données dans R</div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/les-operateurs-arithmetiques-et-logiques">Les opérateurs arithmétiques et logiques</a></div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/quelques-grandes-fonctions-de-r">Quelques grandes fonctions de R</a></div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/tri-des-donnees-avec-r">Tri des données avec R</a></div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/fusion-des-donnees-avec-r">Fusion des données avec R</a></div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/transposer-une-table-de-donnees-avec-r">Transposer une table de données avec R</a></div>
<div class="chapter">Tests statistiques avec R</div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/statistiques-descriptives-avec-r">Statistiques descriptives avec R</a></div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/test-de-normalite-avec-r-test-de-shapiro-wilk">Test de normalité avec R : Test de Shapiro-Wilk</a></div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/test-f-comparaison-de-deux-variances-avec-r">Test F : comparaison de deux variances avec R</a></div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/test-de-student-avec-r">Test de Student avec R</a></div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/test-de-wilcoxon-avec-r">Test de Wilcoxon avec R</a></div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/anova-analyse-de-variance-avec-r">ANOVA : Analyse de variance avec R</a></div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/test-de-correlation-avec-r">Test de corrélation avec R</a></div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/regression-lineaire-avec-r">Régression linéaire avec R</a></div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/test-de-chi2-avec-r">Test de Chi2 avec R</a></div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/test-exact-de-fisher-avec-r">Test exact de Fisher avec R</a></div>
<div class="chapter">Analyse factorielle avec R</div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/analyse-en-composante-principale-avec-r">Analyse en composante principale avec R</a></div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/analyse-factorielle-des-correspondances-avec-r">Analyse factorielle des correspondances avec R</a></div>
<div class="chapter">Divers</div>
<div class="sub_chapter">5- <a href="https://www.sthda.com/french/french/wiki/groupement-des-commandes-boucles-et-execution-conditionnelle">Groupement des commandes, boucles et exécution conditionnelle</a></div>
<div class="sub_chapter">6- <a href="https://www.sthda.com/french/french/wiki/ecrire-vos-propres-fonctions-r">Ecrire vos propres fonctions R</a></div>
<div class="sub_chapter">7- <a href="https://www.sthda.com/french/french/wiki/procedures-graphiques-avec-r">Procédures graphiques avec R</a></div>
<div class="sub_chapter"><a href="https://www.sthda.com/french/french/wiki/graphiques-sur-r">Graphiques sur R</a></div>
<div class="sub_chapter"></div>

<!-- END HTML -->]]></description>
			<pubDate>Sat, 30 Dec 2023 23:33:12 +0100</pubDate>
			
		</item>
		
		<item>
			<title><![CDATA[rwsthda-1-1-load-and-read-a-data-file]]></title>
			<link>https://www.sthda.com/french/wiki/rwsthda-1-1-load-and-read-a-data-file</link>
			<guid>https://www.sthda.com/french/wiki/rwsthda-1-1-load-and-read-a-data-file</guid>
			<description><![CDATA[quand N> 60 approximation avec la loi normale                               <br />
                               <br />
                               <br />
                               <br />
                               <br />
    F test to compare two variances                           <br />
                               <br />
data:  socia by joueur.wow                                <br />
F = 0.9094, num df = 113, denom df = 73, p-value = 0.6435                    variances homog?nes     je te remets les variances       <br />
alternative hypothesis: true ratio of variances is not equal to 1                                <br />
95 percent confidence interval:                               <br />
 0.5924145 1.3694906                             > tapply(Dataset$socia, Dataset$joueur.wow,  var, na.rm=TRUE)   <br />
sample estimates:                                 Non        oui<br />
ratio of variances                             62,6329    68,87542<br />
         0.9093651]]></description>
			<pubDate>Mon, 15 Apr 2013 23:38:25 +0200</pubDate>
			
		</item>
		
		<item>
			<title><![CDATA[Installation et utilisation de R]]></title>
			<link>https://www.sthda.com/french/wiki/installation-et-utilisation-de-r</link>
			<guid>https://www.sthda.com/french/wiki/installation-et-utilisation-de-r</guid>
			<description><![CDATA[<h2 class="formatter-title wiki-paragraph-2" id="paragraph-installer-r">Installer R</h2><br />
<br />
R est t?l?chargeable sur le site internet : <a href="http://www.r-project.org/">http://www.r-project.org/</a>.<br />
T?l?charger la version correspondant ? votre syst?me d&#8217;exploitation.<br />
<br />
<span class="success">Windows: <a href="http://cran.univ-lyon1.fr/bin/windows/base/">http://cran.univ-lyon1.fr/bin/windows/base/</a><br />
MACOS X: <a href="http://cran.univ-lyon1.fr/bin/macosx/">http://cran.univ-lyon1.fr/bin/macosx/</a><br />
</span><br />
Installer R en gardant les options d&#8217;installations par d?faut.<br />
<br />
Sous linux, R s'installe avec la commande suivante:<br />
<span class="formatter-code">Code BASH :</span><div class="code"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get install</span> r-base</pre></pre></div><br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-utiliser-r-sous-windows-et-mac-os-x">Utiliser R sous Windows et MAC OS X</h2><br />
<br />
Pour une premi?re utilisation de R, la proc?dure sugg?r?e est la suivante sous WINDOWS et MAC OS X:<br />
<br />
<span style="color:blue;"><strong>1. Cr?er un r?pertoire de travail:</strong></span><br />
<br />
Dans le dossier <strong>Documents</strong>, Cr?er un sous-r?pertoire appel? <strong>R</strong>. Ce sous-dossier sera utilis? par le logiciel R pour sauvegarder les donn?es.<br />
<br />
<br />
<span style="color:blue;"><strong>2. D?marrer R:</strong></span><br />
<br />
<strong>Windows :</strong> D?marrer  -> Tous les Programmes -> R .<br />
<strong>MAC OS X : </strong> Cliquer sur l&#8217;ic?ne R dans le dossier Applications.<br />
<br />
<br />
<span style="color:blue;"><strong>3. Indiquer  votre r?pertoire de travail au logiciel R:</strong></span><br />
<br />
<strong>Windows :</strong> Cliquer sur l'onglet  -> <strong>Fichier</strong> puis sur  -><strong>Changer le r?pertoire</strong>.<br />
<strong>MAC OS X: </strong> Cliquer sur l'onglet -><strong>Divers</strong> puis sur -> <strong>Changer le r?pertoire de travail</strong>.<br />
<br />
A partir de la fen?tre qui s'affiche, indiquez le chemin du r?pertoire que vous venez de cr?er.<br />
<br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-utiliser-r-sous-linux">Utiliser R sous Linux</h2><br />
<br />
->Ouvrir la Console linux<br />
<br />
<span style="color:blue;"><strong>1. Cr?ation du r?pertoire de travail 'Work 'gr?ce ? la commande mkdir</strong></span><br />
<span class="formatter-code">Code BASH :</span><div class="code"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">&nbsp;
$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> work
&nbsp;</pre></pre></div><br />
<br />
<span style="color:blue;"><strong>2. Placer vous dans le r?pertoire Work que vous venez de cr?er </strong></span><br />
<span class="formatter-code">Code BASH :</span><div class="code"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;">&nbsp;
$ <span style="color: #7a0874; font-weight: bold;">cd</span> work
&nbsp;</pre></pre></div><br />
<br />
<span style="color:blue;"><strong>3. D?marrez le programme R avec la commande :</strong></span><br />
<br />
<span class="formatter-code">Code BASH :</span><div class="code"><pre style="display:inline;"><pre class="bash" style="font-family:monospace;"><span style="color: #666666;">$ </span>R</pre></pre></div><br />
<br />
<span style="color:blue;"><strong>4. Pour quitter R tapez la commande:</strong></span><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;">q</span><span style="color: #080;">&#40;</span><span style="color: #080;">&#41;</span></pre></pre></div><br />
<br />
<br />
<p class="float-left"><a href="https://www.sthda.com/french/french/wiki/r"> ? Cours pr?c?dent</a><br />
R</p><br />
<p class="float-right"><a href="https://www.sthda.com/french/french/wiki/obtenir-de-l-aide-sur-r">Cours suivant ?</a><br />
Obtenir de l'aide sur R</p>]]></description>
			<pubDate>Sun, 10 Jun 2012 20:29:19 +0200</pubDate>
			
		</item>
		
		<item>
			<title><![CDATA[Analyse factorielle des correspondances avec R]]></title>
			<link>https://www.sthda.com/french/wiki/analyse-factorielle-des-correspondances-avec-r</link>
			<guid>https://www.sthda.com/french/wiki/analyse-factorielle-des-correspondances-avec-r</guid>
			<description><![CDATA[<h2 class="formatter-title wiki-paragraph-2" id="paragraph-qu-est-ce-que-c-est-l-afc">Qu'est ce que c'est l'AFC?</h2><br />
<br /><br />
L' analyse factorielle des correspondances (AFC) est une repr?sentation graphique des modalit?s de deux variables nominales (ou variables qualitatives). Elle est tr?s similaire ? l'analyse en composante principale, sauf qu'elle ne s'applique qu'aux variables qualitatives. C'est une m?thode d'analyse de tableaux de contingence.<br />
<br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-format-du-tableau-de-donnees-pour-l-afc">Format du tableau de donn?es pour l'AFC</h2><br />
<br />
Une image du format du jeu de donn?es est montr?e ci-dessous:<br />
<br />
 <img src="https://www.sthda.com/french/french/upload/afc_format_tache_menagere.png" alt="" class="valign_" /><br />
<br />
Dans cet exemple on se pose la question ? savoir la r?partition des taches quotidiennes, au sein d'une famille, entre une femme et son ?poux. Les lignes du tableau correspondent aux diff?rentes taches. Pour une tache donn?e, la valeur indiqu?e repr?sente la fr?quence d'ex?cution par l'?pouse seule (<strong>wife</strong>), de mani?re altern?e entre les 2 (<strong>alternating</strong>), par l'?poux seul (<strong>Husband)</strong> et par les 2 en m?me temps (<strong>jointly</strong>).<br />
<br />
<br />
<span class="warning"> T?l?charger un exemple de fichier en cliquant  <a href="https://www.sthda.com/french/french/upload/afc_tache_menageres.txt">ici</a> (clique droit ->Enregistrez la cible du lien sous)</span><br />
<br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-importation-des-donnees-dans-r">Importation des donn?es dans R</h2><br />
<br />
La commande R ? utiliser :<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;">#importation des donn?es</span>
<span style="color: #228B22;">#R vous demandera le chemin du fichier automatiquement</span>
data<span style="color: #080;"><-</span><span style="color: #0000FF; font-weight: bold;">read.<span style="">table</span></span><span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">file</span><span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">file.<span style="">choose</span></span><span style="color: #080;">&#40;</span><span style="color: #080;">&#41;</span>, sep<span style="color: #080;">=</span><span style="color: #ff0000;">"<span style="color: #000099; font-weight: bold;">\t</span>"</span>, header<span style="color: #080;">=</span>TRUE, <span style="color: #0000FF; font-weight: bold;">row.<span style="">names</span></span><span style="color: #080;">=</span><span style="color: #ff0000;">1</span>, check.<span style="">names</span><span style="color: #080;">=</span>FALSE<span style="color: #080;">&#41;</span>
&nbsp;</pre></pre></div><br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-analyse-factorielle-des-correspondances-avec-factominer">Analyse Factorielle des Correspondances avec FactoMineR</h2><br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-code-r">Code R</h3><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: #0000FF; font-weight: bold;">library</span><span style="color: #080;">&#40;</span>FactoMineR<span style="color: #080;">&#41;</span>
res.<span style="">ca</span> <span style="color: #080;">=</span> CA<span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">data</span><span style="color: #080;">&#41;</span>
&nbsp;</pre></pre></div><br />
<br />
<strong>La commande dessine automatiquement le plan factoriel des variables colonnes et lignes.</strong><br />
<br />
Le r?sultat de la commande est une liste et inclut les ?l?ments suivants:<br />
<br />
<!-- START HTML -->
<pre>

   name              description                   
1  "$eig"            "eigenvalues"                 
2  "$col"            "results for the columns"     
3  "$col$coord"      "coord. for the columns"      
4  "$col$cos2"       "cos2 for the columns"        
5  "$col$contrib"    "contributions of the columns"
6  "$row"            "results for the rows"        
7  "$row$coord"      "coord. for the rows"         
8  "$row$cos2"       "cos2 for the rows"           
9  "$row$contrib"    "contributions of the rows"   
10 "$call"           "summary called parameters"   
11 "$call$marge.col" "weights of the columns"      
12 "$call$marge.row" "weights of the rows"    
</pre>
<!-- END HTML --><br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-graphique-du-plan-factoriel">Graphique du plan factoriel</h2><br />
<br />
Le graphique du plan factoriel suivant est g?n?r? automatiquement.<br />
<br />
<br />
<a href="https://www.sthda.com/french/french/upload/plan_facto_ca.png"> <img src="https://www.sthda.com/french/french/upload/mini_plan_facto_ca.png" alt="" class="valign_" /></a><br />
<span style="font-size: 12px;">cliquez pour agrandir</span><br />
<br />
<br />
Les noms des colonnes sont color?s en rouge et les nom des lignes en bleu.<br />
<br />
Le graphique montre par exemple que :<br />
Les taches m?nag?res telles que le Dinner et le petit-d?jeuner (Breakfeast) sont faites par la femme (wife).<br />
La conduite (Driving) et les r?parations (Repairs) sont faites par le conjoint (Husband).<br />
<br />
<br />
<span class="notice">Pour voir uniquement le plan des lignes<br />
<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;">CA<span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">invisible</span><span style="color: #080;">=</span><span style="color: #ff0000;">"col"</span><span style="color: #080;">&#41;</span><span style="color: #228B22;">#on cache les colonnes</span></pre></pre></div><br />
<br />
Pour voir uniquement le plan des colonnes<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;">CA<span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">invisible</span><span style="color: #080;">=</span><span style="color: #ff0000;">"row"</span><span style="color: #080;">&#41;</span><span style="color: #228B22;">#on cache les lignes</span></pre></pre></div><br />
</span><br />
<br />
 <br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-les-elements-cles-du-resultat-d-une-afc">Les ?l?ments cl?s du r?sultat d'une AFC</h2><br />
<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;">&nbsp;
res.<span style="">ca</span>$eig <span style="color: #228B22;"># Affiche les valeurs propres/contributions des axes factoriels</span>
&nbsp;
res.<span style="">ca</span>$col$coord  <span style="color: #228B22;"># Affiche les coordonn?es des modalit?s colonnes</span>
&nbsp;
res.<span style="">ca</span>$col$cos2 <span style="color: #228B22;">#qualit? de projection des modalit?s colonnes</span>
&nbsp;
res.<span style="">ca</span>$col$contrib <span style="color: #228B22;"># contribution des modalit?s colonnes aux axes factoriels</span>
&nbsp;
res.<span style="">ca</span>$row$coord <span style="color: #228B22;"># coordonn?es des modalit?s lignes dans le plan factoriel</span>
&nbsp;
res.<span style="">ca</span>$row$cos2 <span style="color: #228B22;"># Qualit? de repr?sentation des modalit?s lignes</span>
&nbsp;
res.<span style="">ca</span>$row$contrib <span style="color: #228B22;"># Contribution des modalit?s lignes aux axes factoriels</span>
&nbsp;</pre></pre></div><br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-enregistrement-des-resultats-de-l-afc-dans-un-fichier-txt-tabulation">Enregistrement des r?sultats de l'AFC dans un fichier .txt tabulation</h2><br />
<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;">write.<span style="">infile</span><span style="color: #080;">&#40;</span>res.<span style="">ca</span>, <span style="color: #0000FF; font-weight: bold;">file</span><span style="color: #080;">=</span><span style="color: #ff0000;">"ca_result.txt"</span>, sep<span style="color: #080;">=</span><span style="color: #ff0000;">"<span style="color: #000099; font-weight: bold;">\t</span>"</span><span style="color: #080;">&#41;</span></pre></pre></div><br />
<br />
Ce fichier txt vous permettra de refaire tous les graphes sur excel ? votre convenance.<br />
<br />
<span class="success">T?l?charger un exemple du fichier g?n?r? en cliquant sur le lien suivant:   <a href="https://www.sthda.com/french/french/upload/ca_result.txt">ca_result.txt</a></span><br />
<br />
<strong><br />
Le fichier contient:</strong><br />
<strong>eig:</strong> correspondant aux valeurs propres, le % de variance et le % de variance cumul?e<br />
<strong> col</strong>: Contient les r?sultats pour les colonnes (coordonn?es,  COS2, contributions);<br />
<strong>row</strong>:Contient les r?sultats pour les lignes (coordonn?es, COS2, contributions);<br />
<strong>col.sup </strong>: Contient les r?sultats pour les colonnes suppl?mentaires (coordonn?es, COS2);<br />
<strong>row.sup</strong> : R?sultats pour les lignes suppl?mentaires (coordonn?es, COS2).<br />
<br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-afc-avec-des-lignes-et-colonnes-supplementaires">AFC avec des lignes et colonnes suppl?mentaires</h2><br />
<br />
Les lignes et les colonnes suppl?mentaires correspondent ? des modalit?s qui ne participeront pas ? l'AFC mais dont les positions seront pr?dites gr?ce ? l' AFC r?alis?e uniquement avec les modalit?s actives.<br />
<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-telecharger-et-enregistrer-ce-fichier-au-txt-tabulation">T?l?charger et enregistrer  ce fichier au *.txt tabulation </h3><br />
<br /><br />
<a href="https://www.sthda.com/french/french/upload/afc-children.txt">afc-children.txt</a><br />
<br />
Une image d'une partie du fichier est montr?e ci-dessous.<br />
<br />
<a href="https://www.sthda.com/french/french/upload/afc_children.png"><img src="https://www.sthda.com/french/french/upload/mini_afc_children.png" alt="" class="valign_" /> </a><br />
<span style="font-size: 12px;">cliquez pour agrandir</span><br />
<br />
Ce tableau correspond ? un tableau de contingence r?sumant les r?ponses donn?es par diff?rentes cat?gories de personne ? la question suivante : quelles sont selon vous les raisons qui font h?siter une femme ou un couple ? avoir des enfants?<br />
<br />
Les lignes et les colonnes color?s seront consid?r?es dans l'AFC comme des lignes et des colonnes suppl?mentaires ? cause des valeurs manquantes. L'AFC est tout d'abord r?alis?e sur le reste du tableau (colonnes et lignes actives non color?es) puis les coordonn?es des lignes et des colonnes suppl?mentaires sont calcul?es sur la base de l'AFC pr?c?dente.<br />
<br />
Le fichier contient 8 colonnes et 18 lignes.<br />
Les colonnes<strong> thirty</strong>, <strong>fifty</strong>, <strong>more_fifty</strong> correspondant respectivement aux colonnes num?ro 6, 7, 8 sont des <strong>colonnes suppl?mentaires </strong>  (abr?viation <strong><span style="color:#FF9900;">col.sup=c(6,7,8)</span></strong>).<br />
<br />
Les lignes 'comfort', 'disagreement', 'world' et  'to_live' correspondant respectivement aux lignes num?ro 15, 16, 17 et 18 sont des lignes suppl?mentaires  (abr?viation <strong><span style="color:#FF9900;">row.sup=c(15,16,17,18)</span></strong>)<br />
<br />
<span class="notice">Pour simplifier, on peut aussi ?crire row.sup=15:18; les deux points signifient 'tous les entiers de 15 ? 18 bornes comprises'</span><br />
<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-code-r">Code R</h3><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;">#importation des donn?es</span>
data<span style="color: #080;"><-</span><span style="color: #0000FF; font-weight: bold;">read.<span style="">table</span></span><span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">file</span><span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">file.<span style="">choose</span></span><span style="color: #080;">&#40;</span><span style="color: #080;">&#41;</span>, sep<span style="color: #080;">=</span><span style="color: #ff0000;">"<span style="color: #000099; font-weight: bold;">\t</span>"</span>, header<span style="color: #080;">=</span>TRUE, <span style="color: #0000FF; font-weight: bold;">row.<span style="">names</span></span><span style="color: #080;">=</span><span style="color: #ff0000;">1</span>, check.<span style="">names</span><span style="color: #080;">=</span>FALSE<span style="color: #080;">&#41;</span>
<span style="color: #228B22;">#AFC</span>
res.<span style="">ca</span><span style="color: #080;"><-</span>CA<span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">data</span>, col.<span style="">sup</span><span style="color: #080;">=</span><span style="color: #ff0000;">6</span><span style="color: #080;">:</span><span style="color: #ff0000;">8</span>, row.<span style="">sup</span><span style="color: #080;">=</span><span style="color: #ff0000;">15</span><span style="color: #080;">:</span><span style="color: #ff0000;">18</span><span style="color: #080;">&#41;</span>
&nbsp;</pre></pre></div><br />
<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-telecharger-le-resultat-pdf">T?l?charger le r?sultat pdf </h3><br />
<br />
 <a href="https://www.sthda.com/french/french/upload/ca_result_sup.pdf">ca_result_sup.pdf</a><br />
<br />
Le fichier pdf contient:<br />
<ol class="formatter-ol">
    <li class="formatter-li">Le graphique des valeurs propres
    </li><li class="formatter-li">Le plan factoriel des lignes (en bleu), des lignes suppl?mentaires (en bleu fonc?), des colonnes (en rouge) et des colonnes suppl?mentaires (en rouge fonc?).<br />
   <br />
</li></ol><br />]]></description>
			<pubDate>Wed, 30 May 2012 20:32:14 +0200</pubDate>
			
		</item>
		
		<item>
			<title><![CDATA[R language]]></title>
			<link>https://www.sthda.com/french/wiki/r-language</link>
			<guid>https://www.sthda.com/french/wiki/r-language</guid>
			<description><![CDATA[<p class="float-left"><a href="https://www.sthda.com/french/french/wiki/r"><img src="https://www.sthda.com/french/french/images/sthda/r.png" alt="" class="valign_" /></a></p><br />
<br />
<br />
R est un langage et un environnement d'analyse statistiques et graphiques. Il est compatible Windows/MAC/Linux.<br />
L'adresse du site officiel est: <a href="http://www.r-project.org/">http://www.r-project.org/</a><br />
<br />
<br />
<br />
<a href="https://www.sthda.com/french/french/wiki/r">Cliquez ici pour acc?der aux cours</a>]]></description>
			<pubDate>Thu, 17 May 2012 18:16:37 +0200</pubDate>
			
		</item>
		
		<item>
			<title><![CDATA[Analyse en composante principale avec R]]></title>
			<link>https://www.sthda.com/french/wiki/analyse-en-composante-principale-avec-r</link>
			<guid>https://www.sthda.com/french/wiki/analyse-en-composante-principale-avec-r</guid>
			<description><![CDATA[<h2 class="formatter-title wiki-paragraph-2" id="paragraph-prerequis">Pr?requis</h2><br />
<br />
<span class="notice">Avant de continuer, je vous invite ? lire les deux cours suivants si vous n'?tes pas tr?s familiaris?s avec l' ACP. </span><br />
<br />
<a href="https://www.sthda.com/french/french/wiki/introduction-a-l-analyse-en-composante-principale">1- Introduction ? l'analyse en composante principale</a><br />
<br />
<a href="https://www.sthda.com/french/french/pages/analyse-en-composante-principale-cours">2- Analyse en composante principale cours</a><br />
<br />
<br />
<br />
<!-- START HTML -->

<!--
<h1 class="wiki_paragraph1" id="paragraph_package-r-et-jeu-de-donnees-utilisees">Package R et jeu de donn?es utilis?es</h1>



Package R utilis? : [b][i]FactoMineR[/i][/b]

Tableau de donn?es utilis?es : la table [b]decathlon[/b] de la librarie FactoMineR


[b]Le tableau de donn?es contient 41 lignes (individus)  et 13 colonnes (variables).[/b]
[style=success]
Les colonnes 1 ? 12 sont des [b]variables continues[/b] : 
      Colonnes 1:10 = Performances des athl?tes pour les dix ?preuves du d?cathlon.
      Colonne 11 = rang des athl?tes
      Colonne 12 = Nombre de points obtenus

La colonne 13 est une [b]variable qualitative[/b] correspondant au nom de la comp?tition (Jeux Olympiques de 2004 ou D?castar 2004).[/style]
-->


<!-- END HTML --><br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-fichier-contenant-le-jeu-de-donnees-pour-l-acp">Fichier contenant le jeu de donn?es pour l'ACP</h2><br />
<br /><br />
T?l?chargez le fichier contenant une table de donn?es en cliquant   <a href="https://www.sthda.com/french/french/upload/decathlon_var_active.txt">ici</a>. (Faire un clique-droit -> puis enregistrer la cible du lien sous)<br />
<br />
<span class="warning">Enregistrez le fichier au format .txt tabulation. Les variables sont en colonnes et les individus en ligne.</span><br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-importation-des-donnees-dans-r">Importation des donn?es dans R</h2><br />
<br />
La commande R ? utiliser :<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;">#importation des donn?es</span>
<span style="color: #228B22;">#R vous demandera le chemin du fichier automatiquement</span>
data<span style="color: #080;"><-</span><span style="color: #0000FF; font-weight: bold;">read.<span style="">table</span></span><span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">file</span><span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">file.<span style="">choose</span></span><span style="color: #080;">&#40;</span><span style="color: #080;">&#41;</span>, sep<span style="color: #080;">=</span><span style="color: #ff0000;">"<span style="color: #000099; font-weight: bold;">\t</span>"</span>, header<span style="color: #080;">=</span>TRUE, <span style="color: #0000FF; font-weight: bold;">row.<span style="">names</span></span><span style="color: #080;">=</span><span style="color: #ff0000;">1</span>, check.<span style="">names</span><span style="color: #080;">=</span>FALSE<span style="color: #080;">&#41;</span>
&nbsp;</pre></pre></div><br />
<br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-analyse-en-composante-principale-avec-factominer">Analyse en composante principale avec FactoMineR</h2><br />
<br /><br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-code-r">Code R</h3><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: #228B22;"># PCA</span>
<span style="color: #0000FF; font-weight: bold;">library</span><span style="color: #080;">&#40;</span>FactoMineR<span style="color: #080;">&#41;</span>
pca<span style="color: #080;"><-</span>PCA<span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">data</span><span style="color: #080;">&#41;</span>
&nbsp;</pre></pre></div><br />
<br />
<strong>La commande dessine automatiquement le plan factoriel des individus et des variables.</strong><br />
<br />
Le r?sultat de la commande est une liste et inclut les ?l?ments suivants:<br />
<br />
<!-- START HTML -->
<pre>
   name               description                          
1  "$eig"             "eigenvalues"                        
2  "$var"             "results for the variables"          
3  "$var$coord"       "coord. for the variables"           
4  "$var$cor"         "correlations variables - dimensions"
5  "$var$cos2"        "cos2 for the variables"             
6  "$var$contrib"     "contributions of the variables"     
7  "$ind"             "results for the individuals"        
8  "$ind$coord"       "coord. for the individuals"         
9  "$ind$cos2"        "cos2 for the individuals"           
10 "$ind$contrib"     "contributions of the individuals"   
11 "$call"            "summary statistics"                 
12 "$call$centre"     "mean of the variables"              
13 "$call$ecart.type" "standard error of the variables"    
14 "$call$row.w"      "weights for the individuals"        
15 "$call$col.w"      "weights for the variables" 

</pre>
<!-- END HTML --><br />
<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-graphique-des-individus">Graphique des individus</h3><br />
<br />
<a href="https://www.sthda.com/french/french/upload/ind_pca.png"> <img src="https://www.sthda.com/french/french/upload/mini_ind_pca.png" alt="" class="valign_" /></a><br />
<span style="font-size: 12px;">cliquez pour agrandir</span><br />
<br />
<br />
<h3 class="formatter-title wiki-paragraph-3" id="paragraph-graphique-des-variables">Graphique des variables</h3><br />
<br />
<a href="https://www.sthda.com/french/french/upload/var_pca.png">  <img src="https://www.sthda.com/french/french/upload/mini_var_pca.png" alt="" class="valign_" /></a><br />
<span style="font-size: 12px;">cliquez pour agrandir</span><br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-les-elements-cles-du-resultat-d-une-acp">Les ?l?ments cl?s du r?sultat d'une ACP</h2><br />
<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;">&nbsp;
pca$eig <span style="color: #228B22;"># Affiche les valeurs propres/contributions des axes factoriels</span>
&nbsp;
pca$var$coord  <span style="color: #228B22;"># Affiche les coordonn?es des variables</span>
&nbsp;
pca$var$cor <span style="color: #228B22;">#Affiche les corr?lations variables - axes factoriels</span>
&nbsp;
pca$var$cos2 <span style="color: #228B22;">#qualit? de projection des variables</span>
&nbsp;
pca$var$contrib <span style="color: #228B22;"># contribution des variables aux axes factoriels</span>
&nbsp;
pca$ind$coord <span style="color: #228B22;"># coordonn?es des individus dans le plan factoriel</span>
&nbsp;
pca$ind$cos2 <span style="color: #228B22;"># Qualit? de repr?sentation des individus</span>
&nbsp;
pca$ind$contrib <span style="color: #228B22;"># Contribution des individus aux axes factoriels</span>
&nbsp;</pre></pre></div><br />
<br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-enregistrement-des-resultat-de-l-acp-dans-un-fichier">Enregistrement des r?sultat de l'ACP dans un fichier</h2><br />
<br />
<span class="formatter-code">Code R :</span><div class="code"><pre style="display:inline;"><pre class="r" style="font-family:monospace;">write.<span style="">infile</span><span style="color: #080;">&#40;</span>pca, <span style="color: #0000FF; font-weight: bold;">file</span><span style="color: #080;">=</span><span style="color: #ff0000;">"pca_result.txt"</span>, sep<span style="color: #080;">=</span><span style="color: #ff0000;">"<span style="color: #000099; font-weight: bold;">\t</span>"</span><span style="color: #080;">&#41;</span></pre></pre></div><br />
<br />
<img src="https://www.sthda.com/french/french/templates/sthda_design/images/success.png" alt="" class="valign_" /> T?l?charger le fichier g?n?r? en cliquant sur le lien suivant:  <a href="https://www.sthda.com/french/french/upload/pca_result3614.txt">pca_result3614.txt</a><br />
<strong><br />
<br />
<br />
Le fichier contient:</strong><br />
<strong>eig:</strong> correspondant aux valeurs propres, le % de variance et le % de variance cumul?e<br />
<strong> var</strong>: Contient les r?sultats pour les variables actives (coordonn?es, corr?lation entre les variables et les axes, COS2, contributions);<br />
<strong>ind :</strong> Contient les r?sultats pour les individus actifs (coordonn?es COS2, contributions);<br />
<strong>ind.sup </strong>: Contient les r?sultats pour les individus suppl?mentaires (coordonn?es COS2);<br />
<strong>quanti.sup</strong> : R?sultats pour les variables suppl?mentaires quantitatives (coordonn?es, corr?lation entre les variables et les axes).<br />
<strong>quali.sup</strong> : R?sultats pour les variables qualitatives suppl?mentaires (coordonn?es, des cat?gories de chacun des variables ).<br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-voir-aussi">Voir aussi</h2><br />
<br />
<a href="https://www.sthda.com/french/french/wiki/analyse-en-composante-principale-avec-r-et-rquery">Analyse en composante principale avec R et RQuery en partant de z?ro connaissance</a>]]></description>
			<pubDate>Thu, 17 May 2012 11:21:40 +0200</pubDate>
			
		</item>
		
		<item>
			<title><![CDATA[Transposer une table de données avec R]]></title>
			<link>https://www.sthda.com/french/wiki/transposer-une-table-de-donnees-avec-r</link>
			<guid>https://www.sthda.com/french/wiki/transposer-une-table-de-donnees-avec-r</guid>
			<description><![CDATA[Pour transposer une data frame ou une matrice, on utilise la fonction <strong><span style="color:blue;">t()</span></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;">t</span><span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">data</span> <span style="color: #0000FF; font-weight: bold;">frame</span><span style="color: #080;">&#41;</span></pre></pre></div><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: #CC9900; font-weight: bold;">mtcars</span>
<span style="color: #0000FF; font-weight: bold;">t</span><span style="color: #080;">&#40;</span><span style="color: #CC9900; font-weight: bold;">mtcars</span><span style="color: #080;">&#41;</span>
&nbsp;</pre></pre></div><br />
<br />
<br />
<p class="float-left"><a href="https://www.sthda.com/french/french/wiki/fusion-des-donnees-avec-r">? Cours pr?c?dent</a><br />
Fusion des donn?es avec R</p><br />
<p class="float-right"><a href="https://www.sthda.com/french/french/wiki/statistiques-descriptives-avec-r">Cours suivant ?</a><br />
Statistiques descriptives avec R</p>]]></description>
			<pubDate>Tue, 15 May 2012 23:50:23 +0200</pubDate>
			
		</item>
		
		<item>
			<title><![CDATA[Exécution d'un script R contenu dans un fichier et redirection des résultats R vers un fichier]]></title>
			<link>https://www.sthda.com/french/wiki/execution-d-un-script-r-contenu-dans-un-fichier-et-redirection-des-resultats-r-vers-un-fichier</link>
			<guid>https://www.sthda.com/french/wiki/execution-d-un-script-r-contenu-dans-un-fichier-et-redirection-des-resultats-r-vers-un-fichier</guid>
			<description><![CDATA[<h2 class="formatter-title wiki-paragraph-2" id="paragraph-execution-de-commandes-contenues-dans-un-fichier">Ex?cution de commandes contenues dans un fichier </h2><br />
<br />
Soit le fichier <strong>commandes.R</strong> contenant une liste de commandes a ex?cuter.<br />
<br />
Pour ex?cuter le fichier, la commande est la suivante:<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;">source</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">'chemin/absolu/commandes.R'</span><span style="color: #080;">&#41;</span></pre></pre></div><br />
<br />
<span class="warning">Sur le syst?me <strong>Windows</strong> ceci peut ?tre effectu? de mani?re interactive en cliquant sur le menu <strong>Fichier -> puis sourcer un fichier</strong></span><br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-rediriger-automatiquement-la-sortie-de-r-resultats-r-vers-un-fichier">Rediriger automatiquement la sortie de R (r?sultats R) vers un fichier</h2><br />
<br />
Pour cela il faut utiliser la fonction R <span style="color:blue;"><strong>sink()</strong></span>. Pour mettre fin ? la fonction <strong>sink</strong>, il faudrait taper ? nouveau la commande <strong>sink()</strong>.<br />
<br />
Soit '<strong>resultat.txt</strong>', le fichier dans lequel on souhaite rediriger automatiquement les r?sultats R.<br />
<br />
<br />
La commande ? utiliser est la suivante:<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;">sink</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">'resultat.txt'</span><span style="color: #080;">&#41;</span></pre></pre></div><br />
<br />
Pour stopper la redirection vers le fichier et restaurer la sortie vers la console R , il faut ? nouveau utiliser la commande <span style="color:blue;"><strong>sink</strong></span> de la fa?on suivante :<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;">sink</span><span style="color: #080;">&#40;</span><span style="color: #080;">&#41;</span></pre></pre></div><br />
<br />
<br />
<strong>Un autre exemple :</strong><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: #0000FF; font-weight: bold;">sink</span><span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">file</span><span style="color: #080;">=</span><span style="color: #ff0000;">'myfile'</span>, <span style="color: #0000FF; font-weight: bold;">append</span><span style="color: #080;">=</span>FALSE, <span style="color: #0000FF; font-weight: bold;">split</span> <span style="color: #080;">=</span>FALSE<span style="color: #080;">&#41;</span> <span style="color: #228B22;">#permet d?ex?cuter un script contenu dans un fichier externe</span>
&nbsp;
&nbsp;
<span style="color: #0000FF; font-weight: bold;">sink</span><span style="color: #080;">&#40;</span><span style="color: #080;">&#41;</span> <span style="color: #228B22;"># Pour mettre fin ? la fonction sink();</span>
&nbsp;</pre></pre></div><br />
<br />
<span class="warning">Si<strong> append = TRUE</strong>, la sortie est ajout?e ? la fin du fichier. Dans le cas contraire, le contenu du fichier est ?cras?.<br />
Si <strong>split = TRUE</strong>, la sortie est affich? ? l'?cran et en m?me temps enregistr? dans le fichier.</span><br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-rediriger-un-graphique-vers-un-fichier">Rediriger un graphique vers un fichier</h2><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: #0000FF; font-weight: bold;">pdf</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">"mygraph.pdf"</span><span style="color: #080;">&#41;</span>     <span style="color: #228B22;"># cr?ation de fichier pdf </span>
<span style="color: #0000FF; font-weight: bold;">png</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">"mygraph.png"</span><span style="color: #080;">&#41;</span> <span style="color: #228B22;"># Cr?ation de fichier png</span>
<span style="color: #0000FF; font-weight: bold;">jpeg</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">"mygraph.jpg"</span><span style="color: #080;">&#41;</span> <span style="color: #228B22;"># Cr?ation de fichier jpeg</span>
<span style="color: #0000FF; font-weight: bold;">bmp</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">"mygraph.bmp"</span><span style="color: #080;">&#41;</span> <span style="color: #228B22;"># Cr?ation de fichier bmp</span>
<span style="color: #0000FF; font-weight: bold;">postscript</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">"mygraph.ps"</span><span style="color: #080;">&#41;</span>     <span style="color: #228B22;"># Cr?ation de fichier ps</span>
<span style="color: #0000FF; font-weight: bold;">dev.<span style="">off</span></span><span style="color: #080;">&#40;</span><span style="color: #080;">&#41;</span> <span style="color: #228B22;"># pour arr?ter la redirection du graphique </span>
&nbsp;</pre></pre></div><br />
<br />
<span class="notice">Ne pas oubliez d'utiliser dev.off() pour marquer la fin du fichier. Dans le cas contraire, le fichier sera consid?r? comme ?tant toujours en cours d'utilisation et vous ne pourrez pas l'ouvrir.</span><br />
<br />
<strong>Exemple :</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;">jpeg</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">"plot.jpg"</span><span style="color: #080;">&#41;</span><span style="color: #228B22;"># cr?ation d'un fichier .jpg qui va contenir le graphique</span>
<span style="color: #0000FF; font-weight: bold;">barplot</span><span style="color: #080;">&#40;</span><span style="color: #ff0000;">1</span><span style="color: #080;">:</span><span style="color: #ff0000;">10</span><span style="color: #080;">&#41;</span>
<span style="color: #0000FF; font-weight: bold;">dev.<span style="">off</span></span><span style="color: #080;">&#40;</span><span style="color: #080;">&#41;</span><span style="color: #228B22;"># Marque la fin de la redirection du graphique vers le fichier .jpg</span></pre></pre></div><br />
<br />
<p class="float-left"> <a href="https://www.sthda.com/french/french/wiki/l-espace-de-travail-r">? Cours pr?c?dent</a><br />
L'espace de travail R</p><br />
<p class="float-right"><a href="https://www.sthda.com/french/french/wiki/packages-r">Cours suivant ?</a><br />
Packages R</p>]]></description>
			<pubDate>Tue, 08 May 2012 09:26:06 +0200</pubDate>
			
		</item>
		
		<item>
			<title><![CDATA[Fusion des données avec R]]></title>
			<link>https://www.sthda.com/french/wiki/fusion-des-donnees-avec-r</link>
			<guid>https://www.sthda.com/french/wiki/fusion-des-donnees-avec-r</guid>
			<description><![CDATA[<h2 class="formatter-title wiki-paragraph-2" id="paragraph-ajouter-des-colonnes">Ajouter des colonnes</h2><br />
<br />
La fonction <strong><span style="color:blue;">merge()</span></strong> permet de fusionner 2 data frames horizontalement par une ou deux variables communes.<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;">merge</span><span style="color: #080;">&#40;</span>x, y, <span style="color: #0000FF; font-weight: bold;">by</span> <span style="color: #080;">=</span><span style="color: #ff0000;">"name"</span><span style="color: #080;">&#41;</span> <span style="color: #228B22;"># fusionne les data frames x et y par la colonne name.</span></pre></pre></div><br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-ajouter-des-lignes">Ajouter des lignes</h2><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;">rbind</span><span style="color: #080;">&#40;</span><span style="color: #0000FF; font-weight: bold;">data</span> <span style="color: #0000FF; font-weight: bold;">frame</span> A, <span style="color: #0000FF; font-weight: bold;">data</span> <span style="color: #0000FF; font-weight: bold;">frame</span> B<span style="color: #080;">&#41;</span> <span style="color: #228B22;"># ajoute data frame B ? la suite de data frame A (en ligne).</span></pre></pre></div><br />
<br />
Les deux data frames doivent les m?mes variables (les m?mes colonnes).<br />
<br />
<br />
<p class="float-left">[url=/wiki/tri-des-donnees-avec-r]? Cours pr?c?dent<br />
[/url]Tri des donn?es avec R</p><br />
<p class="float-right"><a href="https://www.sthda.com/french/french/wiki/transposer-une-table-de-donnees-avec-r">Cours suivant ?</a><br />
Transposer une table de donn?es avec R</p>]]></description>
			<pubDate>Sun, 06 May 2012 14:24:19 +0200</pubDate>
			
		</item>
		
		<item>
			<title><![CDATA[Les opérateurs arithmétiques et logiques]]></title>
			<link>https://www.sthda.com/french/wiki/les-operateurs-arithmetiques-et-logiques</link>
			<guid>https://www.sthda.com/french/wiki/les-operateurs-arithmetiques-et-logiques</guid>
			<description><![CDATA[<h2 class="formatter-title wiki-paragraph-2" id="paragraph-operateurs-arithmetiques">Op?rateurs arithm?tiques</h2><br />
<br />
<table class="formatter-table">
    <tr class="formatter-table-row">
        <th class="formatter-table-head" colspan="1">Op?rateurs</th>
                <th class="formatter-table-head" colspan="1">Descriptions</th>
    </tr>
    <tr class="formatter-table-row">
        <td class="formatter-table-col">+</td>
        <td class="formatter-table-col">addition</td>
    </tr>
    <tr class="formatter-table-row">
        <td class="formatter-table-col">-</td>
        <td class="formatter-table-col">Soustraction</td>
    </tr>
    <tr class="formatter-table-row">
        <td class="formatter-table-col">*</td>
        <td class="formatter-table-col">multiplication</td>
    </tr>
    <tr class="formatter-table-row">
        <td class="formatter-table-col">/</td>
        <td class="formatter-table-col">division</td>
    </tr>
    <tr class="formatter-table-row">
        <td class="formatter-table-col">^ ou **</td>
        <td class="formatter-table-col">exposant</td>
    </tr>
        <tr class="formatter-table-row">
        <td class="formatter-table-col">^ ou **</td>
        <td class="formatter-table-col">exposant</td>
    </tr>
        <tr class="formatter-table-row">
        <td class="formatter-table-col">x %% y </td>
        <td class="formatter-table-col">modulo (x mod y) 5%%2 est 1</td>
    </tr>
        <tr class="formatter-table-row">
        <td class="formatter-table-col">x %/% y</td>
        <td class="formatter-table-col">Partie enti?re de la division 5%/%2 est 2</td>
    </tr>

</table><br />
<br />
<br />
<h2 class="formatter-title wiki-paragraph-2" id="paragraph-operateurs-logiques">Op?rateurs logiques</h2><br />
<br />
<table class="formatter-table">
    <tr class="formatter-table-row">
        <th class="formatter-table-head">Op?rateurs</th>
                <th class="formatter-table-head">Descriptions</th>
    </tr>
    <tr class="formatter-table-row">
        <td class="formatter-table-col"><</td>
        <td class="formatter-table-col">Inf?rieur ?</td>
    </tr>
    <tr class="formatter-table-row">
        <td class="formatter-table-col"><=</td>
        <td class="formatter-table-col">inf?rieur ou ?gal ?</td>
    </tr>
    <tr class="formatter-table-row">
        <td class="formatter-table-col">></td>
        <td class="formatter-table-col">sup?rieur</td>
    </tr>
    <tr class="formatter-table-row">
        <td class="formatter-table-col">>=</td>
        <td class="formatter-table-col">sup?rieur ou ?gal ?</td>
    </tr>
    <tr class="formatter-table-row">
        <td class="formatter-table-col">==</td>
        <td class="formatter-table-col">exactement ?gale ?</td>
    </tr>
    <tr class="formatter-table-row">
        <td class="formatter-table-col">!=</td>
        <td class="formatter-table-col">Diff?rent</td>
    </tr>
        <tr class="formatter-table-row">
        <td class="formatter-table-col">x|y</td>
        <td class="formatter-table-col">x ou y</td>
    </tr>
         <tr class="formatter-table-row">
        <td class="formatter-table-col">&</td>
        <td class="formatter-table-col">ET</td>
    </tr>
        <tr class="formatter-table-row">
        <td class="formatter-table-col">isTRUE(x)</td>
        <td class="formatter-table-col">Teste si x est vrai</td>
    </tr>
</table><br />
<br />
<br />
<p class="float-left"><a href="https://www.sthda.com/french/french/wiki/exportation-des-donnees-de-r-vers-un-fichier">? Cours pr?c?dent</a><br />
Exportation des donn?es de R vers un fichier</p><br />
<p class="float-right"><a href="https://www.sthda.com/french/french/wiki/quelques-grandes-fonctions-de-r">Cours suivant ?</a><br />
Quelques grandes fonctions de R</p>]]></description>
			<pubDate>Thu, 03 May 2012 01:06:38 +0200</pubDate>
			
		</item>
		
	</channel>
</rss>
