[Rd] R on Google Android
simon.urbanek at r-project.org
Mon Oct 12 04:38:28 CEST 2009
On Oct 11, 2009, at 9:17 PM, Mikkel Meyer Andersen wrote:
> Thanks for your answer.
> Do you have a link describing the procedure on compiling for iPhone
> or is it really just ready out of the box?
You can compile R itself (libR) out of the box just using regular
cross-compilation. The only issue are packages with native libraries -
the easiest way is to create a multi-arch R so that the non-libs parts
are actually built on the native architecture. For anything
troublesome your can then also use R --arch=arm CMD SHLIB. This is
really more a proof of concept since you're still missing a command
line as there is no shell or ssh or normal iPhones but you could hook
it into any GUI ..
Of course as my old post on R-SIG-Mac on the topic says we don't have
plans to use UIKit, but that's probably not that relevant for you
> A description would help me
> trying to do it with Android. I've done some searching, but the only
> relevant hit I've found is
> Cheers, Mikkel.
> 2009/10/12 Simon Urbanek <simon.urbanek at r-project.org>:
>> On Oct 11, 2009, at 6:38 AM, Mikkel Meyer Andersen wrote:
>>> As a follow-up on , I'd like to raise the question of whether
>>> practically possible to compile R to the Google Android mobile
>>> The best way would probably be to use the Native Developer Kit ,
>>> 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,
>>> 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
>>> 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
>>> 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
>> But seriously, the NDK seems to be ARM as well (like the iPhone) so
>> 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
>> 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
>>> 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
>> anyone succeeded.
>>> Cheers, Mikkel Meyer Andersen.
>>> : http://finzi.psych.upenn.edu/Rhelp08/2009-February/187425.html
>>> : http://developer.android.com/sdk/ndk/1.5_r1/index.html
>>> R-devel at r-project.org mailing list
More information about the R-devel