我的闪亮应用程序面临一个问题,其中从 csv 文件呈现的列状数据显示在行而不是列中(除标题外的每个变量都被视为一列,而它应该在行中对齐)。每次访问闪亮页面时,它都会弹出以下错误:“DataTables 警告:table id=DataTables_Table_0 - 第 10 行请求未知参数 '10'。有关此错误的更多信息,请参阅http://datatables.net/吨/4 ”。请看下面的附图
具有完全相同代码的相同应用程序在质量集群中运行得非常好,但在生产中却失败了。两个风景完全一样。请参阅下面的两张图片,了解数据的外观和当前的显示方式。 在此处输入图片说明
该应用程序在带有 R 3.6 的 RHEL 7 上运行
Server.R
shinyServer(function(session,input, output) {
myAnalysisList = reactiveFileReader(1000, NULL, "scheduledAnalyses.csv", readFunc = read.csv, stringsAsFactors = FALSE, encoding = "UTF-8")
observeEvent(input$schedule,{
tryCatch({
adjustedDateRange<-getAdjustedDateRange(input$dateRange[1],input$dateRange[2],type = input$forecastType)
currTime = Sys.time()
print(input$forecastHorizon)
forecastHorizonCorrected = input$forecastHorizon
if(input$forecastType!="Monthly"){
forecastHorizonCorrected = input$forecastHorizonWeekly
}
newRow = data.frame(ScheduledAt = as.character(currTime),
StartDate = as.character(adjustedDateRange$startDate),
EndDate = as.character(adjustedDateRange$endDate),
Linea = input$productLinea,
Series = input$productSeries,
Group = input$productGroup,
StatGroup = input$productStatGroup,
ProductCode …Run Code Online (Sandbox Code Playgroud)