Share My Creation Number Cruncher and Statistical Package Integrator

icon.png

The principle behind this app is that "time is money". I have worked most of my life as a research scientist and consultant, and I can say that I have wasted a huge amount of time ($) because of poor software and data management tools.

It is not so much that the tools don't work, they do. However, they are quirky, require special knowledge, and were designed when computer resources were highly constrained by speed and memory. Statistical packages that matured from script-driven to graphical user interfaces are helpful, but the best are expensive and most require the datasets to be perfect and in a special format. How often have we reported results only to discover that missing or miss-typed data made those result erroneous?

Since retiring I have time ($ not so much) on my hands. Experimenting with B4J, I wrote NCrunchR, a 2800 line program for crunching numbers. For heavy lifting it shells to 'R', but is quite capable of doing univariate and bivariate analysis on its own. As a bonus, I added a front end that calls PSPP-convert to turn SPSS .sav files into .txt files, so that old datasets are handled seamlessly.

In the interest of efficiency, NCrunchR uses a lot of special features of B4X: maps for frequency counts, B4XEval for user-defined computations, smart strings everywhere, and the 'wait for' construct for asynchronous calls. But what makes this project feasible is the jPOI library. By showing the resulting tables in an Excel workbook, nicely arranged in sheets (univariate, bivariate, multivariate, the transformed dataset), the results can be further processed by Excel (charts for example) and/or copied to other Microsoft Office tools for your reports and presentations. All done without me trying to format nice looking tables.

That's it really. For the adventurous, the source code shows lots of techniques for doing things (for example testing to see if the Excel workbook is already in use). I don't intent to market the app and I am not very interested in modifying or improving it on request, but others are free to do so - please credit the creative work. I will use it as is when I need it, and extend it when it becomes necessary. I disclaim responsibility for how others use 'NCrunchR'.

Unzip the NCR1 folder.

It won't run until you have installed the "R" statistical package for windows.
A path to R.exe is needed, put it in the ..\Objects\RInvoke folder in a text file named RPath.txt
For example: C:\Program Files\R\R-3.5.1\bin\R.exe

To enable the App to convert SPSS .sav files, you'll need to install PPSP for Windows, and copy 4 files from C:\Program Files\PSPP\bin to the \Objects\convert folder:
PSPP-convert.exe, libiconv-2.dll, libintl-8.dll, zlib1.dll

You'll also need Excel (I have tested this App with Microsoft Office for Home and Student 2016).

This is a big project and there are Library dependencies: jCore, jFX, JavaObject, jPOI, jShell, and B4XEval (Search and you shall find!)

Detailed description and complete instructions for installation are given in NCrunchR.docx in the ..\Objects folder

An example of the Excel output is shown in "..\Objects\workbooks\judges.xlsx"

An example of the transformation script is shown in "..\Objects\transformations\student_commute_transforms.txt"

I didn't include an executable .jar file, since it is easily generated by running the source in release mode, afterwards you'll find it in the Objects folder.

I will certainly help interested community members get started.
snap1.png snap2.png snap3.png snap4.png
 

Attachments

  • NCR1.zip
    182.2 KB · Views: 500
Top