Return a list of websites that were used as references for Drugs/ Carriers/ Enzymes/ Targets/ Transporters
drugs_links(
save_table = FALSE,
save_csv = FALSE,
csv_path = ".",
override_csv = FALSE,
database_connection = NULL
)carriers_links(
save_table = FALSE,
save_csv = FALSE,
csv_path = ".",
override_csv = FALSE,
database_connection = NULL
)
enzymes_links(
save_table = FALSE,
save_csv = FALSE,
csv_path = ".",
override_csv = FALSE,
database_connection = NULL
)
targets_links(
save_table = FALSE,
save_csv = FALSE,
csv_path = ".",
override_csv = FALSE,
database_connection = NULL
)
transporters_links(
save_table = FALSE,
save_csv = FALSE,
csv_path = ".",
override_csv = FALSE,
database_connection = NULL
)
a tibble with 4 variables:
Name of the source website
Identifier for this drug in the given resource
The url of the website
drug/ carrier/ target/ enzyme/ transporter id
boolean, save table in database if true.
boolean, save csv version of parsed tibble if true
location to save csv files into it, default is current location, save_csv must be true
override existing csv, if any, in case it is true in the new parse operation
DBI connection object that holds a connection to
user defined database. If save_table
is enabled without providing
value for this function an error will be thrown.
read_drugbank_xml_db
function must be called first before any
parser.
If read_drugbank_xml_db
is called before for any reason, so
no need to call it again before calling this function.
Other references:
articles
,
attachments
,
books
,
references()
if (FALSE) {
# the same parameters and usage will be applied for any parser
# return only the parsed tibble
run_all_parsers()
# will throw an error, as database_connection is NULL
run_all_parsers(save_table = TRUE)
# save in database in SQLite in memory database and return parsed tibble
sqlite_con <- DBI::dbConnect(RSQLite::SQLite())
run_all_parsers(save_table = TRUE, database_connection = sqlite_con)
# save parsed tibble as csv if it does not exist in current location,
# and return parsed tibble.
# if the csv exist before read it and return its data.
run_all_parsers(save_csv = TRUE)
# save in database, save parsed tibble as csv,
# if it does not exist in current location and return parsed tibble.
# if the csv exist before read it and return its data.
run_all_parsers(save_table = TRUE, save_csv = TRUE,
database_connection = sqlite_con)
# save parsed tibble as csv if it does not exist in given location,
# and return parsed tibble.
# if the csv exist before read it and return its data.
run_all_parsers(save_csv = TRUE, csv_path = TRUE)
# save parsed tibble as csv if it does not exist in current location and
# return parsed tibble.
# if the csv exist override it and return it.
run_all_parsers(save_csv = TRUE, csv_path = TRUE, override = TRUE)
}
Run the code above in your browser using DataLab