DFSource | R Documentation |
This function will create a DFSource object from a data frame that contains at least columns id and text, but may contain several more. VCorpus will use this to read in each row from the data frame into a PlainTextDocument, storing additional variables in its metadata. It will then combine all those PlainTextDocuments in a VCorpus object.
DFSource(x)
x |
A dataframe with at a minimum a text and id column, and a row for each document to be stored in a corpus. |
A DFSource object containing the encoding set to "", the number
of rows (length), the current position (position=0), the type of
reader to use (reader=readDF), and the content (x
).
(df=data.frame(id=1:3,text=c("First text","Second text","Third text"),
title=c("N1","N2","N3")))
DFSource(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.