R package for mining text functions