Learn R Programming

phm (version 2.1.2)

getElem.DFSource: Obtain the current row of the content of a DFSource

Description

Using the position field of x to indicate the index of the current row, we retrieve the current row of the content of a DFSource. This function is mainly used by the VCorpus function.

Usage

# S3 method for DFSource
getElem(x)

Value

A list with the current row in the content of a DFSource object. The current row index is the position in the DFSource object.

Arguments

x

A DFSource object

Examples

Run this code
library(tm)
df=data.frame(id=1:3,text=c("First text","Second text","Third text"),
              title=c("N1","N2","N3"))
getElem(stepNext(DFSource(df)))

Run the code above in your browser using DataLab