extract_database_name | R Documentation |
This function extracts and formats the name of a database from a 'databaseClass' object by combining the source and version information.
extract_database_name(database)
database |
A 'databaseClass' object containing database information. |
The function extracts the 'Source' and 'Version' fields from the 'database.info' slot of the 'databaseClass' object and combines them using an underscore ('_'). This formatted string represents the name of the database.
A character string representing the name of the database, formatted as 'Source_Version'. Returns 'NULL' if the input is not a 'databaseClass' object.
## Not run:
# Load a sample database
my_database <- load_database("path/to/database")
# Extract the name of the database
db_name <- extract_database_name(my_database)
print(db_name) # Output might be "HMDB_4.0"
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.