Learn R Programming

emuR (version 0.1.8)

AddListRemoveAttrDefLabelGroup: Add / List / Remove labelGroup to / of / from attributeDefinition of emuDB

Description

Add / List / Remove label group to / of / from a specific attribute definition. This label group can be used as a short hand to reference groups of labels specific to an attribute definition (compared to global label groups that are added by add_labelGroup) in a query. A common example would be to add a label group for something like the phonetic category of nasals to be able reference them as "nasals" in a query. For more information on the structural elements of an emuDB see vignette(emuDB).

Usage

add_attrDefLabelGroup(emuDBhandle, levelName, attributeDefinitionName, labelGroupName, labelGroupValues)
list_attrDefLabelGroups(emuDBhandle, levelName, attributeDefinitionName)
remove_attrDefLabelGroup(emuDBhandle, levelName, attributeDefinitionName, labelGroupName)

Arguments

emuDBhandle
emuDB handle as returned by load_emuDB
levelName
name of level
attributeDefinitionName
name of attributeDefinition
labelGroupName
name of label group
labelGroupValues
character vector of labels

See Also

add_labelGroup

Examples

Run this code
## Not run: 
# 
# ##################################
# # prerequisite: loaded ae emuDB 
# # (see ?load_emuDB for more information)
# 
# sampaNasals = c("m", "F", "n", "J", "N")
# 
# # add these values to the default Phonetic attribute
# # definition of the Phonetic level of the ae emuDB
# add_attrDefLabelGroup(emuDBhandle = ae,
#                       levelName = "Phonetic",
#                       attributeDefinitionName = "Phonetic",
#                       labelGroupName = "sampaNasals",
#                       labelGroupValues = sampaNasals)
# 
# # query the labelGroup
# query(ae, "Phonetic=sampaNasals")
# 
# 
# # list attribute definition label groups
# # of attributeDefinition "Phonetic" of the level "Phonetic"
# # of the ae emuDB
# list_attrDefLabelGroups(emuDBhandle = ae, 
#                         levelName = "Phonetic" , 
#                         attributeDefinitionName = "Phonetic")
# 
# # remove the newly added attrDefLabelGroup
# remove_attrDefLabelGroup(emuDBhandle = ae,
#                          levelName = "Phonetic",
#                          attributeDefinitionName = "Phonetic",
#                          labelGroupName = "sampaNasals")
# 
# ## End(Not run)

Run the code above in your browser using DataLab