View source: R/transcripts_delete.R
transcripts_delete | R Documentation |
Delete transcript objects from a corpus object.
You need to name the transcripts to delete directly in the parameter 'transcriptNames'.
If you want to delete transcripts based on a search pattern (regular expression) use act::search_sub
first.
transcripts_delete(x, transcriptNames)
x |
Corpus object |
transcriptNames |
Vector of character strings; names of the transcript object to be deleted. |
Corpus object
library(act) # delete two transcripts by their name test <- act::transcripts_delete(examplecorpus, c("BOL_CCBA_SP_MeryGaby1", "BOL_CCBA_SP_MeryGaby2")) # compare the the original and modified corpus object length(examplecorpus@transcripts) length(test@transcripts) setdiff(names(examplecorpus@transcripts), names(test@transcripts)) test@history[length(test@history)] # delete transcripts that match a filter, e.g. all transcripts from Bolivia "BOL_" myfilter <- act::search_makefilter(examplecorpus, filterTranscriptIncludeRegEx = "BOL_") test <- act::transcripts_delete(examplecorpus, myfilter$transcript.names) # compare the the original and modified corpus object length(examplecorpus@transcripts) length(test@transcripts) setdiff(names(examplecorpus@transcripts), names(test@transcripts))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.