You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 01-reading.Rmd
+6-3Lines changed: 6 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -238,7 +238,9 @@ several packages have been written
238
238
that allows R to connect to relational databases and use the R programming language as the front end (what the user types in) to pull data from them. These different relational database management systems have their own advantages, limitations, and excels in particular scenarios. In this book, we will
239
239
give examples of how to do this using R with SQLite and PostgreSQL databases.
240
240
241
-
### Reading data from a SQLite database
241
+
### Connecting to a database
242
+
243
+
#### Reading data from a SQLite database
242
244
243
245
SQLite is probably the simplest relational database that one can use in combination with R. SQLite databases are self-contained and usually stored and accessed locally on one computer. Data is usually stored in a file with a `.db` extension. Similar to Excel files, these are not plain text files and cannot be read in a plain text editor.
244
246
@@ -300,8 +302,7 @@ tail(aboriginal_lang_db)
300
302
```
301
303
Additionally, some operations will not work to extract columns or single values from the reference given by the `tbl` function. Thus, once you have finished your data wrangling of the `tbl` database reference object, it is advisable to bring it into your local machine's memory using `collect` as a data frame. Warning: Usually, databases are very big! Reading the object into your local machine may give an error or take a lot of time to run so be careful if you plan to do this!
302
304
303
-
304
-
### Reading data from a PostgreSQL database
305
+
#### Reading data from a PostgreSQL database
305
306
306
307
PostgreSQL (also called Postgres) is a very popular free and open-source option for relational database software. Unlike SQLite, PostgreSQL uses
307
308
a client–server database engine, as it was designed to be used and accessed on a network. This means that you have to provide more
0 commit comments