df <- data.frame(contents = c("content 1", "content 2", "content 3"),
title = c("title 1" , "title 2" , "title 3" ),
authors = c("author 1" , "author 2" , "author 3" ),
topics = c("topic 1" , "topic 2" , "topic 3" ),
stringsAsFactors = FALSE)
m <- list(.Data = "contents", Heading = "title",
Author = "authors", Topic = "topics")
myReader <- readTabular(mappings = m)
ds <- DataframeSource(df)
elem <- getElem(stepNext(ds))
(result <- myReader(elem, load = TRUE, language = "en", id = "id1"))
meta(result)
Run the code above in your browser using DataLab