Quantcast
Channel: User micstr - Stack Overflow
Viewing all articles
Browse latest Browse all 47

How do you view corrgrapher object in Shiny?

$
0
0

I would like to show a corrgrapher object within Shiny, which allows a user to move the nodes. The package help says "Feel free to pass it into plot, include it in knitr report or generate a simple HTML." but I am struggling with the right syntax. What am I missing?

Object looks like this:

Corrgrapher relationships

Code

See example below. I tried HTMLOutput/renderHTML as well.

library(tidyverse)library(shiny)library(corrgrapher)if (interactive()) {  ui <- fluidPage(    fluidRow(h1("corrgrapher plot"),             plotOutput("corrgram"))  )  server <- function(input, output, session) {    output$corrgram <- renderPlot({      plotdata <- corrgrapher(mtcars)        plot(plotdata)    })  }  shinyApp(ui = ui, server = server)}

Viewing all articles
Browse latest Browse all 47

Latest Images

Trending Articles





Latest Images