Skip to content

Instantly share code, notes, and snippets.

# This is a simple example for acquiring text-stream assets using the R "tm" package
require(tm) # Load the text-mining package.
require(tm.plugin.webmining) # Web-mining plugin for text mining.
require(SnowballC) # Package for stemming.
# Define the symbol we want to acquire news on.
sym = "NYSE:HSBC"
# Build a corpus of the news items.