Learn R Programming

emuR (version 0.1.6)

AddListRemoveAttributeDefinitions: Add / List / Remove attribute definition to / of / from emuDB

Description

Add / List / Remove database operation functions for attribute definition to / of / from an existing level definition of a emuDB. Attribute definitions can be viewed as definitions of parallel labels for the annotational units (ITEMs) of the emuDB. Each level definition is required to have at least one default attribute definition that has the same name as the level definition (automatically created by add_levelDefinition). For more information on the structural elements of an emuDB see vignette(emuDB). Note that as with level definitions, an attribute definition to a level cannot be removed, if it contains labels in the emuDB.

Usage

add_attributeDefinition(emuDBhandle, levelName, name, type = "STRING")

list_attributeDefinitions(emuDBhandle, levelName)

remove_attributeDefinition(emuDBhandle, levelName, name)

Arguments

emuDBhandle
emuDB handle as returned by load_emuDB
levelName
name of level
name
name of attributeDefinition
type
type of attributeDefinition (currently only "STRING")

Examples

Run this code
##################################
# prerequisite: loaded ae emuDB 
# (see ?load_emuDB for more information)

# add additional attribute definition to the "Phonetic" level
# of the ae emuDB that will contain the UTF8 IPA
# symbols of the phonetic transcriptions
add_attributeDefinition(emuDBhandle = ae,
                        levelName = "Phonetic",
                        name = "IPA-UTF8")
                        
# list attribute definitions for level "Word"
# of the ae emuDB
list_attributeDefinitions(emuDBhandle = ae, 
                          levelName = "Word")

# remove newly added attributeDefinition
remove_attributeDefinition(emuDBhandle = ae,
                           levelName = "Phonetic",
                           name = "IPA-UTF8")

Run the code above in your browser using DataLab