This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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. |