While many tasks that used to be performed using relational databases can be easily implemented in R, there are some situations where using the power of a relational database nicely complements the capabilities of R. One obvious example are situations where the data to be used is stored in a relational database. Relational databases can also be used to make working with very large datasets easier.
The topic of administration of a database is beyond the scope of this book, and the assumption will always be made that you have access to a running database, and that enough permissions have been granted to perform the necessary database operations.
There are two principal ways to connect with databases in R. The first uses the ODBC (Open DataBase Connectivity) facility available on many computers. The second uses the DBI package of R along with a specialized package for the particular database needed to be accessed. If there is a specialized package available for your database, you may find that the corresponding DBI-based package may give better performance than the ODBC approach. On the other hand, if you are using a database for which a specialized package is not available, using ODBC may be your only option.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2008 Springer Science+Business Media, LLC
About this chapter
Cite this chapter
(2008). R and Databases. In: Data Manipulation with R. Use R!. Springer, New York, NY. https://doi.org/10.1007/978-0-387-74731-6_3
Download citation
DOI: https://doi.org/10.1007/978-0-387-74731-6_3
Publisher Name: Springer, New York, NY
Print ISBN: 978-0-387-74730-9
Online ISBN: 978-0-387-74731-6
eBook Packages: Mathematics and StatisticsMathematics and Statistics (R0)