Comments (16)
OK I just confirmed that this is indeed a bug caused by the recent fix for blogdown.
It works correctly if you're storing the dependencies externally like in this example https://raw.githubusercontent.com/bhaskarvk/widgetframe/master/inst/examples/rmarkdown/knitr_example.Rmd
but I'll fix it to make sure that it works even with inlined dependencies it works. In the mean time please use self_contained:FALSE
like in my example.
Thanks for reporting!
from widgetframe.
Another option is to explicitly set
knitr::opts_chunk$set(widgetframe_widgetsdir = 'widgets')
In the chunk options, with that your wigdets will be stored in a widgets directory, and you don't really need to specify self_contained:FALSE
.
from widgetframe.
I'll investigate, did it break after upgrading from 0.2 ?
from widgetframe.
Sorry for slow reply, I've been in lovely mountainous(ish) Wales.
Downgraded to 0.2.0 using devtools and have the same issue. widgetframe was previously working for me on this machine, I can try downgrading my entire R installation later this week to help diagnose if needed.
from widgetframe.
I think this is something defi. messed up in your R install. I am not able to replicate this at my end.
from widgetframe.
Okay, I've completely removed and reinstalled R and RStudio from my machine and still have the same issue.
I vote for closing this issue (so I have) and if I ever figure out what went wrong I'll post an update here in case it helps others.
from widgetframe.
Do you have any other m/c you can try this on ?
Also in an R session, what happens when you do widgetframe::frameWidget(leaflet::leaflet())
?
Let's keep this open till we figure out what exactly broke.
from widgetframe.
I'll check on my partner's machine when they're next about.
On my machine your example code successfully displays a leaflet object in the Viewer: r widgetframe::frameWidget(leaflet::leaflet())
It's only in knitted output that I get errors like this: /rmd_output/0/widgetframe_files/figure-html//widgets/widget_01.html?initialWidth=910&childId=htmlwidget-8727e046b480be0bf5d4&parentTitle=html-document&parentUrl=http%3A%2F%2F127.0.0.1%3A21438%2Frmd_output%2F0%2F not found
from widgetframe.
Could you upload a minimal reproducible Rmd on gist and link here?
Also is the error displayed while the document is knitted or when you try to display the knitted HTML ?
from widgetframe.
Here's a gist with the .Rmd and .html as my machine generates it https://gist.github.com/martinjhnhadley/20cf9a102fcf870a558f64c05a02505d
RStudio's RMarkdown pane doesn't report any errors, but the " not found" error shows in the resultant html file.
from widgetframe.
Looking at your Rmd file
https://gist.githubusercontent.com/martinjhnhadley/20cf9a102fcf870a558f64c05a02505d/raw/df824cad077f1cad3d742e894361c166a7fe9429/widgetframe-not-found.Rmd
Why does it have this in the Rmd ?
### failure: /rmd_output/1/html-document_files/figure-html//widgets/widget_01.html?initialWidth=910&childId=htmlwidget-56f76eccd2ad2dfccf35&parentTitle=html-document&parentUrl=http%3A%2F%2F127.0.0.1%3A37852%2Frmd_output%2F1%2F not found
from widgetframe.
Oversight on my part, removed now.
from widgetframe.
I am not able to reproduce this. Could you render it and zip up the whole thing and upload it on box/dropbox? I need to look at the generated files.
from widgetframe.
Ohh, github supports dragging files into comments - here you go:
widgetframe-bug.zip
from widgetframe.
I think I'm having this same problem...do you know if a fix is likely to be made for being self-contained? I'm making a training document and it would be nice to show off some htmlwidgets.
from widgetframe.
Yup, can confirm I have a similar problem to @jl5000.
Although in my case I was fiddling with directories, which is probably a mistake on my part. It's better to keep everything in the same directory.
It's interesting to note something broken in this example, although I can't be sure it's the same issue.
I've managed to workaround the issue with the information present here. Maybe something to include in the vignette?
from widgetframe.
Related Issues (20)
- crosstalk HOT 1
- returning html instead of widget HOT 6
- Following render()'s self_contained FALSE and lib_dir HOT 3
- widgetframe in bookdown css problem HOT 12
- Full screen not working on iPhone widgetframe HOT 11
- Cannot save a mapview object HOT 2
- shiny integration HOT 3
- Upgrade pym
- scrolling DT::datatable HOT 2
- Using widgetframe in md files HOT 1
- blogdown 404 error - double-slash between "figure-html" and "widgets" HOT 5
- not rendering in xaringan HOT 1
- xaringan print to pdf
- widgetframe can't find file in rmd HOT 7
- Unable to save html file using widgetframe::saveWidgetframe HOT 1
- Full window
- Support single file output with saveWidgetframe
- Pagedown
- Can not display in blogdown
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from widgetframe.