From simon.urbanek at r-project.org  Sun Oct 11 16:21:44 2009
From: simon.urbanek at r-project.org (Simon Urbanek)
Date: Sun, 11 Oct 2009 10:21:44 -0400
Subject: [Rd] R on Google Android
In-Reply-To: <3796c6d50910110338u2850b2e6o60fbc2563a8656d6@mail.gmail.com>
References: <3796c6d50910110338u2850b2e6o60fbc2563a8656d6@mail.gmail.com>
Message-ID: <31368253-0C31-4C02-B9B4-6570261D3437@r-project.org>

Mikkel,

On Oct 11, 2009, at 6:38 AM, Mikkel Meyer Andersen wrote:

> As a follow-up on [1], I'd like to raise the question of whether it's
> practically possible to compile R to the Google Android mobile
> platform?
>
> The best way would probably be to use the Native Developer Kit [2],
> NDK, and in that way get a library. This could then be interfaced to
> by a Java-program.
>
> I know that several questions have been raised against the idea, e.g.
> with the input methods and all that, but I wouldn't be that hard to
> make an alternative input method or even a new language that could be
> compiled to R.
>
> The reason I'm raising this question again, is that I would really
> want a (basic) statistical package on my mobile phone, and I think it
> would be kind of stupid to start writing one from scratch when R is
> already out there.
>

Get an iPhone ;), you can compile R for iPhone OS almost out of the box.

But seriously, the NDK seems to be ARM as well (like the iPhone) so  
chances are that is may work in a similar fashion. According to the  
NDK docs it includes JNI so you should be able to use rJava/JRI to  
embed R (see the JGR project for an example of a GUI using the  
"normal" Java). [I didn't actually try it so your mileage may vary].


> Unfortunately I don't know that much about build systems and are not
> capable of assesing whether it indeed would be possible to port R to
> Android through NDK. I know a bit of both R, Java, and C and would be
> able to help trying some different approaches, if anybody wants to
> help me.
>
> The alternative is to start writing a new mobile statistical package
> from the beginning. And although it should only maybe support 5% of
> the functionality of R, it would take a lot of time to do that. And
> I'd love to avoid that when good people has already done an amazing
> job :-).
>

People have proposed that and tried that long time ago, but I don't  
think anyone succeeded.

Cheers,
Simon


> Cheers, Mikkel Meyer Andersen.
>
> [1]: http://finzi.psych.upenn.edu/Rhelp08/2009-February/187425.html
> [2]: http://developer.android.com/sdk/ndk/1.5_r1/index.html
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>



[Rd] R on Google Android
Simon Urbanek