## Not run: 
# # upload a document
# result <- rpubsUpload("My document title", "Document.html")
# if (!is.null(result$continueUrl))
#    browseURL(result$continueUrl)
# else
#    stop(result$error)
# 
# # update the same document with a new title
# updateResult <- rpubsUpload("My updated title", "Document.html",
#                             id = result$id)
# ## End(Not run)
Run the code above in your browser using DataLab