Appsilon / shiny.info

Display simple diagnostic info of your Shiny app
https://appsilon.github.io/shiny.info/
Other
61 stars 8 forks source link

[Feature]: render r console output #38

Open wfma opened 2 years ago

wfma commented 2 years ago

Guidelines

Description

Hey folks!

I wish to use this so I can see the live output of the console from R! Some packages like Seurat/Monocle for the single cell RNA analysis are very verbose and would be IMMENSELY helpful to see the live outputs for debugging.

Problem

Help debug shiny apps

Proposed Solution

show live output from the R console

Alternatives Considered

I tried to print the output but it can get really tedious bc the app sometimes have so many functions!

KerryAM-R commented 1 year ago

This is the closest thing I've found to show the output once the process has finished.

ui verbatimTextOutput("scGATE_verbatum_Generic")

server `output$scGATE_verbatum_Generic <- renderPrint({ FN <- tempfile() zz <- file(FN, open = "wt") sink(zz ,type = "output") sink(zz, type = "message") if (input$generic_scGATE==T) { scGATE_anno_generic()}

  else{
    print("Generic not run")
  }
  sink(type = "message")
  sink(type = "output")
  cat(readLines(FN), sep="\n")

})`