How to show an iplot without opening an additional window into r shiny - r

I'm trying to build interactive graphs in my shiny app. The user should be able to click on bars and see where the cases are displayed in another graph for example like a scatterplot next to the barplot.
There are different r packages, that are doing a great job: iplot, rggobi, acinonyx. I also found qtlcharts, but it does not exactly what I wanted. The problem is, I can't figure out, how to integrate different iplots into my shiny app boxes. Is there any way preventing iplots from opening separate windows for the graphs?
In acinonyx you can say window=FALSE, which prevents opening the java window of the graph. But the graph isn't displayed in the box as well. You could add/move the iplot into icontainer, iVisual or iWindow, but none of them can be integrated into the shiny boxes in the ui without printing the error: unsupported data frame or doing nothing at all.

I found the answer to my question: building reactive ggplots in shiny and adding coloured layers to one plot if the other plot is clicked will do the job.

Related

How to implement interactive graph from plotly in overleaf?

I want to implement interactive graph from plotly in overleaf. However, overleaf removed the communication with plotly in the V2 version. Is it still possible somehow to implement interactive graph in overleaf and therefore in pdf?
I want to hide/unhide line, zoom in and see value of different points when clicking on it.
I saw this question a couple times before, but the answere was only to zoom in or use javascript and implementing different picture on top of eachother.
However, this is not what i am looking for. I am looking for a really interactive in PDF. Does somebody know how this is possible?

Interactive plots on local .html via .rmd or Shiny

I'm trying to build a .html file via RStudio in to have following function(simplified).
plot1:a simple time series plot of $y_t$, where user can manually pull/drag each dot to change it's values a each time point.
plot2:a time series dependent on $y_t$, such as $f(y_t)=2*y_t+1$, once the value in plot1 changed, the plot2 will also change accordingly.
I want the .html self contained, not cloud based. I'm thinking of plotly, shininy/knitr, but I'm not sure if I'm in the direction or how to connect the dots. Hope anyone can point me to the right direction.
A self-contained/client-side html report sounds well-suited for flexdashboard. It's based on R Markdown, and therefore can accommodate Shiny elements.
I don't know if you can modify values with a mouse, but you can certainly modify values with sliders and other inputs, as well as have a second plot react to a first plot.
You may see some more possibilities in the gallery.

How to show a plot in a tooltip with Shiny

I'm building a Shiny app using ggvis, and I need to show a plot (a bar chart, for example) in a tooltip.
So basically, when a user clicks one of the points in the main plot I want a tooltip (or something of the sort) to display a new plot with extra information.
Is it possible to do this with Shiny?
The shiny demo at: http://shiny.rstudio.com/gallery/plot-interaction-selecting-points.html shows code where clicking on (or near) a point produces text output, you could modify that to create the second graph instead. I don't know how to do it like a tool tip, but this would produce the graph next to, or just below the graph being clicked on. The example uses ggplot2 rather than ggvis, so I don't know how that would change things.

Does nearPoints() and brushedPoints() functions in Shiny work on bar-graphs?

I am trying to use nearPoints() function in Shiny with bar-graphs(both basic and ggplot packages). But when the page is rendered, none of the click, dbclick, hover are not working with the bar-graphs.
My aim is to show either a dataTable or verbatimTextOutput (containing the rows of the clicked bar) when a bar on the bar-graph is clicked. I can do the above mentioned operations on a scattered plot but not on a bar graph.
The examples mentioned in the Shiny documentation page only showed the scattered plots examples. I just want to know if the nearPoints() and brushedPoints() (similar function for a range on the plot) functions work with bar-graphs or not ?
Winston Chang replied to the question in Shiny Apps discussion forum on Google groups. I am posting it here for future references. Here is the link

How can I build Shiny applications with Animation in R?

I am trying to build a shiny app to build interactive animations with R. I currently have a function that can build gifs/other output options using the Animation package(http://cran.r-project.org/package=animation) that loops through a series of ggplots(by date). And also a shiny app that can show a single ggplot based on the selected date.I want to build a shiny app that refreshes an animation based on a selected date range.
Are there examples of code that uses maybe saveHTML with UIoutput in Shiny? Would this be possible?
reset animation in Shiny R Studio shows someone trying to build an animation within Shiny. https://gist.github.com/yihui/5899181 is example of integrating a saveGIF function into a shiny app, but that is through a download.
Alternative suggestions/packages I could look at to approach this problem in R not necessarily using Animation and/or Shiny would also be appreciated.
I suggest using the googleVis package --> the tool, gvisMotionchart. It's really simple to work with, just make sure your data is numeric or time oriented in some way and also have some character/categorical variable to plot as circles. Best of all is that all animation tools are ALREADY included inside the motion chart.
If you want details how to create this, here is a model example of how to detailed in this thread.
Chart not generated in R shiny when run locally using googleVis
Here's a screenshot of an example of one I've created to visualize chess data.
googlevis example

Resources