## Store the current config settings, so they can be reloaded at the end
## of the examples
conf_store <- tcplConfList()
tcplConfDefault()
## Load some example data
d1 <- tcplLoadData(1)
## Check for chemical name in 'dat'
"chnm" %in% names(d1) ## FALSE
## Map chemical annotation only
d2 <- tcplPrepOtpt(d1, ids = "spid")
"chnm" %in% names(d2) ## TRUE
"acnm" %in% names(d2) ## FALSE
## Map all annotations
d3 <- tcplPrepOtpt(d1) ## Also works if function is given d2
"chnm" %in% names(d2) ## TRUE
"acnm" %in% names(d2) ## TRUE
## Reset configuration
options(conf_store)
Run the code above in your browser using DataLab