Hi Harsh,
If your project is so specific on the regression model, my suggestion
is to use tcl/tk or Gtk2 interface instead of FLEX, because your
requirement on interaction is simple (e.g. you don't need to
drag-and-drop points).
I think the example 'run.cor2.examp()' in 'TeachingDemos'
package can
give you enough inspiration.
Or if you want to do the job (to change the slope) automatically, you
may want to see the example in the 'animation' package:
##
install.packages("animation")
library(animation)
# default animation in R: with slope changing
least.squares()
# animation in an HTML page
oopt = ani.options(ani.height = 450, ani.width = 600,
outdir = tempdir(), nmax = 50, title = "Demonstration of Least
Squares",
description = "We want to find an estimate for the slope
in 50 candidate slopes, so we just compute the RSS one by one. ")
ani.start()
par(mar = c(4, 4, 0.5, 0.1), mgp = c(2, 0.5, 0), tcl = -0.3)
least.squares()
ani.stop()
ani.options(oopt)
##
P. S. I'm quite interested in interactive visualization using R and
Flash (you may also want to know Flare and SWF Tools!), so please let
me know if there's any progress in your project.
Regards,
Yihui
--
Yihui Xie <xieyihui at gmail.com>
Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086
Mobile: +86-15810805877
Homepage: http://www.yihui.name
School of Statistics, Room 1037, Mingde Main Building,
Renmin University of China, Beijing, 100872, China
On Thu, Apr 30, 2009 at 2:54 AM, Harsh <singhalblr at gmail.com>
wrote:> Hi useRs,
>
> I had posted about Adobe FLEX talking to R for rich visualisation.
> Reply from Jeffery Horner contained links to the
> revolution-computing.com webpage which had information pertaining to
> the Bay Users R group Meetup on Web Dashboards with R.
>
> I have a very specific project that I need to implement.
> I wish to use the graphics capabilities provided by Adobe FLEX to
> visualise outputs from R.
> For example:
> I would like to fit a regression model to a dataset in R and provide a
> FLEX interface wherein, a user may manipulate a slider which would
> increase or decrease
> a parameter estimate (between the confidence intervals of the
> estimate) of a variable to see the effect on the predicted values.
>
> I necessarily have to use FLEX for the interface.
> In trying to make sense of how to go about this task, I have
> speculated on the following technologies:
> 1) Using RSOAP which requires a Python client. I am not sure how I can
> implement this in Flex.
> 2) Using RSOAP provided by the Biocep project. This is a java
> implementation and maybe this would suit my requirements.
> 3) The StatDataML package in R provides the creation of xml files of R
> objects. Maybe I can use these XML files as encapsulators of R object
> data and pass it on to FLEX.
> 4) Since R has interfaces that connect to most SQL database servers, I
> can convert results of lm objects (summary(lmobject)) to data frames
> and push them into the SQL database. FLEX can
> then read the table and extract the relevant fields for output.
>
> I am aware that I not a computer programmer which is why I may not be
> making a whole lot of sense in describing the above scenarios, but I
> am trying to gain as much information and programming skills to
> 'decipher'
> the secret behind using FLEX and R.
>
> I have looked at Jeffery Horner's ?BBPLOT project
> (http://data.vanderbilt.edu/rapache/bbplot) and honestly I'm amazed.
> Replicating this with a FLEX interface is the closest I can get in
> describing my requirements.
>
> Any information/technical sources/tutorials etc in this regard will be
> much appreciated.
>
> Thank you for your time.
>
> Regards
> Harsh Singhal
> Decision Systems
> Mu Sigma Inc.
> Chicago, IL
>