readDF {phm} | R Documentation |
Create a PlainTextDocument from a row in a data frame
Description
Read a row of the content of a DFSource object into a PlainTextDocument.
Usage
readDF(elem, language, id = "1")
Arguments
elem |
A list containing the field content containing one row with data from a data frame containing at least the columns id and text, but possibly more. |
language |
abbreviation of the language used; "en" for English |
id |
Not used, but needed for VCorpus |
Value
A PlainTextDocument with content equal to the contents of the text field, and meta data containing the information in the remaining fields, including the id field
Examples
(df=data.frame(id=1:3,text=c("First text","Second text","Third text"),
title=c("N1","N2","N3")))
readDF(list(content=df[1,]),"en")
[Package phm version 1.1.2 Index]