Learn R Programming

emuR (version 0.1.7)

AddListRemoveLinkDefinition: Add / List / Remove linkDefinition to / of / from emuDB

Description

Add / List / Remove new link definition to / of / from emuDB. A link definition specifies the relationship between two levels, the super-level and the sub-level. The entirety of all link definitions of a emuDB specifies the hierarchical structure of the database. For more information on the structural elements of an emuDB see vignette(emuDB).

Usage

add_linkDefinition(emuDBhandle, type, superlevelName, sublevelName)

list_linkDefinitions(emuDBhandle)

remove_linkDefinition(emuDBhandle, superlevelName, sublevelName)

Arguments

emuDBhandle
emuDB handle as returned by load_emuDB
type
type of linkDefinition (either "ONE_TO_MANY", "MANY_TO_MANY" or "ONE_TO_ONE")
superlevelName
name of super-level of linkDefinition
sublevelName
name of sub-level of linkDefinition

Details

Link type descriptions:
  • "ONE_TO_MANY"
{A single ITEM of the super-level can be linked to multiple ITEMs of the sub-level} "MANY_TO_MANY"{Multiple ITEMs of the super-level can be linked to multiple ITEMs of the sub-level} "ONE_TO_ONE"{A single ITEM of the super-level can be linked to a single ITEM of the sub-level}

Examples

Run this code
##################################
# prerequisite: loaded emuDB that was converted
# using the convert_TextGridCollection function called myTGcolDB
# (see ?load_emuDB and ?convert_TextGridCollection for more information)

# add link definition from super-level "Phoneme"
# to sub-level "Phonetic" of type "ONE_TO_MANY"
# for myTGcolDB emuDB
add_linkDefinition(emuDBhandle = myTGcolDB,
                   type = "ONE_TO_MANY",
                   superlevelName = "Phoneme",
                   sublevelName = "Phonetic")

# list link definitions for myTGcolDB emuDB
list_linkDefinitions(emuDBhandle = myTGcolDB)

# remove newly added link definition
remove_linkDefinition(emuDBhandle = myTGcolDB,
                      superlevelName = "Phoneme",
                      sublevelName = "Phonetic")

Run the code above in your browser using DataLab