none
GUI for "R" in VB.NET? RRS feed

  • Question

  • Hello all,

    i have a question:

    if i've written a script in "R" Language (a language for statistical analysis), can i make a GUI for it in Visual Basic .NET 2010?

    Sunday, October 16, 2011 9:22 PM

Answers

  • If your script uses command line arguments (either data, or a filename), you can create a VB .Net application with a GUI interface that executes the R script.  If the script produces output to STDOUT then there are procedures available to return that output to your application.

    Process Class:
    http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx

    StartInfo property (Controls the process execution and interaction)
    http://msdn.microsoft.com/en-us/library/system.diagnostics.process.startinfo.aspx

    Or, you can use VB .Net to create a batch file (a plain text file) that contains the comamnds needed to execute the R script, and your application can then execute the batch file.  This would probably require that the R script sends its output to a file, and your application then opens and reads that file.

    • Marked as answer by N1h1l1sT Monday, October 17, 2011 8:21 AM
    Sunday, October 16, 2011 9:58 PM
  • On 10/16/2011 5:22 PM, N1h1l1sT wrote:
    > Hello all,
    >
    > i have a question:
    >
    > if i've written a script in "R" Language (a language for statistical
    > analysis), can i make a GUI for it in Visual Basic .NET 2010?
    >
     
    You may find a VB.NET example. But anything in C#.NET you can do in
    VB.Net too. The key I think would be how do you convert the data coming
    from "R" into a primitive type data used by .NET like string, int,
    double, decimal etc, etc to be used by a .NET GUI.
     
     
    • Marked as answer by N1h1l1sT Monday, October 17, 2011 8:21 AM
    Sunday, October 16, 2011 9:59 PM

All replies

  • If your script uses command line arguments (either data, or a filename), you can create a VB .Net application with a GUI interface that executes the R script.  If the script produces output to STDOUT then there are procedures available to return that output to your application.

    Process Class:
    http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx

    StartInfo property (Controls the process execution and interaction)
    http://msdn.microsoft.com/en-us/library/system.diagnostics.process.startinfo.aspx

    Or, you can use VB .Net to create a batch file (a plain text file) that contains the comamnds needed to execute the R script, and your application can then execute the batch file.  This would probably require that the R script sends its output to a file, and your application then opens and reads that file.

    • Marked as answer by N1h1l1sT Monday, October 17, 2011 8:21 AM
    Sunday, October 16, 2011 9:58 PM
  • On 10/16/2011 5:22 PM, N1h1l1sT wrote:
    > Hello all,
    >
    > i have a question:
    >
    > if i've written a script in "R" Language (a language for statistical
    > analysis), can i make a GUI for it in Visual Basic .NET 2010?
    >
     
    You may find a VB.NET example. But anything in C#.NET you can do in
    VB.Net too. The key I think would be how do you convert the data coming
    from "R" into a primitive type data used by .NET like string, int,
    double, decimal etc, etc to be used by a .NET GUI.
     
     
    • Marked as answer by N1h1l1sT Monday, October 17, 2011 8:21 AM
    Sunday, October 16, 2011 9:59 PM
  • thank you both for your contribution.

     

    i'll try both your ways and if i have any further question, i'll post back.

    if someone finds anyther way still, plz post that as well

    Monday, October 17, 2011 8:22 AM