dbparser (version 1.0.3)

parse_drug_pathway_drugs: Extracts the drug pathway drugs element and return data as data frame.

Description

parse_drug_pathway_drugs returns data frame of drug pathway drugs elements.

Usage

parse_drug_pathway_drugs(save_table = FALSE, save_csv = FALSE,
  csv_path = ".", override_csv = FALSE)

Arguments

save_table

boolean, save table in database if true.

save_csv

boolean, save csv version of parsed dataframe if true

csv_path

location to save csv files into it, default is current location, save_csv must be true

override_csv

override existing csv, if any, in case it is true in the new parse operation

Value

drug pathway drugs node attributes date frame

Details

This functions extracts the pathway drugs element of drug node in drug bank xml database with the option to save it in a predefined database via open_db method. It takes one single optional argument to save the returned dataframe in the database. It must be called after get_xml_db_rows function like any other parser function. If get_xml_db_rows is called before for any reason, so no need to call it again before calling this function.

Examples

Run this code
# NOT RUN {
# return only the parsed dataframe
parse_drug_pathway_drugs()

# save in database and return parsed dataframe
parse_drug_pathway_drugs(save_table = TRUE)

# save parsed dataframe as csv if it does not exist in current
# location and return parsed dataframe.
# If the csv exist before read it and return its data.
parse_drug_pathway_drugs(save_csv = TRUE)

# save in database, save parsed dataframe as csv if it does not exist in current
# location and return parsed dataframe.
# If the csv exist before read it and return its data.
parse_drug_pathway_drugs(ssave_table = TRUE, save_csv = TRUE)

# save parsed dataframe as csv if it does not exist in given location
# and return parsed dataframe.
# If the csv exist before read it and return its data.
parse_drug_pathway_drugs(save_csv = TRUE, csv_path = TRUE)

# save parsed dataframe as csv if it does not exist in current
# location and return parsed dataframe.
# If the csv exist override it and return it.
parse_drug_pathway_drugs(save_csv = TRUE, csv_path = TRUE, override = TRUE)
# }

Run the code above in your browser using DataCamp Workspace