User Tools

Site Tools


en:data_import_r

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
en:data_import_r [2019/02/03 16:05]
David Zelený [R functions]
en:data_import_r [2019/02/03 16:24] (current)
David Zelený [R functions]
Line 10: Line 10:
   * **''​read.csv''​** - reads table delimited by commas (,), with decimals being dots (.).    * **''​read.csv''​** - reads table delimited by commas (,), with decimals being dots (.). 
   * **''​read.csv2''​** - reads table delimited by semicolons (;) and decimals being commas (,).   * **''​read.csv2''​** - reads table delimited by semicolons (;) and decimals being commas (,).
 +  * **''​read_excel''​ (library ''​readxl''​)** - reads data frames directly from Excel file (both *.xls and *.xlsx) without need to install any third party software; it stores data in ''​tibble''​ format, with rownames (if any) as the first column of the data - this needs to be treated before further analysis (see [[en:​data_import_examples|Example section]] to see how). 
   * **''​read.cep''​ (library ''​vegan''​)** - reads legacy //canoco condensed files// (usually with extension ''​*.cep''​ or ''​*.cc!''​);​ the function can get quite slow for large datasets - if the speed is an issue, consider using ''​readCEP''​ from ''​cepreader''​ package (also maintained by Jari Oksanen)   * **''​read.cep''​ (library ''​vegan''​)** - reads legacy //canoco condensed files// (usually with extension ''​*.cep''​ or ''​*.cc!''​);​ the function can get quite slow for large datasets - if the speed is an issue, consider using ''​readCEP''​ from ''​cepreader''​ package (also maintained by Jari Oksanen)
   * **''​read.CEP''​ (library ''​rioja''​)** the same as ''​read.cep''​ from ''​vegan''​ and ''​readCEP''​ from ''​cepreader'';​ the package ''​rioja''​ has also function ''​write.CEP''​ producing cep files.   * **''​read.CEP''​ (library ''​rioja''​)** the same as ''​read.cep''​ from ''​vegan''​ and ''​readCEP''​ from ''​cepreader'';​ the package ''​rioja''​ has also function ''​write.CEP''​ producing cep files.
  
 Note that by default, functions like ''​read.table'',​ ''​read.delim'',​ ''​read.csv'' ​ and ''​read.csv2''​ import the columns containing characters strings into R as factors. If you don't like this behaviour, change the setting of ''​stringsAsFactors''​ argument into ''​FALSE''​. If you want to know why this behaviour is set to default, read [[http://​simplystatistics.org/​2015/​07/​24/​stringsasfactors-an-unauthorized-biography/​|this blog post]]. Note that by default, functions like ''​read.table'',​ ''​read.delim'',​ ''​read.csv'' ​ and ''​read.csv2''​ import the columns containing characters strings into R as factors. If you don't like this behaviour, change the setting of ''​stringsAsFactors''​ argument into ''​FALSE''​. If you want to know why this behaviour is set to default, read [[http://​simplystatistics.org/​2015/​07/​24/​stringsasfactors-an-unauthorized-biography/​|this blog post]].
en/data_import_r.txt · Last modified: 2019/02/03 16:24 by David Zelený