AddListRemoveAttrDefLabelGroup: Add / List / Remove labelGroup to / of / from...

Description Usage Arguments See Also Examples

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
## 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)

emuR documentation built on June 11, 2021, 5:10 p.m.