【问题标题】:Pubishing to rpubs existing html file发布到 rpubs 现有的 html 文件
【发布时间】:2015-07-23 15:15:52
【问题描述】:

我正在尝试将使用 knithtml 从 rmd 生成的 html 文件发布到 rpubs。但是,编织需要很长时间才能运行,我不想再次重新运行整个编织过程,只是为了对 html 文档的外观进行微小的更改。

当我关闭 html 文件并重新打开它时,我似乎找不到发布按钮。

【问题讨论】:

    标签: html r publish knitr


    【解决方案1】:

    安装包markdown就可以试试代码了:

    result <- rpubsUpload(title='Your title',htmlFile='your_html_file_and_path.html',method=getOption('rpubs.upload.method','auto')

    成功上传会在result 中返回2 个值,它们是网站地址。将continueUrl 复制并粘贴到浏览器中以完成上传。

    或者你可以使用函数:

    browseURL(result$continueUrl)

    使用默认浏览器直接进入网页。

    请注意,我确信有一种无需使用浏览器即可自动上传的方式,但这是我目前知道的唯一方式。

    【讨论】:

      【解决方案2】:

      执行以下命令-首先设置路径然后执行其他命令

      setwd("C:/Users/MK10181/Desktop")
      result <- rpubsUpload(title='SPC',contentFile='Report.html', originalDoc = 'Report.html')
      
      result
      $id
      [1] "https://api.rpubs.com/api/v1/document/507696/c26dc92b5fe046488a4bfa8c670dab26"
      
      $continueUrl
      [1] "http://rpubs.com/publish/claim/507696/dc025c9952da401db86aef1f0f234734"
      
      browseURL(result$continueUrl)
      

      在此之后,您的 RPub 的帐户页面将在浏览器中打开,然后您将看到您的文档。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2018-04-14
        • 1970-01-01
        相关资源
        最近更新 更多