R functions for Social Media mining