1
我有一個問題,似乎很安靜,但我還沒有找到一個解決方案,但尚未:「ERROR:path [1] =」「:沒有這樣的文件或目錄」當發佈平行座標圖時閃亮
當試圖發佈使用rCharts Parcoords web應用程序,我得到這個錯誤: 錯誤:路徑[1] =「」:沒有這樣的文件或目錄
而且奇怪的是,該應用程序完美運行良好的我的筆記本電腦...
下面是我正在使用的代碼的簡單版本/示例。 請注意,在運行代碼之前,您需要下載parcoords庫並將其放入您工作的文件中。它的路徑應該是:「圖書館/部件/ parcoords」
謝謝您提前! :)
ui.R:
library(shiny)
library(shinydashboard)
library(rCharts)
sidebar <- dashboardSidebar(
width = 250,
sidebarMenu(id = "menu1"
,menuItem("Parallel Coordinates Chart", tabName = "parcoords", icon = icon("line-chart"))
)
)
body <- dashboardBody(
tabItems(
tabItem(tabName = "parcoords",
fluidRow(
column(10, offset = 1,
tabBox(width = 13.5,height=8,
id ="colors",
tabPanel("Multicolor",showOutput("chart1", "parcoords")))
)
)
)
)
)
shinyUI(dashboardPage(
dashboardHeader(title = "Parallel Coordinates Chart"
,titleWidth = 450),
sidebar,
body
))
server.R:
library(shiny)
library(shinydashboard)
library(rCharts)
shinyServer(function(input, output) {
dat <- Theoph
output$chart1 <- renderChart2({
p1 <- rCharts$new()
p1$setLib("libraries/widgets/parcoords")
p1$set(padding = list(top = 50, bottom = 50,
left = 50, right = 50),
width = 1200, height = 600)
p1$set(
data = toJSONArray(dat, json = F),
range = unique(dat$Subject),
colorby = 'Subject',
colors = c('red', 'green', 'yellow','blue','black', 'pink', 'brown', 'orange', 'grey', 'maroon', 'plum'))
p1
}
)
})