Blog coding and discussion of coding about JavaScript, PHP, CGI, general web building etc.

Tuesday, August 9, 2016

Linked brushing possible in R

Linked brushing possible in R


I saw this just yesterday but it's for matplotlib which, as far as I know, is Python only. This functionality that would be stupendously useful for my work.

Is anything similar available for R? I've looked around and the closest I've seen mentioned is iPlots/Acinonyx, but the websites for those are a few years out of date. Do those packages work reasonably well? I've not seen any examples of their use.

Alternatively, does mpld3/matplotlib/python play well with R? By that I mean, could I load my dataframes in R, use mpld3/matplotlib/python for exploring my data, then making up final/pretty plots in R?

Full disclosure: I'm a newbie (R is the first programming language that I've really tried to learn since QBASIC as a child...).

Answer by mwaskom for Linked brushing possible in R


The R package ggvis will have similar functionality. It is still in relatively early development, as version 0.1 was just tagged a few days ago. (Although that's also true of mpld3).

To answer your second question, yes they work reasonably well together. The easiest way to do what you suggested would use the R magic function in the IPython notebook.

Answer by jakevdp for Linked brushing possible in R


While R doesn't seem to have anything quite like this yet, I want to note that mpld3 now has a well-defined JSON layout for figure representations, in some ways similar to Vega (but at a much lower level). I'm not an R/ggplot user, but it seems like the ggvis ggplot-to-vega approach could be rather easily adapted to convert from ggplot to mpld3.

Answer by user1906832 for Linked brushing possible in R


I've forgotten how to do linked plots with brushing in R, but I know the capability is there. I use GGobi for that, however - http://ggobi.org/. It's designed for exploratory data analysis using visualizations, and there are R packages to communicate with it and script it.

There's a pretty good book on GGobi - Interactive and Dynamic Graphics for Data Analysis: With R and GGobi.

Answer by lomereiter for Linked brushing possible in R


Also take a look at http://cranvas.org/ - it might be somewhat hard to install (especially for a newbie) but it's well worth the effort.

Answer by karl for Linked brushing possible in R


The package JGR provides a java interface for R. From here, you can call the library iplots. In your R terminal, type

install.packages("JGR");  library(JGR);  JGR()  

This will open a new window that you can use just like the standard R terminal.
You should now be able to brush using iplots:

X = matrix(rnorm(900), ncol = 3);  iplot(X[,1], X[,2]);  iplot(X[,1], X[,3]);  ihist(X[,1])  


Fatal error: Call to a member function getElementsByTagName() on a non-object in D:\XAMPP INSTALLASTION\xampp\htdocs\endunpratama9i\www-stackoverflow-info-proses.php on line 72

0 comments:

Post a Comment

Popular Posts

Powered by Blogger.