| annotations_delete_empty | R Documentation | 
Delete empty annotations in a corpus object.
If only certain transcripts or tiers should be affected set the parameter filterTranscriptNames and filterTierNames.
In case that you want to select transcripts and/or tiers by using regular expressions use the function act::search_makefilter first.
annotations_delete_empty(
  x,
  trimBeforeCheck = FALSE,
  filterTranscriptNames = NULL,
  filterTierNames = NULL
)
| x | Corpus object. | 
| trimBeforeCheck | Logical; if  | 
| filterTranscriptNames | Vector of character strings; names of the transcripts to be included. | 
| filterTierNames | Character string; names of the tiers to be included. | 
Corpus object.
library(act)
# In the example corpus are no empty annotations.
# Empty annotations are deleted by default when annotation files are loaded.
# So let's first make an empty annotation.
# Check the first annotation in the first transcript
examplecorpus@transcripts[[1]]@annotations$content[[1]]
# Empty the contents of this annotation
examplecorpus@transcripts[[1]]@annotations$content[[1]] <- ""
# Run the function
test <- act::annotations_delete_empty (x=examplecorpus)
# Compare how many data rows are in the first transcript in
# the example corpus and in the newly created test corpus:
nrow(examplecorpus@transcripts[[1]]@annotations)
nrow(test@transcripts[[1]]@annotations)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.