helper_transcriptNames_set {act} | R Documentation |
Helper: Set names of all transcripts in a corpus
Description
Sets the names of all transcript objects in a corpus object both in the names of the list x@transcripts
and in the slot @name
of each transcript.
Usage
helper_transcriptNames_set(x, transcriptNames)
Arguments
x |
Corpus object |
transcriptNames |
Vector of character strings; new names. |
Value
List
Examples
library(act)
# get current names of the transcripts
names.old <- act::helper_transcriptNames_get(examplecorpus)
# rename giving numbers as names
names.test <- as.character(seq(1:length(names.old)))
test <- act::helper_transcriptNames_set(examplecorpus, names.test)
names(test@transcripts)
# create an error: empty name
## Not run:
names.test <- names.old
names.test[2] <- " "
test <- act::helper_transcriptNames_set(examplecorpus, names.test)
## End(Not run)
# create an error: double names
## Not run:
names.test <- names.old
names.test[2] <- names.test[1]
test <- act::helper_transcriptNames_set(examplecorpus, names.test)
## End(Not run)
[Package act version 1.3.1 Index]