Description Usage Arguments Examples
Create a tm source from Waterloo Region Record tm packages
1 | NewsSource(x, encoding = "UTF-8")
|
x |
|
encoding |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (x, encoding = "UTF-8")
{
content <- readLines(x)
content <- content[1:(length(content) - 6)]
content <- content[grep(".", content)]
num <- cumsum(grepl("______________", content))
content <- split(content, num)
s <- SimpleSource(encoding, length = length(content), content = content,
uri = x, reader = readNews, class = "NewsSource")
s
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.