This is a little demo to show how we may view sharing.
library('dplyr') library('googledrive') drive_auth("drive-token.rds")
write.table("This is a little demo", "demo.txt") drive_upload(from = "demo.txt", up_name = "Happy Little Demo")
my_file <- drive_list("Happy Little Demo")$id %>% drive_file()
my_file
cool beans - it's private!
all functions that will somehow change the file will output a new file, overwrite the old file with this to avoid confusion
my_file<- my_file %>% drive_share(role = "reader", type = "anyone")
Let's see what that did
my_file
Now anyone with the link can view it
r emo::ji('world')
)my_file <- my_file %>% drive_share(role = "reader", type = "anyone", allowFileDiscovery = "true")
Let's see what that did
my_file
I've added access
to the Google Drive file object
my_file$access
you can also output a link to share
drive_share_link(my_file)
drive_delete(my_file)
rm <- file.remove("demo.txt")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.