Title: | Exploit vocabularies on tematres server. |
---|---|
Description: | Exploit vocabularies on tematres server and annotate data frames in R. |
Authors: | Claas-Thido Pfaff <[email protected]> |
Maintainer: | Claas-Thido Pfaff <[email protected]> |
License: | GPL-3 |
Version: | 0.3 |
Built: | 2024-10-31 03:20:11 UTC |
Source: | https://github.com/cpfaff/rtematres |
You can semantically annotate data frames base on a tematres thesaurus.
annotate.dataframe(input)
annotate.dataframe(input)
input |
to be annotated takes a data frame |
a list wih annotation content
You can semantically annotate data frames base on a tematres thesaurus wih cleaning the dataset
annotate.dataframe.clean(input)
annotate.dataframe.clean(input)
input |
to be annotated takes a data frame |
a list wih annotation content
As some of the task of the base api only take ids the wrapper does a conversion from a term to the id to communicate with the server. So you can use terms in all taks with this function.
rtematres A package to exploit controlled vocabularies from tematres servers
rtematres(task, verbose = F, term)
rtematres(task, verbose = F, term)
task |
The api task you like to execute. |
verbose |
Either true of false and determines the ammount of info that is returned by a query. |
term |
Is the term(s) you like to execute the task for. |
The function returns either a dataframe for information or a list of keywords and ids
## Not run: rtematres(task = "fetchVocabularyData") rtematres(task = "fetchTopTerms") rtematres(task = "fetchCode", term = "tree") rtematres(task = "search", term = "measurement") rtematres(task = "fetch", term = "measurement") rtematres(task = "searchNotes", term = "measurement") rtematres(task = "suggest", term = "measurement") rtematres(task = "suggestDetails", term = "measurement") rtematres(task = "fetchSimilar", term = "t") rtematres(task = "letter", term = "t") rtematres(task = "fetchAlt", term = "tree" ) rtematres(task = "fetchTerm", term = "tree") rtematres(task = "fetchTerms", term = c("Context", "tree") ) rtematres(task = "fetchDown", term = "Context") rtematres(task = "fetchUp", term = "measurement") rtematres(task = "fetchRelated", term = "tree") rtematres(task = "fetchRelatedTerms", term = c("Context", "tree")) rtematres(task = "fetchNotes", term = "Context") rtematres(task = "fetchDirectTerms", term = "carbon") rtematres(task = "fetchURI", term = "carbon") rtematres(task = "fetchTargetTerms", term = "carbon") rtematres(task = "fetchSourceTerms", term = "Context") rtematres(task = "fetchLast") ## End(Not run)
## Not run: rtematres(task = "fetchVocabularyData") rtematres(task = "fetchTopTerms") rtematres(task = "fetchCode", term = "tree") rtematres(task = "search", term = "measurement") rtematres(task = "fetch", term = "measurement") rtematres(task = "searchNotes", term = "measurement") rtematres(task = "suggest", term = "measurement") rtematres(task = "suggestDetails", term = "measurement") rtematres(task = "fetchSimilar", term = "t") rtematres(task = "letter", term = "t") rtematres(task = "fetchAlt", term = "tree" ) rtematres(task = "fetchTerm", term = "tree") rtematres(task = "fetchTerms", term = c("Context", "tree") ) rtematres(task = "fetchDown", term = "Context") rtematres(task = "fetchUp", term = "measurement") rtematres(task = "fetchRelated", term = "tree") rtematres(task = "fetchRelatedTerms", term = c("Context", "tree")) rtematres(task = "fetchNotes", term = "Context") rtematres(task = "fetchDirectTerms", term = "carbon") rtematres(task = "fetchURI", term = "carbon") rtematres(task = "fetchTargetTerms", term = "carbon") rtematres(task = "fetchSourceTerms", term = "Context") rtematres(task = "fetchLast") ## End(Not run)
Features the tasks of the tematres server api. With no sugar added. They are the basic building blocks for more convenient user functions.
rtematres.api(task = "availableTasks", argument)
rtematres.api(task = "availableTasks", argument)
task |
The api task you like to perform. Use the the task "availableTasks" to get an overview about the base api. It returns a data frame with descriptions and the arguments for the tasks. |
argument |
Is the argument for the api task. You find the information about the type of arguments when you call the task "availableTasks". It depends on the task if the argument is numeric or a character. |
The function returns either a dataframe for "availableTasks" or a list of information elements for a certain task.
## Not run: rtematres.api(task = "availableTasks") rtematres.api(task = "fetchVocabularyData") rtematres.api(task = "fetchTopTerms") rtematres.api(task = "search", argument = "measurement") rtematres.api(task = "fetch", argument = "measurement") rtematres.api(task = "searchNotes", argument = "measurement") rtematres.api(task = "suggest", argument = "measurement") rtematres.api(task = "suggestDetails", argument = "measurement") rtematres.api(task = "fetchSimilar", argument = "tre") rtematres.api(task = "letter", argument = "t") rtematres.api(task = "fetchTerm", argument = 12) rtematres.api(task = "fetchDown", argument = 4 ) rtematres.api(task = "fetchUp", argument = 4) rtematres.api(task = "fetchRelated", argument = 4) rtematres.api(task = "fetchAlt", argument = 12 ) rtematres.api(task = "fetchCode", argument = "tree") rtematres.api(task = "fetchNotes", argument = 5 ) rtematres.api(task = "fetchDirectTerms", argument = 12) rtematres.api(task = "fetchURI", argument = 12) rtematres.api(task = "fetchTargetTerms", argument = 12 ) rtematres.api(task = "fetchSourceTerm", argument = "measurement") rtematres.api(task = "fetchTerms", argument = '12,13' ) rtematres.api(task = "fetchRelatedTerms", argument = '12,13' ) rtematres.api(task = "fetchLast") ## End(Not run)
## Not run: rtematres.api(task = "availableTasks") rtematres.api(task = "fetchVocabularyData") rtematres.api(task = "fetchTopTerms") rtematres.api(task = "search", argument = "measurement") rtematres.api(task = "fetch", argument = "measurement") rtematres.api(task = "searchNotes", argument = "measurement") rtematres.api(task = "suggest", argument = "measurement") rtematres.api(task = "suggestDetails", argument = "measurement") rtematres.api(task = "fetchSimilar", argument = "tre") rtematres.api(task = "letter", argument = "t") rtematres.api(task = "fetchTerm", argument = 12) rtematres.api(task = "fetchDown", argument = 4 ) rtematres.api(task = "fetchUp", argument = 4) rtematres.api(task = "fetchRelated", argument = 4) rtematres.api(task = "fetchAlt", argument = 12 ) rtematres.api(task = "fetchCode", argument = "tree") rtematres.api(task = "fetchNotes", argument = 5 ) rtematres.api(task = "fetchDirectTerms", argument = 12) rtematres.api(task = "fetchURI", argument = 12) rtematres.api(task = "fetchTargetTerms", argument = 12 ) rtematres.api(task = "fetchSourceTerm", argument = "measurement") rtematres.api(task = "fetchTerms", argument = '12,13' ) rtematres.api(task = "fetchRelatedTerms", argument = '12,13' ) rtematres.api(task = "fetchLast") ## End(Not run)
Search the thesaurus for concepts and extract their hirarchy. Then return the common concept if any.
rtematres.common(input)
rtematres.common(input)
input |
A categorial vector |
The function returns the common concept
## Not run: rtematres.common(c("carbon", "nitrogen", "organic carbon")) ## End(Not run)
## Not run: rtematres.common(c("carbon", "nitrogen", "organic carbon")) ## End(Not run)
Define a concepts
rtematres.define(term)
rtematres.define(term)
term |
The concept you are looking for |
The function retrieves the definition of a term. This works of course only given the case it has been described in the vocuabulary you query.
It returns a text string describing the concept of interest
Search the thesaurus for concepts and extract their hirarchy. This envolves higher order and lower order terms.
rtematres.hierarchy(term)
rtematres.hierarchy(term)
term |
The concept you are looking for |
The function returns a character vector of concepts
## Not run: rtematres.hierarchy("carbon") ## End(Not run)
## Not run: rtematres.hierarchy("carbon") ## End(Not run)
Summarizes information for a concept in one convenient function call. Currently it provides the definition, upstream and down stream concepts for the term you querry for and related concepts
rtematres.illuminate(input)
rtematres.illuminate(input)
input |
A concept name as string |
The function returns a list containing the information
## Not run: rtematres.illuminate(input = "carbon") ## End(Not run)
## Not run: rtematres.illuminate(input = "carbon") ## End(Not run)
This function is used to query and set the options used by the rtematres package. For example you can set the URLs to your tematres server and the API.
rtematres.options(...)
rtematres.options(...)
... |
similar to |
#Tematres URLs rtematres.options('tematres_url') rtematres.options(tematres_url="http://www.example.com")
#Tematres URLs rtematres.options('tematres_url') rtematres.options(tematres_url="http://www.example.com")
Search the thesaurus for concepts. This function is a wrapper and so it calls the appropriate funtions depending on the search task.
rtematres.search(term, includenotes = FALSE)
rtematres.search(term, includenotes = FALSE)
term |
The concept you are looking for |
includenotes |
Include definition texts in the search (true, false). Note that one is only working for searches containing > 2 characters. otherwise it is just ignored. |
The function returns a vecor or a list of results for the search
Search the thesaurus for concepts in case of categorical textual vector. Create a five value summary for numerical columns.
rtematres.summary(input)
rtematres.summary(input)
input |
A categorial vector |
The function returns a summary
## Not run: rtematres.summary(input = iris$Species) lapply(iris, function(x) rtematres.summary(input = x)) ## End(Not run)
## Not run: rtematres.summary(input = iris$Species) lapply(iris, function(x) rtematres.summary(input = x)) ## End(Not run)