The r package slackr is one option,
Note the function slackr_history.
You mention that "i have an App that connected to live database". If slack is just getting it's data from there, wouldn't it be preferable to just call that database directly for the information you want to work with in R? That is, rather than add another link in the chain of where this data get moved around?