I am writing a package that would create a CSV gists on github.com from a data frame. Signature would be like so:
gist.csv(my.data.frame, public=FALSE, description="my results in CSV")
I'm using httr for the HTTP calls and the GitHub API expects the content of the gist as part of the body.
However, I'm stuck on serialising the object my.data.frame into a CSV string and assigning the string into a variable. I'm looking for a way to have
csv.string <- write.csv(my.data.table)
Is there a good way to achieve that (ideally without having to resolve to writing to a temp file)