library("tm")
docs <- c("This is a text.", "This another one.")
vs <- VectorSource(docs)
vs
## $encoding
## [1] ""
##
## $length
## [1] 2
##
## $position
## [1] 0
##
## $reader
## function (elem, language, id)
## {
## if (!is.null(elem$uri))
## id <- basename(elem$uri)
## PlainTextDocument(elem$content, id = id, language = language)
## }
## <bytecode: 0x00000000211705a0>
## <environment: namespace:tm>
##
## $content
## [1] "This is a text." "This another one."
##
## attr(,"class")
## [1] "VectorSource" "SimpleSource" "Source"