Thursday, September 3, 2009

On using R with Labview

R is an open source statistics scripting and graphing tool I use quite a bit.

Labview is a very non-open source dataflow/visual programming language I use daily.

Thomas Baier and Erich Neuwirth wrote a Windows COM Server [R (D) Com] that exposes some R functionality. What little documentation there is is mainly focused on Excel/VB6- but there was a tantalizing note from someone named Paul Larsen very roughly describing how to use it with Labview. Last year sometime I had a few days free and puzzled it out and wrote some nice clear tools/examples. I think I wrote it in LV7.1 though it certainly works in newer versions (tested in LV8.6). Anyway, download here.

Examples include the basics like creating a chart or running a command with a text output-



All structured in a Labview-Logical manner, with functional sub-VIs:




Also included is some stuff for handling symbols (read: R variables) and some rudimentary and somewhat unsatisfactory ideas/examples of how to move your R dataframes around.

For those few of you who need to do this, I think you will find this very helpful.

Everyone else can take this of an example of the sort of thing I do all day.

No comments:

Post a Comment