Я пытаюсь загрузить набор данных, он хорошо работает в локальном приложении, но при публикации я получаю сообщение об ошибке.
server.R
library('DT')
shinyServer(function(input, output) {
output$distPlot <- renderDT({bar1 <- readRDS("./Data/cohortData.RDA") })
})
ui.r
library(DT)
# Define UI for application that draws a histogram
bar1 <- readRDS("./Data/cohortData.RDA")
shinyUI(fluidPage(
# Application title
titlePanel("Cohort Analysis Nisnass"),
# Sidebar with a slider input for number of bins
# Show a plot of the generated distribution
DTOutput("distPlot")
))
Вывод на локальный компьютер
Вывод на блестящий веб-сайт
logs
Listening on http://127.0.0.1:35544
2019-01-24T00:01:23.013253+00:00 shinyapps[658838]:
2019-01-24T00:01:23.013256+00:00 shinyapps[658838]: Attaching package: ‘DT’
2019-01-24T00:01:23.013257+00:00 shinyapps[658838]:
2019-01-24T00:01:23.014163+00:00 shinyapps[658838]: The following objects are masked from ‘package:shiny’:
2019-01-24T00:01:23.014165+00:00 shinyapps[658838]:
2019-01-24T00:01:23.014165+00:00 shinyapps[658838]: dataTableOutput, renderDataTable
2019-01-24T00:01:23.014166+00:00 shinyapps[658838]:
2019-01-24T00:01:27.230207+00:00 shinyapps[658838]: Warning: Error in value[[3L]]: Couldn't normalize path in `addResourcePath`, with arguments: `prefix` = 'dt-core-1.10.16'; `directoryPath` = '/Library/Frameworks/R.framework/Versions/3.5/Resources/library/DT/htmlwidgets/lib/datatables'
ОБНОВЛЕНИЕ
Код данных
m<-DT::datatable(cohorts.wide,
class = 'cell-border stripe',
rownames = FALSE,
options = list(
ordering=F,
dom = 't',
pageLength = 12) ) %>%
formatStyle("0",
backgroundColor = 'lightgrey',
fontWeight = 'bold') %>%
formatStyle(names(cohorts.wide[c(-1,-2)]),fontWeight = 'bold',color = 'white', backgroundColor = styleInterval(breaks,colors))