2

I'm working on an android application which need to generate descriptive statistics ( mean, sd, min max, quartiles) and CDF / PDF histogram plots from local SQLite DB data.

R is very good with doing such statistical analysis and was wondering if it is possible to call R from Java in Android application ?

If it is not possible to call R from Java in Android , what would be a recommend approach ( package) for such statistical analysis in Android applications ?

Need to have this running w/o connectivity, so a server/cloud approach doesn't work.

5
  • What have you tried? "R" in the Android world has an entirely different meaning to what you are describing... there are many great (and free) graphing tools. Commented Jun 21, 2015 at 17:03
  • use a service approach like www.opencpu.org Commented Jun 21, 2015 at 17:23
  • @QuintinBalsdon - what do you mean by entirely different meaning ? What I'm looking for is a JRI like approach to call R from android code. Plotting is a different issue - I'm aware of charting libraries - sorry , the question is not about plotting, but using R from android application java code. Commented Jun 23, 2015 at 4:21
  • In Android, UI files are created in an XML file and precompiled into a file called R.java (R is for Resources) - and this is how developers can refer to XML UI elements from Java code. So any internet search for 'R' and Android is going to be difficult - can you provide the link to your R so we can see what it is? Commented Jun 23, 2015 at 8:04
  • This SO question should give an idea - R from within Java. Official R page is here - R: The R Project for Statistical Computing . In case R is not possible to be used in an android app or it doesn't make sense, what stat package is preferred to by used in android applications. Commented Jun 24, 2015 at 0:59

1 Answer 1

1

I am not sure if it's possible to run R exactly in android. But there is special project (server) - https://rforge.net/Rserve/

You run this server on special port and connect to this port with TCP from java code (it can be local machine or remote machine).

I think you can try to run R locally (have no idea how at this moment) on android device and connect to localhost from your code.

First link which I found in google - http://www.r-bloggers.com/install-r-in-android-via-gnuroot-no-root-required/ Never tried.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.