私はformatPercentage
,rowname=FALSE
をrenderDataTableに使用したいと思います。方法1にはformatPercentage
が含まれ、方法2にはrowname=FALSE
が含まれています。私はそれらを一緒にマージしたいが、エラーを取得し続ける(renderDataTable ignores ... arguments when expr yields a datatable object; see ?renderDataTable
)。これはどうすればいいですか?formatPercentageとrenderDataTableを一緒に使用する方法
方法1 formatPercentage
が含まれていますが、renderDataTableオプションを渡すことはできません。
# Method 1 format Percentage
output$funddetails <- DT::renderDataTable(
DT::datatable({
heatmap_raw[heatmap_raw$Keeper%in%
input$selectkeeper&month(heatmap_raw$period)%in%
input$selectmonth,c("apid","Fund Name","Status","Comments","Last Update by Keeper","Most Recent Portfolio")]
})%>%formatPercentage(1, 2)
)
方法2のみrenderDataTableするためのオプションが含まれていますが、私はformatPercentageを使用することはできません。
#Method 2
data_fund <- reactive({
heatmap_raw[heatmap_raw$Keeper%in%
input$selectkeeper&month(heatmap_raw$period)%in%
input$selectmonth,c("apid","Fund Name","Status","Comments","Last Update by Keeper","Most Recent Portfolio")]
})
output$funddetails <- DT::renderDataTable(
data_fund(),
rowname=FALSE,
options = list(
pageLength=10,
#autoWidth = TRUE,
lengthMenu = list(c(25, 50, -1), c('25', '50', 'All')),
searchHighlight = TRUE,
scrollX=TRUE
)
)