transcripts_add {act} | R Documentation |
Add transcripts to a corpus
Description
Add a single or multiple transcript objects to a corpus object.
Usage
transcripts_add(
x,
...,
skipDuplicates = FALSE,
createFullText = TRUE,
assignMedia = TRUE
)
Arguments
x |
Corpus object |
... |
transcript object, list of transcript objects, corpus object. |
skipDuplicates |
Logical; If |
createFullText |
Logical; if |
assignMedia |
Logical; if |
Details
The name of the transcript objects have to be unique in the act package.
The @name
attribute of each transcript object will be set as identifier in the list of transcripts in the corpus object.
By default, transcripts with non unique names will be renamed.
If you prefer to import.skip.double.files, set the parameter skipDuplicates=TRUE
.
Skipped/renamed transcripts will be reported in
Value
Corpus object
Examples
library(act)
# get one of the already existing transcript in the examplecorpus
newtrans <- examplecorpus@transcripts[[1]]
# add this transcript to the examplecorpus
newcorpus <- act::transcripts_add(examplecorpus, newtrans)
# compare the two corpus objects
length(examplecorpus@transcripts)
length(newcorpus@transcripts)
names(examplecorpus@transcripts)
names(newcorpus@transcripts)