dbSingleDF {eatDB} | R Documentation |
Extract a single data table from a relational data base.
Description
Function to extract a single, complete data table from a relational data base. Especially useful for the extraction of the meta information stored in Meta_Data
.
Usage
dbSingleDF(dfName = "Meta_Data", filePath)
Arguments
dfName |
Name of the data table which should be extracted. |
filePath |
Path of the existing db file. |
Details
This function makes use of the DBI::dbReadTable
function and extracts a complete data table from a data base. All variables are extracted and all rows are used. For extracting only some variables or merging data tables see dbPull
.
Value
Returns a data frame with all variables and cases as in the corresponding data table.
Examples
db_path <- system.file("extdata", "example_dataBase.db", package = "eatDB")
## Extract all meta information
meta_data <- dbSingleDF(dfName = "Meta_Data", filePath = db_path)
meta_data
## Extract a specific data table
NoImp <- dbSingleDF(dfName = "NoImp", filePath = db_path)
NoImp
[Package eatDB version 0.5.0 Index]