AddListRemoveLevelDefinitions: Add / List / Remove level definition to / of / from emuDB

Description Usage Arguments Examples

Description

Add / List / Remove database operation functions for level definitions. A level is a more general term for what is often referred to as a "tier". It is more general in the sense that people usually expect tiers to contain time information. Levels can either contain time information if they are of the type "EVENT" or of the type "SEGMENT" but are timeless if they are of the type "ITEM". For more information on the structural elements of an emuDB see vignette(emuDB). Note that a level cannot be removed, if it contains instances of annotation items or if it is linked to another level. Further note, renaming a level definition can be done using rename_attributeDefinition.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
add_levelDefinition(
  emuDBhandle,
  name,
  type,
  rewriteAllAnnots = TRUE,
  verbose = TRUE
)

list_levelDefinitions(emuDBhandle)

remove_levelDefinition(
  emuDBhandle,
  name,
  rewriteAllAnnots = TRUE,
  force = FALSE,
  verbose = TRUE
)

Arguments

emuDBhandle

emuDB handle as returned by load_emuDB

name

name of level definition

type

type of level definition ("SEGMENT","EVENT","ITEM")

rewriteAllAnnots

should changes be written to file system (_annot.json files) (intended for expert use only)

verbose

Show progress bars and further information

force

delete all items incl. links pointing to those items from the levels

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 

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

# add level called "Phonetic2" to the ae emuDB
# that could for example contain the transcriptions of a second annotator
add_levelDefinition(emuDBhandle = ae,
                    name = "Phonetic2",
                    type = "SEGMENT")
                    
# list level definition of ae emuDB
list_levelDefinitions(emuDBhandle = ae)

# remove newly added level definition
remove_levelDefinitions(emuDBhandle = ae,
                        name = "Phonetic2")

## End(Not run)

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