Reading data into R
Example files
Configuration of RStudio
Configure RStudio following instructions in: www.cronistalascolonias.com.ar
Create a dedicated R study group folder, set it as the default working directory in RStudio, and put everything related in it. This will save you confusion if you are not sure what a working directory is.
CSV, space-separated files, and tab-separated files: read.___() functions in the default installation
You can also use RStudio menus: Workspaces - Import Dataset - From Text Files…
Excel file (Mac OS X): gdata package is the simplest. Use www.cronistalascolonias.com.ar() function.
Excel file (Windows): xlsx package is relatively easy.
SAS files: sas7bdat package's www.cronistalascolonias.com.ar7bdat() for native files, foreign package's www.cronistalascolonias.com.ar() for xport files.
Stata native files: foreign package's www.cronistalascolonias.com.ar() function.
Fixed-width text files: www.cronistalascolonias.com.ar() in the default installation.
HTML tables: XML package's readHTMLTable()
For detailed example of html table extraction: www.cronistalascolonias.com.ar
0 thoughts to “How to download and read a file in r”