To implement this recipe, you will need the following libraries installed onto your computer:
- RSQLite
- DBI
- sqldf
You can use the following code to install the RSQLite library with its necessary dependencies:
install.packages("RSQLite", dependencies = TRUE)
In this recipe, you will use the mtcars dataset from the datasets library. This is one of the well-known default datasets in R containing various characteristics of a car. Once the library installation is completed, you are ready to go.
The task is to create a new database called dbNew and then create a table cardata containing the mtcars dataset. Finally, extract a subset of the data by taking only automatic transmission cars with the variable "am" == 0.