pzhaonet / mindr

an R package which converts markdown files (.md, .Rmd) into mindmaps (brainstorms)
GNU General Public License v3.0
569 stars 48 forks source link

How to apply 'mindr' in R shiny #18

Closed 01miaom closed 4 years ago

01miaom commented 4 years ago

I try to embed the mind into shiny webpage, but it return an error that the parameter length is zero. (Can be used normally in R studio) code:

library('miner')

...

input <- system.file("xuer.md", package = "mindr"), mm(from = input, type = "file", root = "Ins", to = "learningr.mm"),

...

01miaom commented 4 years ago

sorry, is mindr, computer automatically corrects spelling.

pzhaonet commented 4 years ago

You can save the mind map as a html widget and embed it into a shiny app.

library(mindr)
input <- system.file('examples/r/rmd2r.Rmd', package = 'mindr')
mm(from = input, type = 'file', root = 'mindr', widget_name = "test.html")

library(shiny)
ui <- fluidPage(
  includeHTML("test.html")
)
server <- function(input, output, session) {}
shinyApp(ui, server)
01miaom commented 4 years ago

Thx~ This gave me a good idea to solve similar questions. Actually, I have been worrying about how to insert interactive pictures to shiny for a long time.