# NOT RUN {
## Upload a file to share
file <- drive_upload(
drive_example("chicken.txt"),
name = "chicken-share.txt",
type = "document"
)
## Let a specific person comment
file <- file %>%
drive_share(
role = "commenter",
type = "user",
emailAddress = "susan@example.com"
)
## Let a different specific person edit and customize the email notification
file <- file %>%
drive_share(
role = "writer",
type = "user",
emailAddress = "carol@example.com",
emailMessage = "Would appreciate your feedback on this!"
)
## Let anyone read the file
file <- file %>%
drive_share(role = "reader", type = "anyone")
## Single-purpose wrapper function for this
drive_share_anyone(file)
## Clean up
drive_rm(file)
# }
Run the code above in your browser using DataLab