You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
reactlog_write() output can not be used after being read back #71
I want to download or store the html file produced by reactlog so that i can see it later even if the program is closed or the reactlog is reset.
There is a reactlog_write() function that puts it into a json file but how to use that json file again to create or generate the reactlog.
library(shiny)
library(reactlog)
# tell shiny to log all reactivity
reactlog_enable()
reactlogReset()
# run a shiny appapp<- system.file("examples/01_hello", package="shiny")
runApp(app)
# once app has closed, display reactlog from shinyshiny::reactlogShow()
reactlog_write(reactlog(),file="test1.json")
How to use this file test1.json to produce the interative reactlog again ?
Dang. Attributes are lost when saving to regular json. 😞
For now...
### add elements to reactlog
library(shiny)
library(reactlog)
# tell shiny to log all reactivity
reactlog_enable()
reactlogReset()
# run a shiny appapp<- system.file("examples/01_hello", package="shiny")
runApp(app)
#### save to disk
writeLines(jsonlite::serializeJSON(shiny::reactlog()), file="test2.json")
# ---------# restore reactlog to an objectmy_reactlog<-jsonlite::unserializeJSON(readLines("test2.json")[1])
# view reactlog objectreactlog::reactlog_show(my_reactlog)
Your browser can store the webpage as a "web archive". The html is not a standalone file. For the readme, I have to copy over the assets to make the images / css / js work.
(For context, I am aware that it would be very nice if it was an htmlwidget to be able to easily include it in other locations.)
Activity
schloerke commentedon Sep 29, 2020
Dang. Attributes are lost when saving to regular json. 😞
For now...
[-]Download the interactive reactlog[/-][+]`reactlog_write()` output can not be used after being read back[/+]schloerke commentedon Oct 7, 2020
Your browser can store the webpage as a "web archive". The html is not a standalone file. For the readme, I have to copy over the assets to make the images / css / js work.
(For context, I am aware that it would be very nice if it was an htmlwidget to be able to easily include it in other locations.)
royfrancis commentedon May 2, 2024
Any updates here? Would it be possible to include a reactlog output in a quarto document?
feat(R): Add reactlog_read() to read back reactlog_write() output