ggplot2를 사용하여 반짝 반짝 빛나는 기본을 익히는 데 많은 즐거움을 얻은 후에 rCharts를 사용해 보았습니다. 그러나 인력거 그래프를 표시 할 수 없습니다. 어떤 도움이 많이 감사; 쉽게 걸릴 - 난 그냥 여기에 사용납니다)R : rCharts 및 Shiny : 인력거 플로팅이 표시되지 않습니다
### ui
library(shiny)
require(devtools)
install_github('rCharts', 'ramnathv')
# moved from lower down so call to `showOutput` would not fail
library(rCharts)
library(rattle)
shinyUI(
pageWithSidebar(
headerPanel("Rickshaw test"),
sidebarPanel(
selectInput("variable",
"Choice is arbitrary:",
c("Choice 1", "Choice 2")
)
),
mainPanel(
showOutput("plot", "Rickshaw")
)
)
)
### server
data(weather)
w = weather
dateToSeconds = function (date) {
date = as.POSIXct(as.Date(date), origin = "1970-01-01")
as.numeric(date)
}
w$Date = dateToSeconds(w$Date)
shinyServer(function(input, output) {
output$mpgPlot = renderChart({
rs = Rickshaw$new()
rs$layer(MinTemp ~ Date,
data = w,
type = "line")
return(rs)
})
})
오류 메시지를 게시하십시오. ('showOutput'은 'shiny'가 아닌 것으로보고되고, 'rCharts'는 CRAN이 아닙니다.) –
라이브러리 호출을 재정렬하고 코드를 재실행하면 R 3.0이 설치된 Mac에서 오류가 없습니다. .1,하지만 헤이 ...'rPlot'에 대한 호출이 없으니 어떻게 될까요? –
@DWin 'rPlot'을 직접 호출하지 않고도 플롯을 만들 수 있습니다. OP는 예제와 마찬가지로'Rickshaw '객체를 만들었습니다. http://ramnathv.github.io/rCharts/ – dickoa