微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

为什么我的RMarkdown脚本更改其html代码?

如何解决为什么我的RMarkdown脚本更改其html代码?

在最近运行良好之前,我一直使用R减价,最近弹出窗口显示了应有的输出,但是当在Web浏览器中查看输出时,显示多个组件,就像在R的弹出窗口中一样。 markdown脚本完成。

这是一段代码

    ### `r paste0("")`
    ```{r Volume By Day Table,echo = FALSE}
    Table[,.(date ##  Format the number values,CFD = paste("$",formatC(CFD,big.mark = ",",digits =0,format= "f")),FX = paste("$",formatC(FX,format= "f") ),Total = paste("$",formatC(Total,format= "f"))
         ) ]  %>%

## Create the datatable using the wrapper for the Datatables JS library from package (DT)
    datatable(.,options = list(  pageLength = 30,colReorder = list(realtime = FALSE),dom = 'Bftp',buttons = list(list(extend = 'excel',filename = paste0('volumeDaily',ReportDate)),list(extend = 'csv','copy'),columnDefs = list(list(className = 'dt-center',##,searchable = F,targets = 0:3)) # align the values center
                                ##,info = F
                                ##,paging = F
                                ),extensions = c('ColReorder','Buttons')
              ## The footnote of the table,caption = htmltools::tags$caption(style = 'caption-side: top; text-align: left;',htmltools::strong( 'Note:'),htmltools::br("- Notional volume is measured in millions and converted to USD equivalent."),"- PrevIoUs month's rates are used to calculate the present month notional volume until we receive the present month average rates at the end of the month.",htmltools::br("- When using the search Box please use the yyyy-mm-dd format.")
                                                  )
              ##,filter = 'top',rownames = FALSE
              ##,select = TRUE,colnames = c('Date','CFD Volume','FX Volume','Total Volume')

              ) %>%
      formatCurrency(columns=~CFD+FX+Total)  %>%
      formatDate(columns=~date)
      '''

产生的HTML代码通常具有div元素,其class = datatables html-widget html-widget-static-bound 作为具有子元素的元素,但具有最近创建的html文件,该div元素没有子元素,我想这就是为什么数据未在网络浏览器中显示的原因。

自两次运行以来,脚本没有改变,我不太确定为什么失败

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。