df2SQLite: Store drugbank dataframe into an SQLite database

Description Usage Arguments Value Author(s) See Also Examples

View source: R/dbxml_handle.R

Description

Store specific version of drugbank dataframe into an SQLite database under user defined directory, the default is user's present working directory of R session

Usage

1
df2SQLite(dbdf, version, dest_dir = ".")

Arguments

dbdf

Drugbank dataframe generated by dbxml2df function.

version

Character(1), version of the input drugbank dataframe generated by dbxml2df function

dest_dir

Character(1), destination directory that the result SQLite database stored in. The default is user's current working directory

Value

SQLite database named as "drugbank_<versionNumber>.db" stored under user's present working directory of R session or user's specified directory.

Author(s)

Yuzhu Duan yduan004@ucr.edu

See Also

dbxml2df

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(RSQLite)
## Not run: 
# download the original drugbank database (http://www.drugbank.ca/releases/latest) (xml file) 
# to your current R working directory, and rename as "drugbank.xml".
# Read in the xml file and convert to a data.frame in R 

drugbank_df = dbxml2df(xmlfile="drugbank.xml", version="5.1.5")

# store the converted drugbank dataframe into SQLite database under user's
present R working direcotry, or other directory defined by 'dest_dir'

df2SQLite(dbdf=drugbank_df, version="5.1.5") # set version as version of xml file

## End(Not run)

yduan004/customCMPdb documentation built on Feb. 3, 2022, 2:10 p.m.