首先,我是shiny 游戏的初学者.我正试着在本地保存我在应用程序中用lattice
包制作的图(使用按钮).但是,我无法在服务器中创建相应的函数.
请帮帮忙
我的用户界面中的下载按钮和绘图:
downloadButton('downloadPlot2', 'Save lattice plot locally')
.
.
.
tabPanel(names(panel_choices)[2], value = panel_choices[[2]], plotOutput("plot2"))
服务器:
output$plot2 <- renderPlot({
print(plotInput2())
})
plotInput2 <- reactive({
md <- mydata()
md.long <- melt(md, id = "ID", measure = colnames(md)[-1])
xyplot(value~md.long[,1],data = md.long,main="visualization of data from csv file",ylim = c(input$value[1],input$value[2]),
xlab = "ID",ylab = "values of variables")
})