<?xml version="1.0" encoding="UTF-8" ?>
<!-- RSS generated by PHPBoost on Sun, 17 May 2026 06:52:01 +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/38" rel="self" type="application/rss+xml"/>
		<link>https://www.sthda.com</link>
		<description><![CDATA[Last articles of the category: Importing Data Into R]]></description>
		<copyright>(C) 2005-2026 PHPBoost</copyright>
		<language>en</language>
		<generator>PHPBoost</generator>
		
		
		<item>
			<title><![CDATA[Importing Data Into R]]></title>
			<link>https://www.sthda.com/english/wiki/importing-data-into-r</link>
			<guid>https://www.sthda.com/english/wiki/importing-data-into-r</guid>
			<description><![CDATA[<!-- START HTML -->

  <!--====================== start from here when you copy to sthda================-->  
  <div id="rdoc">

<p><br/></p>
<style>#rdoc .course_material a{font-size:1.5em;} #rdoc .readmore a{font-size:1em;}</style>
<p>In the previous chapter we described the <a href="https://www.sthda.com/english/english/wiki/r-basics-quick-and-easy">essentials of R programming</a>. Here, you’ll learn how to <strong>import data</strong> from <strong>txt</strong>, <strong>csv</strong>, <strong>Excel</strong> (xls, xlsx) into <strong>R</strong>.</p>
<div class="block">
<ul>
<li><a href="https://www.sthda.com/english/english/wiki/best-practices-in-preparing-data-files-for-importing-into-r">Best practices in preparing data files for importing into R</a></li>
<li><a href="https://www.sthda.com/english/english/wiki/reading-data-from-txt-csv-files-r-base-functions">Reading data from txt|csv files: R base functions</a></li>
<li><a href="https://www.sthda.com/english/english/wiki/fast-reading-of-data-from-txt-csv-files-into-r-readr-package">Fast Reading of Data From txt|csv Files into R: readr package</a></li>
<li><a href="https://www.sthda.com/english/english/wiki/reading-data-from-excel-files-xls-xlsx-into-r">Reading data From Excel Files (xls|xlsx) into R</a></li>
</ul>
</div>
<p><br/></p>
<img src="https://www.sthda.com/english/sthda/RDoc/images/importing-data-into-r.png" alt="Importing data into R" /> <br/>
<hr/>
<p><br/></p>
<br/>
<div class="course_material">
<ol style="list-style-type: decimal">
<li><a href="https://www.sthda.com/english/english/wiki/best-practices-in-preparing-data-files-for-importing-into-r"><i class="fa fa-folder-open"></i> <strong>Best practices in preparing data files for importing into R</strong></a></li>
</ol>
<p><img src="https://www.sthda.com/english/sthda/RDoc/images/best-practices-excel-file-highlighted.png" alt="Excel file" /></p>
<p><span class="success readmore">Read more: <a href="https://www.sthda.com/english/english/wiki/best-practices-in-preparing-data-files-for-importing-into-r"><i class="fa fa-play"></i> Best practices in preparing data files for importing into R</a></span> 
</p>
<ol start="2" style="list-style-type: decimal">
<li><a href="https://www.sthda.com/english/english/wiki/reading-data-from-txt-csv-files-r-base-functions"><i class="fa fa-folder-open"></i> <strong>Reading data from txt|csv files: R base functions</strong></a></li>
</ol>
<ul>
<li>R base functions for importing data: <strong>read.table</strong>(), <strong>read.delim</strong>(), <strong>read.csv</strong>(), <strong>read.csv2</strong>()</li>
<li>Reading a local file</li>
<li>Reading a file from internet</li>
</ul>
<p><img src="https://www.sthda.com/english/sthda/RDoc/images/import-txt-csv-into-r-base-functions.png" alt="Reading Data From txt|csv Files: R Base Functions" /></p>
<pre class="r"><code># Read tab separated values
read.delim(file.choose())

# Read comma (",") separated values
read.csv(file.choose())

# Read semicolon (";") separated values
read.csv2(file.choose())</code></pre>
<p><span class="success readmore">Read more: <a href="https://www.sthda.com/english/english/wiki/reading-data-from-txt-csv-files-r-base-functions"><i class="fa fa-play"></i> Reading data from txt|csv files: R base functions</a></span></p>
<p>
</p>
<ol start="3" style="list-style-type: decimal">
<li><a href="https://www.sthda.com/english/english/wiki/fast-reading-of-data-from-txt-csv-files-into-r-readr-package"><i class="fa fa-folder-open"></i> <strong>Fast Reading of Data From txt|csv Files into R: readr package</strong></a></li>
</ol>
<ul>
<li>Functions for reading txt|csv files: <strong>read_delim</strong>(), <strong>read_tsv</strong>(), <strong>read_csv</strong>(), <strong>read_csv2</strong>()</li>
<li>Reading a file
<ul>
<li>Reading a local file</li>
<li>Reading a file from internet</li>
<li>In the case of parsing problems</li>
</ul></li>
<li>Specify column types</li>
<li>Reading lines from a file: <strong>read_lines</strong>()</li>
<li>Read whole file: <strong>read_file</strong>()</li>
</ul>
<p><img src="https://www.sthda.com/english/sthda/RDoc/images/import-txt-csv-into-r-readr-package.png" alt="Reading Data From txt|csv Files: readr package" /></p>
<pre class="r"><code>library("readr")

# Read tab separated values
read_tsv(file.choose())

# Read comma (",") separated values
read_csv(file.choose())

# Read semicolon (";") separated values
read_csv2(file.choose())</code></pre>
<p><span class="success readmore">Read more: <a href="https://www.sthda.com/english/english/wiki/fast-reading-of-data-from-txt-csv-files-into-r-readr-package"><i class="fa fa-play"></i>Fast Reading of Data From txt|csv Files into R: readr package</a></span></p>
<p>
</p>
<ol start="4" style="list-style-type: decimal">
<li><a href="https://www.sthda.com/english/english/wiki/reading-data-from-excel-files-xls-xlsx-into-r"><i class="fa fa-folder-open"></i> <strong>Reading data From Excel Files (xls|xlsx) into R</strong></a></li>
</ol>
<ul>
<li>Copying data from Excel and import into R</li>
<li>Importing Excel files into R using readxl package</li>
<li>Importing Excel files using xlsx package</li>
</ul>
<p><img src="https://www.sthda.com/english/sthda/RDoc/images/read-excel-files.png" alt="Reading Data From Excel Files (xls|xlsx) into R" /> <br/></p>
<pre class="r"><code># Use readxl package to read xls|xlsx
library("readxl")
my_data <- read_excel("my_file.xlsx")

# Use xlsx package
library("xlsx")
my_data <- read.xlsx("my_file.xlsx") </code></pre>
<p><span class="success readmore">Read more: <a href="https://www.sthda.com/english/english/wiki/reading-data-from-excel-files-xls-xlsx-into-r"><i class="fa fa-play"></i>Reading data From Excel Files (xls|xlsx) into R</a></span></p>
</div>
<p><br/></p>

<script>jQuery(document).ready(function () {
    jQuery('h1').addClass('wiki_paragraph1');
    jQuery('h2').addClass('wiki_paragraph2');
    jQuery('h3').addClass('wiki_paragraph3');
    jQuery('h4').addClass('wiki_paragraph4');
    });//add phpboost class to header</script>
<style>.content{padding:0px;}</style>
</div><!--end rdoc-->
<!--====================== stop here when you copy to sthda================-->


<!-- END HTML -->]]></description>
			<pubDate>Sun, 10 Apr 2016 18:17:46 +0200</pubDate>
			
		</item>
		
		<item>
			<title><![CDATA[Fast Reading of Data From TXT|CSV Files into R: readr package]]></title>
			<link>https://www.sthda.com/english/wiki/fast-reading-of-data-from-txt-csv-files-into-r-readr-package</link>
			<guid>https://www.sthda.com/english/wiki/fast-reading-of-data-from-txt-csv-files-into-r-readr-package</guid>
			<description><![CDATA[<!-- START HTML -->

  <!--====================== start from here when you copy to sthda================-->  
  <div id="rdoc">


<div id="TOC">
<ul>
<li><a href="#preleminary-tasks">Preleminary tasks</a></li>
<li><a href="#installing-and-loading-readr">Installing and loading readr</a></li>
<li><a href="#functions-for-reading-delimited-files-txtcsv">Functions for reading delimited files: txt|csv</a></li>
<li><a href="#reading-a-file">Reading a file</a><ul>
<li><a href="#reading-a-local-file">Reading a local file</a></li>
<li><a href="#reading-a-file-from-internet">Reading a file from internet</a></li>
<li><a href="#in-the-case-of-parsing-problems">In the case of parsing problems</a></li>
</ul></li>
<li><a href="#specify-column-types">Specify column types</a></li>
<li><a href="#reading-lines-from-a-file">Reading lines from a file</a></li>
<li><a href="#read-whole-file">Read whole file</a></li>
<li><a href="#summary">Summary</a></li>
<li><a href="#related-articles">Related articles</a></li>
<li><a href="#infos">Infos</a></li>
</ul>
</div>

<p><br/></p>
<p>There are many solutions for <strong>importing</strong> <strong>txt|csv</strong> file into <strong>R</strong>. In our previous articles, we described some <a href="https://www.sthda.com/english/english/wiki/best-practices-in-preparing-data-files-for-importing-into-r">best practices for preparing your data</a> as well as <a href="https://www.sthda.com/english/english/wiki/reading-data-from-txt-csv-files-r-base-functions">R base functions</a> (read.delim() and read.csv()) for importing txt|csv file into R.</p>
<br/>
<div class="block">
<p>In this article, we’ll describe the <strong>readr</strong> package, developed by Hadley Wickham. <strong>readr</strong> package provides a fast and friendly solution to read a delimited file into R.</p>
<p>Compared to R base functions, <strong>readr</strong> functions are:</p>
<ol style="list-style-type: decimal">
<li>much <strong>faster</strong> (X10),</li>
<li>have a <strong>helpful progress bar</strong> if loading is going to take a while and</li>
<li>all functions work exactly the same way.</li>
</ol>
</div>
<p><br/></p>
<p><img src="https://www.sthda.com/english/sthda/RDoc/images/import-txt-csv-into-r-readr-package.png" alt="Reading Data From txt|csv Files: readr package" /> <br/></p>
<div id="preleminary-tasks" class="section level1">
<h1>Preleminary tasks</h1>
<ol style="list-style-type: decimal">
<li><p><strong>Launch RStudio</strong> as described here: <a href="https://www.sthda.com/english/english/wiki/running-rstudio-and-setting-up-your-working-directory-easy-r-programming">Running RStudio and setting up your working directory</a></p></li>
<li><p><strong>Prepare your data</strong> as described here: <a href="https://www.sthda.com/english/english/wiki/best-practices-in-preparing-data-files-for-importing-into-r">Best practices for preparing your data</a></p></li>
</ol>
</div>
<div id="installing-and-loading-readr" class="section level1">
<h1>Installing and loading readr</h1>
<pre class="r"><code># Installing
install.packages("readr")

# Loading
library("readr")</code></pre>
<p><span class="success">The <strong>readr</strong> package contains functions for reading i) delimited files, ii) lines and iii) the whole file.</span></p>
</div>
<div id="functions-for-reading-delimited-files-txtcsv" class="section level1">
<h1>Functions for reading delimited files: txt|csv</h1>
<p>The function <strong>read_delim</strong>()[in <strong>readr</strong> package] is a general function to import a data table into R. Depending on the format of your file, you can also use:</p>
<br/>
<div class="block">
<ul>
<li><strong>read_csv</strong>(): to read a comma (“,”) separated values</li>
<li><strong>read_csv2</strong>(): to read a semicolon (“;”) separated values</li>
<li><strong>read_tsv</strong>(): to read a tab separated (“\t”) values</li>
</ul>
</div>
<p><br/></p>
<p>The simplified format of these functions are, as follow:</p>
<pre class="r"><code># General function
read_delim(file, delim, col_names = TRUE)

# Read comma (",") separated values
read_csv(file, col_names = TRUE)

# Read semicolon (";") separated values
# (this is common in European countries)
read_csv2(file, col_names = TRUE)
    
# Read tab separated values
read_tsv(file, col_names = TRUE)</code></pre>
<br/>
<div class="block">
<ul>
<li><strong>file</strong>: file path, connexion or raw vector. Files ending in .gz, .bz2, .xz, or .zip will be automatically uncompressed. Files starting with “<a href="http://" class="uri">http://</a>”, “<a href="https://" class="uri">https://</a>”, “<a href="ftp://" class="uri">ftp://</a>”, or “ftps://” will be automatically downloaded. Remote gz files can also be automatically downloaded &amp; decompressed.</li>
<li><strong>delim</strong>: the character that separates the values in the data file.</li>
<li><strong>col_names</strong>: Either TRUE, FALSE or a character vector specifying column names. If TRUE, the first row of the input will be used as the column names.</li>
</ul>
</div>
<p><br/></p>
<p><span class="notice"><strong>read_csv</strong>() and <strong>read_tsv</strong>() are special case of the general function <strong>read_delim</strong>(). They’re useful for reading the most common types of <strong>flat file</strong> data, comma separated values and tab separated values, respectively. </span></p>
<p><span class="success">The above mentioned functions return an object of class <strong>tbl_df</strong> which is data frame providing a nicer printing method, useful when working with large data sets.</span></p>
</div>
<div id="reading-a-file" class="section level1">
<h1>Reading a file</h1>
<div id="reading-a-local-file" class="section level2">
<h2>Reading a local file</h2>
<ul>
<li>To import a local .txt or .csv files, the syntax would be:</li>
</ul>
<pre class="r"><code># Read a txt file, named "mtcars.txt"
my_data <- read_tsv("mtcars.txt")

# Read a csv file, named "mtcars.csv"
my_data <- read_csv("mtcars.csv")</code></pre>
<p><span class="warning">The above R code, assumes that the file “mtcars.txt” or “mtcars.csv” is in your current <a href="https://www.sthda.com/english/english/wiki/running-rstudio-and-setting-up-your-working-directory-easy-r-programming">working directory</a>. To know your current working directory, type the function <strong>getwd</strong>() in R console.</span></p>
<ul>
<li>It’s also possible to choose a file interactively using the function <strong>file.choose</strong>(), which I recommend if you’re a beginner in R programming:</li>
</ul>
<pre class="r"><code># Read a txt file
my_data <- read_tsv(file.choose())

# Read a csv file
my_data <- read_csv(file.choose())</code></pre>
<p><span class="success">If you use the R code above in RStudio, you will be asked to choose a file.</span></p>
<ul>
<li>If your field separator is for example “|”, it’s possible to use the general function <strong>read_delim</strong>(), which reads in files with a user supplied delimiter:</li>
</ul>
<pre class="r"><code>my_data <- read_delim(file.choose(), sep = "|")</code></pre>
</div>
<div id="reading-a-file-from-internet" class="section level2">
<h2>Reading a file from internet</h2>
<p>It’s possible to use the functions <strong>read_delim</strong>(), <strong>read_csv</strong>() and <strong>read_tsv</strong>() to import files from the web.</p>
<pre class="r"><code>my_data <- read_tsv("https://www.sthda.com/upload/boxplot_format.txt")
head(my_data)</code></pre>
<pre><code>   Nom variable Group
1 IND1       10     A
2 IND2        7     A
3 IND3       20     A
4 IND4       14     A
5 IND5       14     A
6 IND6       12     A</code></pre>
</div>
<div id="in-the-case-of-parsing-problems" class="section level2">
<h2>In the case of parsing problems</h2>
<p><span class="error">If there are parsing problems, a warning tells you how many, and you can retrieve the details with the function <strong>problems</strong>().</span></p>
<pre class="r"><code>my_data <- read_csv(file.choose())
problems(my_data)</code></pre>
</div>
</div>
<div id="specify-column-types" class="section level1">
<h1>Specify column types</h1>
<p>There are <a href="https://www.sthda.com/english/english/wiki/easy-r-programming-basics#basic-data-types">different types of data</a>: numeric, character, logical, …</p>
<p><strong>readr</strong> tries to guess automatically the type of data contained in each column. You might see a lot of warnings in a situation where <strong>readr</strong> has guessed the column type incorrectly. To fix these problems you can use the additional arguments <strong>col_type</strong>() to specify the data type of each column.</p>
<p>The following column types are available:</p>
<br/>
<div class="block">
<ul>
<li><strong>col_integer</strong>(): to specify integer (alias = “i”)</li>
<li><strong>col_double</strong>(): to specify double (alias = “d”).</li>
<li><strong>col_logical</strong>(): to specify logical variable (alias = “l”)</li>
<li><strong>col_character</strong>(): leaves strings as is. Don’t convert it to a factor (alias = “c”).</li>
<li><strong>col_factor</strong>(): to specify a factor (or grouping) variable (alias = “f”)</li>
<li><strong>col_skip</strong>(): to ignore a column (alias = “-” or “_“)</li>
<li><strong>col_date</strong>() (alias = “D”), <strong>col_datetime</strong>() (alias = “T”) and <strong>col_time</strong>() (“t”) to specify dates, date times, and times.</li>
</ul>
</div>
<p><br/></p>
<p>An example is as follow (column x is an integer (i) and column treatment = “character” (c):</p>
<pre class="r"><code>read_csv("my_file.csv", col_types = cols(
  x = "i", # integer column
  treatment = "c" # character column
))</code></pre>
</div>
<div id="reading-lines-from-a-file" class="section level1">
<h1>Reading lines from a file</h1>
<p>Function: <strong>read_lines</strong>().</p>
<ol style="list-style-type: decimal">
<li><strong>Simplified format</strong>:</li>
</ol>
<pre class="r"><code>read_lines(file, skip = 0, n_max = -1L)</code></pre>
<br/>
<div class="block">
<ul>
<li><strong>file</strong>: file path</li>
<li><strong>skip</strong>: Number of lines to skip before reading data</li>
<li><strong>n_max</strong>: Numbers of lines to read. If n is -1, all lines in file will be read.</li>
</ul>
</div>
<p><br/></p>
<p><span class="success">The function <strong>read_lines</strong>() returns a character vector with one element for each line. </span></p>
<ol start="2" style="list-style-type: decimal">
<li><strong>Example of usage</strong></li>
</ol>
<pre class="r"><code># Demo file
my_file <- system.file("extdata/mtcars.csv", package = "readr")
# Read lines
my_data <- read_lines(my_file)
head(my_data)</code></pre>
<pre><code>[1] "\"mpg\",\"cyl\",\"disp\",\"hp\",\"drat\",\"wt\",\"qsec\",\"vs\",\"am\",\"gear\",\"carb\""
[2] "21,6,160,110,3.9,2.62,16.46,0,1,4,4"                                                     
[3] "21,6,160,110,3.9,2.875,17.02,0,1,4,4"                                                    
[4] "22.8,4,108,93,3.85,2.32,18.61,1,1,4,1"                                                   
[5] "21.4,6,258,110,3.08,3.215,19.44,1,0,3,1"                                                 
[6] "18.7,8,360,175,3.15,3.44,17.02,0,0,3,2"                                                  </code></pre>
</div>
<div id="read-whole-file" class="section level1">
<h1>Read whole file</h1>
<ol style="list-style-type: decimal">
<li><strong>Simplified format</strong></li>
</ol>
<pre class="r"><code>read_file(file)</code></pre>
<ul>
<li><strong>Example of usage</strong></li>
</ul>
<pre class="r"><code># Demo file
my_file <- system.file("extdata/mtcars.csv", package = "readr")
# Read whole file
read_file(my_file)</code></pre>
<pre><code>[1] "\"mpg\",\"cyl\",\"disp\",\"hp\",\"drat\",\"wt\",\"qsec\",\"vs\",\"am\",\"gear\",\"carb\"\n21,6,160,110,3.9,2.62,16.46,0,1,4,4\n21,6,160,110,3.9,2.875,17.02,0,1,4,4\n22.8,4,108,93,3.85,2.32,18.61,1,1,4,1\n21.4,6,258,110,3.08,3.215,19.44,1,0,3,1\n18.7,8,360,175,3.15,3.44,17.02,0,0,3,2\n18.1,6,225,105,2.76,3.46,20.22,1,0,3,1\n14.3,8,360,245,3.21,3.57,15.84,0,0,3,4\n24.4,4,146.7,62,3.69,3.19,20,1,0,4,2\n22.8,4,140.8,95,3.92,3.15,22.9,1,0,4,2\n19.2,6,167.6,123,3.92,3.44,18.3,1,0,4,4\n17.8,6,167.6,123,3.92,3.44,18.9,1,0,4,4\n16.4,8,275.8,180,3.07,4.07,17.4,0,0,3,3\n17.3,8,275.8,180,3.07,3.73,17.6,0,0,3,3\n15.2,8,275.8,180,3.07,3.78,18,0,0,3,3\n10.4,8,472,205,2.93,5.25,17.98,0,0,3,4\n10.4,8,460,215,3,5.424,17.82,0,0,3,4\n14.7,8,440,230,3.23,5.345,17.42,0,0,3,4\n32.4,4,78.7,66,4.08,2.2,19.47,1,1,4,1\n30.4,4,75.7,52,4.93,1.615,18.52,1,1,4,2\n33.9,4,71.1,65,4.22,1.835,19.9,1,1,4,1\n21.5,4,120.1,97,3.7,2.465,20.01,1,0,3,1\n15.5,8,318,150,2.76,3.52,16.87,0,0,3,2\n15.2,8,304,150,3.15,3.435,17.3,0,0,3,2\n13.3,8,350,245,3.73,3.84,15.41,0,0,3,4\n19.2,8,400,175,3.08,3.845,17.05,0,0,3,2\n27.3,4,79,66,4.08,1.935,18.9,1,1,4,1\n26,4,120.3,91,4.43,2.14,16.7,0,1,5,2\n30.4,4,95.1,113,3.77,1.513,16.9,1,1,5,2\n15.8,8,351,264,4.22,3.17,14.5,0,1,5,4\n19.7,6,145,175,3.62,2.77,15.5,0,1,5,6\n15,8,301,335,3.54,3.57,14.6,0,1,5,8\n21.4,4,121,109,4.11,2.78,18.6,1,1,4,2\n"</code></pre>
</div>
<div id="summary" class="section level1">
<h1>Summary</h1>
<br/>
<div class="block">
<ul>
<li><p>Import a local .txt file: <strong>read_tsv</strong>(file.choose())</p></li>
<li><p>Import a local .csv file: <strong>read_csv</strong>(file.choose())</p></li>
<li>Import a file from internet: <strong>read_delim</strong>(url) if a txt file or <strong>read_csv</strong>(url) if a csv file</li>
</ul>
</div>
<p><br/></p>
</div>
<div id="related-articles" class="section level1">
<h1>Related articles</h1>
<ul>
<li>Previous chapters
<ul>
<li><a href="https://www.sthda.com/english/english/wiki/r-basics-quick-and-easy">R programming basics</a></li>
<li><a href="https://www.sthda.com/english/english/wiki/best-practices-in-preparing-data-files-for-importing-into-r">Best practices in preparing data files for importing into R</a></li>
<li><a href="https://www.sthda.com/english/english/wiki/reading-data-from-txt-csv-files-r-base-functions">Reading data from txt|csv files: R base functions</a></li>
</ul></li>
<li>Next chapters
<ul>
<li><a href="https://www.sthda.com/english/english/wiki/reading-data-from-excel-files-xls-xlsx-into-r">Reading data from Excel files (xls|xlsx) into R</a></li>
<li><a href="https://www.sthda.com/english/english/wiki/exporting-data-from-r">Exporting data from R</a></li>
</ul></li>
</ul>
</div>
<div id="infos" class="section level1">
<h1>Infos</h1>
<p><span class="warning"> This analysis has been performed using R (ver. 3.2.3). </span></p>
</div>

<script>jQuery(document).ready(function () {
    jQuery('h1').addClass('wiki_paragraph1');
    jQuery('h2').addClass('wiki_paragraph2');
    jQuery('h3').addClass('wiki_paragraph3');
    jQuery('h4').addClass('wiki_paragraph4');
    });//add phpboost class to header</script>
<style>.content{padding:0px;}</style>
</div><!--end rdoc-->
<!--====================== stop here when you copy to sthda================-->


<!-- END HTML -->]]></description>
			<pubDate>Thu, 07 Apr 2016 21:38:07 +0200</pubDate>
			
		</item>
		
		<item>
			<title><![CDATA[Reading Data From Excel Files (xls|xlsx) into R]]></title>
			<link>https://www.sthda.com/english/wiki/reading-data-from-excel-files-xls-xlsx-into-r</link>
			<guid>https://www.sthda.com/english/wiki/reading-data-from-excel-files-xls-xlsx-into-r</guid>
			<description><![CDATA[<!-- START HTML -->

  <!--====================== start from here when you copy to sthda================-->  
  <div id="rdoc">


<div id="TOC">
<ul>
<li><a href="#preleminary-tasks">Preleminary tasks</a></li>
<li><a href="#copying-data-from-excel-and-import-into-r">Copying data from Excel and import into R</a><ul>
<li><a href="#on-windows-system">On Windows system</a></li>
<li><a href="#on-mac-osx-system">On Mac OSX system</a></li>
</ul></li>
<li><a href="#importing-excel-files-into-r-using-readxl-package">Importing Excel files into R using readxl package</a><ul>
<li><a href="#installing-and-loading-readxl-package">Installing and loading readxl package</a></li>
<li><a href="#using-readxl-package">Using readxl package</a></li>
</ul></li>
<li><a href="#importing-excel-files-using-xlsx-package">Importing Excel files using xlsx package</a><ul>
<li><a href="#installing-and-loading-xlsx-package">Installing and loading xlsx package</a></li>
<li><a href="#using-xlsx-package">Using xlsx package</a></li>
<li><a href="#read-more">Read more</a></li>
</ul></li>
<li><a href="#summary">Summary</a></li>
<li><a href="#related-articles">Related articles</a></li>
<li><a href="#infos">Infos</a></li>
</ul>
</div>

<p><br/></p>
<p>Previously, we described the <a href="https://www.sthda.com/english/english/wiki/r-basics-quick-and-easy">essentials of R programming</a> and some <a href="https://www.sthda.com/english/english/wiki/best-practices-in-preparing-data-files-for-importing-into-r">best practices for preparing your data</a>. We also provided quick start guides for <a href="https://www.sthda.com/english/english/wiki/reading-data-from-txt-csv-files-r-base-functions">reading</a> and <a href="https://www.sthda.com/english/english/wiki/writing-data-from-r-to-txt-csv-files-r-base-functions">writing</a> txt and csv files using <strong>R</strong> base functions as well as using a most modern R package named <a href="https://www.sthda.com/english/english/wiki/fast-reading-of-data-from-txt-csv-files-into-r-readr-package">readr</a>, which is faster (X10) than R base functions.</p>
<br/>
<div class="block">
<p>In this article, you’ll learn how to <strong>read data</strong> from <strong>Excel</strong> <strong>xls</strong> or <strong>xlsx</strong> file formats into <strong>R</strong>. This can be done either by:</p>
<ul>
<li><strong>copying data</strong> from Excel</li>
<li>using <strong>readxl</strong> package</li>
<li>or using <strong>xlsx</strong> package</li>
</ul>
</div>
<p><br/></p>
<p><img src="https://www.sthda.com/english/sthda/RDoc/images/read-excel-files.png" alt="Reading Data From Excel Files (xls|xlsx) into R" /> <br/></p>
<div id="preleminary-tasks" class="section level1">
<h1>Preleminary tasks</h1>
<ol style="list-style-type: decimal">
<li><p><strong>Launch RStudio</strong> as described here: <a href="https://www.sthda.com/english/english/wiki/running-rstudio-and-setting-up-your-working-directory-easy-r-programming">Running RStudio and setting up your working directory</a></p></li>
<li><p><strong>Prepare your data</strong> as described here: <a href="https://www.sthda.com/english/english/wiki/best-practices-in-preparing-data-files-for-importing-into-r">Best practices for preparing your data</a></p></li>
</ol>
</div>
<div id="copying-data-from-excel-and-import-into-r" class="section level1">
<h1>Copying data from Excel and import into R</h1>
<div id="on-windows-system" class="section level2">
<h2>On Windows system</h2>
<ol style="list-style-type: decimal">
<li><p><strong>Open</strong> the Excel file containing your data: <strong>select</strong> and <strong>copy the data</strong> (ctrl + c)</p></li>
<li><p>Type the R code below to import the copied data from the <strong>clipboard</strong> into R and store the data in a data frame (my_data):</p></li>
</ol>
<pre class="r"><code>my_data <- read.table(file = "clipboard", 
                      sep = "\t", header=TRUE)</code></pre>
</div>
<div id="on-mac-osx-system" class="section level2">
<h2>On Mac OSX system</h2>
<ol style="list-style-type: decimal">
<li><p><strong>Select</strong> and <strong>copy the data</strong> (Cmd + c)</p></li>
<li><p>Use the function <strong>pipe(pbpaste)</strong> to import the data you’ve copied (with Cmd + c):</p></li>
</ol>
<pre class="r"><code>my_data <- read.table(pipe("pbpaste"), sep="\t", header = TRUE)</code></pre>
</div>
</div>
<div id="importing-excel-files-into-r-using-readxl-package" class="section level1">
<h1>Importing Excel files into R using readxl package</h1>
<p>The <strong>readxl</strong> package, developed by Hadley Wickham, can be used to easily import Excel files (xls|xlsx) into R without any external dependencies.</p>
<div id="installing-and-loading-readxl-package" class="section level2">
<h2>Installing and loading readxl package</h2>
<ul>
<li>Install</li>
</ul>
<pre class="r"><code>install.packages("readxl")</code></pre>
<ul>
<li>Load</li>
</ul>
<pre class="r"><code>library("readxl")</code></pre>
</div>
<div id="using-readxl-package" class="section level2">
<h2>Using readxl package</h2>
<p>The <strong>readxl</strong> package comes with the function <strong>read_excel</strong>() to read xls and xlsx files</p>
<ol style="list-style-type: decimal">
<li><strong>Read both xls and xlsx files</strong></li>
</ol>
<pre class="r"><code># Loading
library("readxl")

# xls files
my_data <- read_excel("my_file.xls")

# xlsx files
my_data <- read_excel("my_file.xlsx")</code></pre>
<p><span class="warning">The above R code, assumes that the file “my_file.xls” and “my_file.xlsx” is in your current <a href="https://www.sthda.com/english/english/wiki/running-rstudio-and-setting-up-your-working-directory-easy-r-programming">working directory</a>. To know your current working directory, type the function <strong>getwd</strong>() in R console.</span></p>
<ul>
<li>It’s also possible to choose a file interactively using the function <strong>file.choose</strong>(), which I recommend if you’re a beginner in R programming:</li>
</ul>
<pre class="r"><code>my_data <- read_excel(file.choose())</code></pre>
<p><span class="success">If you use the R code above in RStudio, you will be asked to choose a file.</span></p>
<ol start="2" style="list-style-type: decimal">
<li><strong>Specify sheet with a number or name</strong></li>
</ol>
<pre class="r"><code># Specify sheet by its name
my_data <- read_excel("my_file.xlsx", sheet = "data")
  
# Specify sheet by its index
my_data <- read_excel("my_file.xlsx", sheet = 2)</code></pre>
<ol start="3" style="list-style-type: decimal">
<li><strong>Case of missing values: NA (not available)</strong>. If NAs are represented by something (example: “—”) other than blank cells, set the na argument:</li>
</ol>
<pre class="r"><code>my_data <- read_excel("my_file.xlsx", na = "---")</code></pre>
</div>
</div>
<div id="importing-excel-files-using-xlsx-package" class="section level1">
<h1>Importing Excel files using xlsx package</h1>
<p>The <strong>xlsx</strong> package, a java-based solution, is one of the powerful R packages to <strong>read</strong>, <strong>write</strong> and <strong>format</strong> <strong>Excel files</strong>.</p>
<div id="installing-and-loading-xlsx-package" class="section level2">
<h2>Installing and loading xlsx package</h2>
<ul>
<li>Install</li>
</ul>
<pre class="r"><code>install.packages("xlsx")</code></pre>
<ul>
<li>Load</li>
</ul>
<pre class="r"><code>library("xlsx")</code></pre>
</div>
<div id="using-xlsx-package" class="section level2">
<h2>Using xlsx package</h2>
<p>There are two main functions in <strong>xlsx</strong> package for reading both xls and xlsx Excel files: <strong>read.xlsx</strong>() and <strong>read.xlsx2</strong>() [faster on big files compared to read.xlsx function].</p>
<p>The simplified formats are:</p>
<pre class="r"><code>read.xlsx(file, sheetIndex, header=TRUE)

read.xlsx2(file, sheetIndex, header=TRUE)</code></pre>
<br/>
<div class="block">
<ul>
<li><strong>file</strong>: file path</li>
<li><strong>sheetIndex</strong>: the index of the sheet to be read</li>
<li><strong>header</strong>: a logical value. If TRUE, the first row is used as column names.</li>
</ul>
</div>
<p><br/></p>
<p>Example of usage:</p>
<pre class="r"><code>library("xlsx")
my_data <- read.xlsx(file.choose(), 1)  # read first sheet</code></pre>
</div>
<div id="read-more" class="section level2">
<h2>Read more</h2>
<p>Read more about for reading, writing and formatting Excel files:</p>
<ul>
<li><a href="https://www.sthda.com/english/english/wiki/r-xlsx-package-a-quick-start-guide-to-manipulate-excel-files-in-r">R xlsx package : A quick start guide to manipulate Excel files in R</a></li>
<li><a href="https://www.sthda.com/english/english/wiki/r2excel-read-write-and-format-easily-excel-files-using-r-software">r2excel package: Read, write and format easily Excel files using R software</a></li>
</ul>
</div>
</div>
<div id="summary" class="section level1">
<h1>Summary</h1>
<br/>
<div class="block">
<ul>
<li><p>Read Excel files using <strong>readxl</strong> package: <strong>read_excel</strong>(file.choose(), sheet = 1)</p></li>
<li>Read Excel files using <strong>xlsx</strong> package: <strong>read.xlsx</strong>(file.choose(), sheetIndex = 1)</li>
</ul>
</div>
<p><br/></p>
</div>
<div id="related-articles" class="section level1">
<h1>Related articles</h1>
<ul>
<li>Previous chapters
<ul>
<li><a href="https://www.sthda.com/english/english/wiki/r-basics-quick-and-easy">R programming basics</a></li>
<li><a href="https://www.sthda.com/english/english/wiki/best-practices-in-preparing-data-files-for-importing-into-r">Best practices in preparing data files for importing into R</a></li>
<li><a href="https://www.sthda.com/english/english/wiki/reading-data-from-txt-csv-files-r-base-functions">Reading data from txt|csv files: R base functions</a></li>
<li><a href="https://www.sthda.com/english/english/wiki/fast-reading-of-data-from-txt-csv-files-into-r-readr-package">Fast Reading of Data From txt|csv Files into R: readr package</a></li>
</ul></li>
<li>Next chapters
<ul>
<li><a href="https://www.sthda.com/english/english/wiki/exporting-data-from-r">Exporting data from R</a></li>
</ul></li>
</ul>
</div>
<div id="infos" class="section level1">
<h1>Infos</h1>
<p><span class="warning"> This analysis has been performed using R (ver. 3.2.3). </span></p>
</div>

<script>jQuery(document).ready(function () {
    jQuery('h1').addClass('wiki_paragraph1');
    jQuery('h2').addClass('wiki_paragraph2');
    jQuery('h3').addClass('wiki_paragraph3');
    jQuery('h4').addClass('wiki_paragraph4');
    });//add phpboost class to header</script>
<style>.content{padding:0px;}</style>
</div><!--end rdoc-->
<!--====================== stop here when you copy to sthda================-->


<!-- END HTML -->]]></description>
			<pubDate>Thu, 07 Apr 2016 21:11:00 +0200</pubDate>
			
		</item>
		
		<item>
			<title><![CDATA[Reading Data From TXT|CSV Files: R Base Functions]]></title>
			<link>https://www.sthda.com/english/wiki/reading-data-from-txt-csv-files-r-base-functions</link>
			<guid>https://www.sthda.com/english/wiki/reading-data-from-txt-csv-files-r-base-functions</guid>
			<description><![CDATA[<!-- START HTML -->

  <!--====================== start from here when you copy to sthda================-->  
  <div id="rdoc">

<div id="TOC">
<ul>
<li><a href="#preleminary-tasks">Preleminary tasks</a></li>
<li><a href="#r-base-functions-for-importing-data">R base functions for importing data</a></li>
<li><a href="#reading-a-local-file">Reading a local file</a></li>
<li><a href="#reading-a-file-from-internet">Reading a file from internet</a></li>
<li><a href="#summary">Summary</a></li>
<li><a href="#related-articles">Related articles</a></li>
<li><a href="#infos">Infos</a></li>
</ul>
</div>

<p><br/></p>
<p>Previously, we described the <a href="https://www.sthda.com/english/english/wiki/r-basics-quick-and-easy">essentials of R programming</a> and some <a href="https://www.sthda.com/english/english/wiki/best-practices-in-preparing-data-files-for-importing-into-r">best practices for preparing your data</a>.</p>
<br/>
<div class="block">
In this article, you’ll learn how to <strong>import data</strong> from <strong>.txt</strong> (tab-separated values) and <strong>.csv</strong> (comma-separated values) file formats into <strong>R</strong>.
</div>
<p><br/></p>
<p><img src="https://www.sthda.com/english/sthda/RDoc/images/import-txt-csv-into-r-base-functions.png" alt="Reading Data From txt|csv Files: R Base Functions" /> <br/></p>
<div id="preleminary-tasks" class="section level1">
<h1>Preleminary tasks</h1>
<ol style="list-style-type: decimal">
<li><p><strong>Launch RStudio</strong> as described here: <a href="https://www.sthda.com/english/english/wiki/running-rstudio-and-setting-up-your-working-directory-easy-r-programming">Running RStudio and setting up your working directory</a></p></li>
<li><p><strong>Prepare your data</strong> as described here: <a href="https://www.sthda.com/english/english/wiki/best-practices-in-preparing-data-files-for-importing-into-r">Best practices for preparing your data</a></p></li>
</ol>
</div>
<div id="r-base-functions-for-importing-data" class="section level1">
<h1>R base functions for importing data</h1>
<p>The R base function <strong>read.table</strong>() is a general function that can be used to read a file in table format. The data will be imported as a <a href="https://www.sthda.com/english/english/wiki/easy-r-programming-basics#data-frames">data frame</a>.</p>
<p><span class="warning">Note that, depending on the format of your file, several variants of <strong>read.table</strong>() are available to make your life easier, including <strong>read.csv</strong>(), <strong>read.csv2</strong>(), <strong>read.delim</strong>() and <strong>read.delim2</strong>().</span></p>
<br/>
<div class="block">
<ul>
<li><strong>read.csv</strong>(): for reading <strong>“comma separated value”</strong> files (“.csv”).</li>
<li><strong>read.csv2</strong>(): variant used in countries that use a comma “,” as decimal point and a semicolon “;” as field separators.</li>
<li><strong>read.delim</strong>(): for reading <em>“tab-separated value”</em> files (“.txt”). By default, point (“.”) is used as decimal points.</li>
<li><strong>read.delim2</strong>(): for reading <em>“tab-separated value”</em> files (“.txt”). By default, comma (“,”) is used as decimal points.</li>
</ul>
</div>
<p><br/></p>
<p>The simplified format of these functions are, as follow:</p>
<pre class="r"><code># Read tabular data into R
read.table(file, header = FALSE, sep = "", dec = ".")

# Read "comma separated value" files (".csv")
read.csv(file, header = TRUE, sep = ",", dec = ".", ...)

# Or use read.csv2: variant used in countries that 
# use a comma as decimal point and a semicolon as field separator.
read.csv2(file, header = TRUE, sep = ";", dec = ",", ...)

# Read TAB delimited files
read.delim(file, header = TRUE, sep = "\t", dec = ".", ...)
read.delim2(file, header = TRUE, sep = "\t", dec = ",", ...)</code></pre>
<br/>
<div class="block">
<ul>
<li><strong>file</strong>: the path to the file containing the data to be imported into R.</li>
<li><strong>sep</strong>: the field separator character. “\t” is used for tab-delimited file.</li>
<li><strong>header</strong>: logical value. If TRUE, <strong>read.table()</strong> assumes that your file has a header row, so row 1 is the name of each column. If that’s not the case, you can add the argument <strong>header = FALSE</strong>.</li>
<li><strong>dec</strong>: the character used in the file for decimal points.</li>
</ul>
</div>
<p><br/></p>
</div>
<div id="reading-a-local-file" class="section level1">
<h1>Reading a local file</h1>
<ul>
<li>To import a local .txt or a .csv file, the syntax would be:</li>
</ul>
<pre class="r"><code># Read a txt file, named "mtcars.txt"
my_data <- read.delim("mtcars.txt")

# Read a csv file, named "mtcars.csv"
my_data <- read.csv("mtcars.csv")</code></pre>
<p><span class="warning">The above R code, assumes that the file “mtcars.txt” or “mtcars.csv” is in your current <a href="https://www.sthda.com/english/english/wiki/running-rstudio-and-setting-up-your-working-directory-easy-r-programming">working directory</a>. To know your current working directory, type the function <strong>getwd</strong>() in R console.</span></p>
<ul>
<li>It’s also possible to choose a file interactively using the function <strong>file.choose</strong>(), which I recommend if you’re a beginner in R programming:</li>
</ul>
<pre class="r"><code># Read a txt file
my_data <- read.delim(file.choose())

# Read a csv file
my_data <- read.csv(file.choose())</code></pre>
<p><span class="success">If you use the R code above in RStudio, you will be asked to choose a file.</span></p>
<p><span class="warning">If your data contains column with text, R may assume that columns as a <a href="https://www.sthda.com/english/english/wiki/easy-r-programming-basics#factors">factors or grouping variables</a> (e.g.: “good”, “good”, “bad”, “bad”, “bad”). If you don’t want your text data to be converted as factors, add <strong>stringsAsFactor = FALSE</strong> in <strong>read.delim</strong>(), <strong>read.csv</strong>() and <strong>read.table</strong>() functions. In this case, the data frame columns corresponding to string in your text file will be character.</span></p>
<p>For example:</p>
<pre class="r"><code>my_data <- read.delim(file.choose(), 
                      stringsAsFactor = FALSE)</code></pre>
<ul>
<li>If your field separator is for example “|”, it’s possible use the general function <strong>read.table</strong>() with additional arguments:</li>
</ul>
<pre class="r"><code>my_data <- read.table(file.choose(), 
                      sep ="|", header = TRUE, dec =".")</code></pre>
</div>
<div id="reading-a-file-from-internet" class="section level1">
<h1>Reading a file from internet</h1>
<p>It’s possible to use the functions <strong>read.delim</strong>(), <strong>read.csv</strong>() and <strong>read.table</strong>() to import files from the web.</p>
<pre class="r"><code>my_data <- read.delim("https://www.sthda.com/upload/boxplot_format.txt")
head(my_data)</code></pre>
<pre><code>   Nom variable Group
1 IND1       10     A
2 IND2        7     A
3 IND3       20     A
4 IND4       14     A
5 IND5       14     A
6 IND6       12     A</code></pre>
</div>
<div id="summary" class="section level1">
<h1>Summary</h1>
<br/>
<div class="block">
<ul>
<li><p>Import a local .txt file: <strong>read.delim</strong>(file.choose())</p></li>
<li><p>Import a local .csv file: <strong>read.csv</strong>(file.choose())</p></li>
<li>Import a file from internet: <strong>read.delim</strong>(url) if a txt file or <strong>read.csv</strong>(url) if a csv file</li>
</ul>
</div>
<p><br/></p>
</div>
<div id="related-articles" class="section level1">
<h1>Related articles</h1>
<ul>
<li>Previous chapters
<ul>
<li><a href="https://www.sthda.com/english/english/wiki/r-basics-quick-and-easy">R programming basics</a></li>
<li><a href="https://www.sthda.com/english/english/wiki/best-practices-in-preparing-data-files-for-importing-into-r">Best practices in preparing data files for importing into R</a></li>
</ul></li>
<li>Next chapters
<ul>
<li><a href="https://www.sthda.com/english/english/wiki/fast-reading-of-data-from-txt-csv-files-into-r-readr-package">Fast Reading of Data From txt|csv Files into R: readr package</a></li>
<li><a href="https://www.sthda.com/english/english/wiki/reading-data-from-excel-files-xls-xlsx-into-r">Reading data From Excel Files (xls|xlsx) into R</a></li>
</ul></li>
</ul>
</div>
<div id="infos" class="section level1">
<h1>Infos</h1>
<p><span class="warning"> This analysis has been performed using R (ver. 3.2.3). </span></p>
</div>

<script>jQuery(document).ready(function () {
    jQuery('h1').addClass('wiki_paragraph1');
    jQuery('h2').addClass('wiki_paragraph2');
    jQuery('h3').addClass('wiki_paragraph3');
    jQuery('h4').addClass('wiki_paragraph4');
    });//add phpboost class to header</script>
<style>.content{padding:0px;}</style>
</div><!--end rdoc-->
<!--====================== stop here when you copy to sthda================-->


<!-- END HTML -->]]></description>
			<pubDate>Thu, 07 Apr 2016 20:48:29 +0200</pubDate>
			
		</item>
		
		<item>
			<title><![CDATA[Best Practices in Preparing Data Files for Importing into R]]></title>
			<link>https://www.sthda.com/english/wiki/best-practices-in-preparing-data-files-for-importing-into-r</link>
			<guid>https://www.sthda.com/english/wiki/best-practices-in-preparing-data-files-for-importing-into-r</guid>
			<description><![CDATA[<!-- START HTML -->

  <!--====================== start from here when you copy to sthda================-->  
  <div id="rdoc">

<div id="TOC">
<ul>
<li><a href="#open-your-file">Open your file</a></li>
<li><a href="#prepare-your-file">Prepare your file</a></li>
<li><a href="#save-your-file">Save your file</a></li>
<li><a href="#related-articles">Related articles</a></li>
<li><a href="#infos">Infos</a></li>
</ul>
</div>

<p><br/></p>
In the previous chapter we provided the <a href="https://www.sthda.com/english/english/wiki/r-basics-quick-and-easy">essentials of R programming</a> including installation, launching, basic data types and arithmetic functions. In the next articles you will learn how to <strong>import data</strong> into <strong>R</strong>. To avoid errors during the <strong>importation</strong> of a file into R, you should make sure that your data is well prepared.
<br/>
<div class="block">
In this article we’ll describe some best practices for <strong>preparing</strong> your data before <strong>importing</strong> into <strong>R</strong>.
</div>
<p><br/></p>
<div id="open-your-file" class="section level1">
<h1>Open your file</h1>
<p>We suppose that you open and prepare your file with Excel as follow.</p>
<p><img src="https://www.sthda.com/english/sthda/RDoc/images/best-practices-excel-file.png" alt="Excel file" /></p>
</div>
<div id="prepare-your-file" class="section level1">
<h1>Prepare your file</h1>
<ol style="list-style-type: decimal">
<li><strong>Row and column names</strong>:</li>
</ol>
<br/>
<div class="success">
<ul>
<li>Use the first row as column <strong>headers</strong> (or <strong>column names</strong>). Generally, columns represent <strong>variables</strong>.</li>
<li>Use the first column as <strong>row names</strong>. Generally rows represent <strong>observations</strong>.</li>
<li>Each row name should be unique, so remove duplicated names.</li>
</ul>
</div>
<p><br/></p>
<p>Column names should be compatible with R naming conventions. As illustrated below, our data contains some issues that should be fixed before importing:</p>
<p><img src="https://www.sthda.com/english/sthda/RDoc/images/best-practices-excel-file-highlighted.png" alt="Excel file" /></p>
<p>
</p>
<ol start="2" style="list-style-type: decimal">
<li><strong>Naming conventions</strong>:</li>
</ol>
<br/>
<div class="success">
<ul>
<li>Avoid names with blank spaces. Good column names: <em>Long_jump</em> or <em>Long.jump</em>. Bad column name: <em>Long jump</em>.</li>
<li>Avoid names with special symbols: ?, $, *, +, #, (, ), -, /, }, {, |, >, < etc. Only underscore can be used.</li>
<li>Avoid beginning variable names with a number. Use letter instead. Good column names: sport_100m or x100m. Bad column name: 100m</li>
<li>Column names must be unique. Duplicated names are not allowed.</li>
<li>R is case sensitive. This means that Name is different from Name or NAME.</li>
<li>Avoid blank rows in your data</li>
<li>Delete any comments in your file</li>
<li>Replace missing values by <strong>NA</strong> (for not available)</li>
<li>If you have a column containing date, use the four digit format. Good format: 01/01/2016. Bad format: 01/01/16</li>
</ul>
</div>
<p>
</p>
<ol start="3" style="list-style-type: decimal">
<li><strong>Final file</strong>:</li>
</ol>
<p>Our finale file should look like this:</p>
<p><img src="https://www.sthda.com/english/sthda/RDoc/images/best-practices-excel-file-good.png" alt="Excel file" /></p>
</div>
<div id="save-your-file" class="section level1">
<h1>Save your file</h1>
<p><span class="success">We recommend to save your file into <strong>.txt</strong> (tab-delimited text file) or <strong>.csv</strong> (comma separated value file) format.</span></p>
<p><pan class = "notice">If you still want to save it into xls|xlsx file formats, you can do it. We’ll learn in the next articles, how to import xls|xlsx files into R.</span></p>
</div>
<div id="related-articles" class="section level1">
<h1>Related articles</h1>
<ul>
<li>Previous chapters
<ul>
<li><a href="https://www.sthda.com/english/english/wiki/r-basics-quick-and-easy">R programming basics</a></li>
</ul></li>
<li>Next chapters
<ul>
<li><a href="https://www.sthda.com/english/english/wiki/reading-data-from-txt-csv-files-r-base-functions">Reading data from txt|csv files: R base functions</a></li>
<li><a href="https://www.sthda.com/english/english/wiki/fast-reading-of-data-from-txt-csv-files-into-r-readr-package">Fast Reading of Data From txt|csv Files into R: readr package</a></li>
<li><a href="https://www.sthda.com/english/english/wiki/reading-data-from-excel-files-xls-xlsx-into-r">Reading data From Excel Files (xls|xlsx) into R</a></li>
</ul></li>
</ul>
</div>
<div id="infos" class="section level1">
<h1>Infos</h1>
<p><span class="warning"> This analysis has been performed using R (ver. 3.2.3). </span></p>
</div>

<script>jQuery(document).ready(function () {
    jQuery('h1').addClass('wiki_paragraph1');
    jQuery('h2').addClass('wiki_paragraph2');
    jQuery('h3').addClass('wiki_paragraph3');
    jQuery('h4').addClass('wiki_paragraph4');
    });//add phpboost class to header</script>
<style>.content{padding:0px;}</style>
</div><!--end rdoc-->
<!--====================== stop here when you copy to sthda================-->


<!-- END HTML -->]]></description>
			<pubDate>Thu, 07 Apr 2016 20:34:51 +0200</pubDate>
			
		</item>
		
	</channel>
</rss>
