
Last chance! 50% off unlimited learning
Sale ends in
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)
.
add_attrDefLabelGroup(
emuDBhandle,
levelName,
attributeDefinitionName,
labelGroupName,
labelGroupValues
)list_attrDefLabelGroups(emuDBhandle, levelName, attributeDefinitionName)
remove_attrDefLabelGroup(
emuDBhandle,
levelName,
attributeDefinitionName,
labelGroupName
)
emuDB handle as returned by load_emuDB
name of level
name of attributeDefinition
name of label group
character vector of labels
add_labelGroup
if (FALSE) {
##################################
# 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")
}
Run the code above in your browser using DataLab