R can read from an API and write to CSV independent of Tableau. This appears to be a fileio thing and not statistics related so I don't understand the use case.
Bora Beran has a post about using Python to access Twitter, writing out to CSV and then appending data to an extract on Tableau Server (all of this is not R related). Thsi might be helpful though:
I hope that helps you out.