安装包markdown然后你可以尝试代码:
result <- rpubsUpload(title='Your title',htmlFile='your_html_file_and_path.html',method=getOption('rpubs.upload.method','auto')
成功上传会在 中返回 2 个值result,即网站地址。将其复制并粘贴continueUrl到浏览器中以完成上传。
或者您可以使用该功能:
browseURL(result$continueUrl)
使用默认浏览器直接访问网页。
请注意,我确信有一种无需使用浏览器即可自动上传的方法,但这是我目前知道的唯一方法。