Skip to Content
R Programming By Example
book

R Programming By Example

by Omar Trejo Navarro
December 2017
Beginner to intermediate
470 pages
12h 29m
English
Packt Publishing
Content preview from R Programming By Example

Encapsulating multiple databases with a storage layer

Now that we have developed our Database interface and our CSVFiles implementation of such an interface, we are ready to develop the next layer of abstraction, our Storage class. It will be implemented with R6.

As you can see, the Storage constructor implemented in the initialize function receives a settings object which will be the full centralized settings file we have been mentioning and will use the storage/read, storage/write, and storage/table_names parts to create various database instances through the use of the database_factory() function we explained before. In the case of the read_db attribute, it will be a single Database implementation that will be used to read data. In the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Efficient R Programming

Efficient R Programming

Colin Gillespie, Robin Lovelace
R Programming

R Programming

Jared P. Lander

Publisher Resources

ISBN: 9781788292542Supplemental Content