"Warning in output$name <- renderPlot({ : Coercing LHS to a list" when using caterplot from mcmcplot

626 views
Skip to first unread message

Brad

unread,
Apr 25, 2013, 7:42:45 PM4/25/13
to shiny-...@googlegroups.com
I have data coming from JAGS that will generate a nice caterplot via pdf() and png(), but does not run under shiny-server's renderPlot. That throws a warning "Coercing LHS to a list" and does not create a plot for shiny.

This is on spark.rstudio.org, so I don't know if that has anything to do with it. But like I said, I can use that instance of shiny-server to call png() and pdf() without issue.


This works:
<snip>
  png("AdjScoresPlot.png", width=2000, height=1600)
  caterplot(scorematrix, cex.labels=0.25, main="Adjusted Scores",
             xlab="Adjusted Score", ylab="Student Name")
  dev.off()
</snip>


This does not work:
<snip>
   output$fancyPlot <- renderPlot({  
   caterplot(scorematrix, cex.labels=0.25, main="Adjusted Scores",
             xlab="Adjusted Score", ylab="Student Name")
   )}
</snip>




Any idea what's going on?

Best,
Brad

Brad

unread,
Apr 25, 2013, 8:47:36 PM4/25/13
to shiny-...@googlegroups.com
Just figured it out and got it working. There was a namespace collision with the snippet above this code that overwrote output (okay in R; not so much in shiny).

Once I got that taken care of, shiny drew the plot as expected (as a png).

Thanks for a great tool!

Best,
Brad 
Reply all
Reply to author
Forward
0 new messages