Open jennybc opened 9 years ago
Wow! Will study your suggestions. (I rather doubt you're missing something... :-)
Will experiment with gs_new().
I find that in general naming things (like Google Spreadsheets) makes a big difference in the handoff project I'm undertaking.
Thanks for sharing this example of how you use
googlesheets
! And the interesting blog post that lead me here.In
setup_my_google.R
, I gather you want to use your own client secret and id, instead of the ones that ship w/ the package? But it doesn't look like thegoogle_token
object will be used inupload_google_ss()
and, therefore,gs_upload()
. I suspect that code, as it is now, has no affect on your calls to the Sheets API. I'd be curious if I am missing something. I think you need to use an explicit call togs_auth()
, which has arguments for client secret and id, to accomplish what you want, i.e. get into an authorized state w/ YOUR client secret and id.You may have reasons for using
gs_upload()
but just wanted to point out: You can usegs_new()
to go straight from a data.frame to a new Google Sheet, without creating and then deleting a local csv. Orgs_ws_new()
to go from data.frame to a new worksheet within an existing Google Sheet.I like the way you are naming the new Google Sheet based on the data.frame's name. I probably should do that by default!