Comments (6)
Don't have an answer for this one. I'm not sure it is possible to download svg plots or include them in knitr documents at this time. You can include them if you use rmarkdown but that doesn't help much in a shiny app. A couple of relevant discussions:
from radiant.
@vnijs Thank You.
from radiant.
Link to review:
http://stackoverflow.com/questions/31645528/knit-dtdatatable-without-pandoc/31797947#31797947
Others:
http://blog.dominodatalab.com/interactive-dashboards-with-knitr-and-html-widgets/
http://stackoverflow.com/questions/21729415/generate-dynamic-r-markdown-blocks/33222656#33222656
http://stackoverflow.com/questions/28585238/r-rendering-html-widget-in-external-browser
from radiant.
Hi @vnijs,
thank you for all links. They are useful. I can now save diagrams as html. not bad.
server.R
output$Save_diagrammeR_plot <- downloadHandler(
filename = function() {
paste(getwd(),"DiagrammeRplot.html", sep="/")
},
content = function(file) {
saveWidget(
DiagrammeR::grViz("
digraph{
BRCA1 -> IFI16 [arrowhead = normal, color= LightGray, alpha=30, penwidth= 0.2] ;
BRCA1 -> NBN [arrowhead = normal] ;
BRCA1 -> TP53 [color= LightGray] ;
IFI16 -> TP53 [arrowtail = normal] ;
PML -> TP53 [arrowtail = normal]
},
engine = neato, #dot, neato|twopi|circo|
width = 1200
"), file)
}
# browseURL(paste('file://',getwd(),"Reactomeplot.html", sep="/"))
## wait 1 sd before delete
# p1 <- proc.time()
# Sys.sleep(1)
# proc.time() - p1
## delete file
#,unlink(paste(getwd(),"DiagrammeRplot.html", sep="/"))
)
ui.R
downloadButton('Save_diagrammeR_plot', 'HTML')
from radiant.
Hi @ramnathv
Here are some links i mentioned
from radiant.
You could try https://github.com/rich-iannone/DiagrammeRsvg for convert a DiagrammeR plot to pdf or png. It requires V8 however and I don't want to add that dependency at this time. I added a function to the report feature so you can include diagrammer plots when you save the report to HTML. Looks like it will take some time before there is a convenient solution for this problem so I'll close this issue for now. Unless @ramnathv has suggestions?
https://github.com/vnijs/radiant/blob/master/inst/base/tools/app/report.R#L131-L177
from radiant.
Related Issues (20)
- Error: package ‘radiant’ is available as a source package but not as a binary HOT 3
- Geom_line color HOT 4
- lost the sync of my fork HOT 3
- Decision Tree: Issue with cost HOT 7
- Package ‘radiant’ was removed from the CRAN repository. HOT 8
- avoid MathJaxR dependency HOT 9
- Chi- Squared distribution Mean HOT 3
- Add URL param that would cause the session to NOT be saved HOT 1
- trouble loading radiant HOT 3
- logo HOT 4
- Dropdown variable list doesnt showup in the Visualize option HOT 1
- make my bar graphs have manually selected colors HOT 3
- r 3.4 HOT 23
- Download button doesn't work properly HOT 2
- Readme has git merge conflict markers HOT 2
- Command options not generating when added to report HOT 4
- Regression - Center Option HOT 4
- Training Variable: same seed, different outputs HOT 3
- simulater for poisson restrict lambda to integer; result is constant 0 for lambda in (0,1) HOT 1
- How to set directory for load the data? HOT 4
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 radiant.