I just used gs_new() from the googlesheets package to write a data.frame to a Google Sheet. That's a really neat tool. Today was one of my first actual chances to use it.
My question: is there a way to create the new sheet in a specific Google Drive folder? I wanted to place the Sheet inside an existing, shared folder.
Looking at the function arguments to gs_new(), I didn't see a way to do this. So I used the drive_mv() function from the googledrive package to move it. This two-step process is very workable and handy. I was just wondering if it could be done in one.
And yep, I did use googledrive after creating the new sheet with googlesheets. To be more explicit, this is what my code looks like using the iris dataset and a folder in "My Drive" called "R/Demo":
So, the two-steps aren't too tough. I was just curious to know if it could be done just using googlesheets alone.
I can also see how it's possible to use only the googledrive package by saving the data.frame as a .csv and using drive_upload(). I prefer to skip the csv step, however.
And @olyerickson, I didn't think I needed drive_mkdir() because the folder already existed. Are you saying there's way to use that function and gs_new() together?
Lastly, it could have been my error but I didn't see a way to tag this question with "googledrive". Only "googlesheets" was available.