Re: how to compile shiny html

Ahmadou Dicko via ESS-help <[email protected]>
Newsgroups gmane.emacs.ess.general
Message-ID <CAP8THHUUupurMt6sqF9HfaT58+B8hhfN0C=GA9dVHjbmiFiN4Q@mail.gmail.com>
I think shiny needs an R server to be up and running, so it's not feasible
to have it as a static html.
If your app is not that complex, you can play with flexdashboard and
crosstalk to build a static dashboard.

Here is an example with source code:
https://matt-dray.github.io/earl18-crosstalk/04_leaflet-flexdash-dt-crosstalk.html



On Tue, Feb 15, 2022 at 6:36 PM Stephen Bond <[email protected]>
wrote:

> very interesting. when i chose 'shiny' as exporter it gave me
>
> Listening on http://127.0.0.1:4232
>
> and when I click on the URL the file is loaded and interactivity works.
> when I load the html separately, the interactivity does not work. Is
> there a way to share the html output in a way that will work for the
> recipient?
>
>
> On Tue, 2022-02-15 at 10:24 +0000, Ahmadou Dicko wrote:
> > Hi Stephen,
> >
> > Which version of poly-R are you using?
> > I'm using the version 20210930.1921 (elpa) and I have a "shiny" and
> > a  "shiny ess" exporters (see attached png).
> >
> > This is the setup, I use (using use-package)
> >
> >   (use-package poly-R
> >     :ensure t)
> >
> >   (use-package poly-markdown
> >     :ensure t)
> >
> >   (use-package poly-noweb
> >     :ensure t)
> >
> >   (use-package polymode
> >     :ensure t
> >     :init
> >     (require 'poly-R)
> >     (require 'poly-markdown)
> >     (require 'poly-noweb)
> >     :config
> >     (add-to-list 'auto-mode-alist
> > '("\\.[rR]md\\'" . poly-markdown+r-mode))
> >     (add-to-list 'auto-mode-alist
> > '("\\.[rR]markdown\\'" . poly-markdown+r-mode)))
> >
> >
> > Hope it helps.
> >
> > Best,
> > Ahmadou
> >
> >
> >
> >
> >
> > On Mon, Feb 14, 2022 at 10:46 PM Stephen Bond via ESS-help <
> > [email protected]> wrote:
> > > Hi folks,
> > >
> > > I am trying to run the example from :
> > >
> https://bookdown.org/yihui/rmarkdown/interactive-documents.html#intro-shiny
> > >
> > > and I get an error:
> > >
> > > /usr/bin/pandoc +RTS -K512m -RTS f2.knit.md --to html4 --from
> > > markdown+autolink_bare_uris+tex_math_single_backslash --output f2-
> > > exported.html --lua-filter /home/stephen/R/x86_64-pc-linux-gnu-
> > > library/4.0/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter
> > > /home/stephen/R/x86_64-pc-linux-gnu-
> > > library/4.0/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained
> > > --
> > > variable bs3=TRUE --standalone --section-divs --template
> > > /home/stephen/R/x86_64-pc-linux-gnu-
> > > library/4.0/rmarkdown/rmd/h/default.html --no-highlight --variable
> > > highlightjs=1 --id-prefix section- --variable theme=bootstrap --
> > > include-in-header /tmp/RtmpZfQj5e/rmarkdown-str9fc913622905.html --
> > > mathjax --variable 'mathjax-url:
> > >
> https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML
> '
> > >
> > > File shared/selectize/css/selectize.bootstrap3.css not found in
> > > resource path
> > > Error: pandoc document conversion failed with error 99
> > >
> > > the file is in:
> > > $ find ~ -name *.bootstrap3.css
> > > /home/stephen/R/x86_64-pc-linux-gnu-
> > > library/4.0/shiny/www/shared/selectize/css/selectize.bootstrap3.css
> > >
> > > and I tried adding
> > > css: "/home/stephen/R/x86_64-pc-linux-gnu-
> > > library/4.0/shiny/www/shared/selectize/css/"
> > > resource-path: "/home/stephen/R/x86_64-pc-linux-gnu-
> > > library/4.0/shiny/www/shared/selectize/css/"
> > >
> > > in the meta section, but it did not do much. then I tried adding to
> > > my
> > > pandoc setup in .emacs and that simply got ignored, I did not see
> > > the
> > > option listed in the *polymode export* buffer. I tried this:
> > >
> > >  '(markdown-command
> > >    (concat "pandoc" " --from=markdown --to=html" " --standalone --
> > > mathjax --highlight-style=pygments" " --resource-
> > > path=/home/stephen/R/x86_64-pc-linux-gnu-library/4.0/shiny/www/"))
> > >
> > >
> > > Does anybody know how to get around this? I had posted a question
> > > to
> > > the RStudio community once and got booted very quickly when they
> > > saw I
> > > was not using RStudio.
> > > Thanks everybody
> > > Stephen
> > >
> > > ______________________________________________
> > > [email protected] mailing list
> > > https://stat.ethz.ch/mailman/listinfo/ess-help
> >
> >
>
>

-- 
Ahmadou H. DICKO, PhD

Statistical consultant
Mobile: (+221) 77 123 81 69
Skype: dicko.ahmadou.h
Twitter : @dickoah
Gitlab: gitlab/dickoa
Github: github/dickoa

	[[alternative HTML version deleted]]

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.