
.png)
Just use the functions read.csv, read.table, and read.fwf. R can handle plain text files – no package required. Haven - Enables R to read and write data from SAS, SPSS, and Stata. install.packages("foreign")įoreign - Want to read a SAS data set into R? Or an SPSS data set? Foreign provides functions that help you load data files from other programs into R. You can also just export your spreadsheets from Excel as. XLConnect, xlsx - These packages help you read and write Micorsoft Excel files from R. Choose the package that fits your type of database. RMySQL, RPostgresSQL, RSQLite - If you'd like to read in data from a database, these packages are a good place to start. Note: RStudio professional products come with professional drivers for some of the most popular databases. Odbc - Use any ODBC driver with the odbc package to connect R to your database. Packages that connect R to databases depend on the DBI package. DBI - The standard for for communication between R and relational database management systems.
