diff --git a/a4-data.rmd b/a4-data.rmd index 425d83d..073e163 100644 --- a/a4-data.rmd +++ b/a4-data.rmd @@ -232,7 +232,7 @@ poker <- read.fwf("poker.fwf", widths = c(10, 7, 6), header = TRUE) ### HTML Links -Many data files are made available on the Internet at their own web address. If you are connected to the Internet, you can open these files straight into R with `read.table`, `read.csv`, etc. You can pass a web address into the file name argument for any of R's data-reading functions. As a result, you could read in the poker data set from a web address like _http://.../poker.csv_ with: +Many data files are made available on the Internet at their own web address. If you are connected to the Internet, you can open these files straight into R with `read.table`, `read.csv`, etc. You can pass a web address into the file name argument for any of R's data-reading functions. As a result, you could read in the poker data set from a web address like _http://.../poker.csv_ with: ```r poker <- read.csv("http://.../poker.csv") @@ -246,7 +246,7 @@ deck <- read.csv("https://gist.githubusercontent.com/garrettgman/9629323/raw/ee5 Just make sure that the web address links directly to the file and not to a web page that links to the file. Usually, when you visit a data file's web address, the file will begin to download or the raw data will appear in your browser window. -Note that websites that begin with _https://_ are secure websites, which means R may not be able to access the data provided at these links. +Note that websites that begin with _https:// _ are secure websites, which means R may not be able to access the data provided at these links. ### Saving Plain-Text Files @@ -496,4 +496,4 @@ You can also use R to connect to a database and read in data. Use the RODBC package to connect to databases through an ODBC connection. -Use the DBI package to connect to databases through individual drivers. The DBI package provides a common syntax for working with different databases. You will have to download a database-specific package to use in conjunction with DBI. These packages provide the API for the native drivers of different database programs. For MySQL use RMySQL, for SQLite use RSQLite, for Oracle use ROracle, for PostgreSQL use RPostgreSQL, and for databases that use drivers based on the Java Database Connectivity (JDBC) API use RJDBC. Once you have loaded the appropriate driver package, you can use the commands provided by DBI to access your database. \ No newline at end of file +Use the DBI package to connect to databases through individual drivers. The DBI package provides a common syntax for working with different databases. You will have to download a database-specific package to use in conjunction with DBI. These packages provide the API for the native drivers of different database programs. For MySQL use RMySQL, for SQLite use RSQLite, for Oracle use ROracle, for PostgreSQL use RPostgreSQL, and for databases that use drivers based on the Java Database Connectivity (JDBC) API use RJDBC. Once you have loaded the appropriate driver package, you can use the commands provided by DBI to access your database.