Learn R Programming

RObsDat (version 14.04)

getMetadata: Get information about metadata

Description

getMetadata allows to query entries from the metadata tables.

getID allows to find the ID for an entry from a metadaa table. A smart matching algorithm is used to retrieve relevant entries.

id2name is an internal function. It takes a dataframe (e.g. returned from IgetDataValues) and converts each column with a name starting with ID to the name or term from the corresponding metadata table.

Usage

getMetadata(table, EXACT = FALSE, ...)
getID(table, value, remove.special.character=TRUE)
id2name(dataframe)

Arguments

table
Table name of the metadata table.
EXACT
boolean indicating whether only exact matches should be returned or partial matches of the term should be accepted.
remove.special.character
boolean indicating whether special characters should be removed when comparing. Usually, this should be turned on.
value
String describing the entry in the table.
dataframe
Dataframe to be converted from ID - columns to names.
...
Additional columns to filter entries.

Value

  • getID returns a vector of the IDs. getMetadata returns a dataframe representing the metadata table

Details

The matching algorithm of getID first attempts to find exact matches in one of the column. If no result is obtained, partial matches and similar entries based on the Levenstein algorithm are searched.

ToDo explain use of synonyms

See Also

Use CVtables to obtain a list of controlled vocabularies. See also the ODM documentation from QUASHI

Examples

Run this code
#connect to standard database
#this also retrieves the controlled vocabularies from the CUASHI server
getDefaultDB()

#retrieve metadata
getMetadata(table="VariableName")

Run the code above in your browser using DataLab