<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments for Joachim Van den Bogaert's Weblog</title>
	<atom:link href="http://joachimvandenbogaert.wordpress.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://joachimvandenbogaert.wordpress.com</link>
	<description>Development blog</description>
	<lastBuildDate>Fri, 11 Dec 2009 16:43:26 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on R and C# on Windows by GL</title>
		<link>http://joachimvandenbogaert.wordpress.com/2009/03/26/r-and-c-on-windows/#comment-51</link>
		<dc:creator>GL</dc:creator>
		<pubDate>Fri, 11 Dec 2009 16:43:26 +0000</pubDate>
		<guid isPermaLink="false">http://joachimvandenbogaert.wordpress.com/?p=53#comment-51</guid>
		<description>I&#039;m recieving the following error

Test method TestProject1.UnitTest1.Open_Close threw exception:  System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x80040013.

It seams that C# can&#039;t initialize R via the COM Interface. Do the C# binaries have to reside in the R path?</description>
		<content:encoded><![CDATA[<p>I&#8217;m recieving the following error</p>
<p>Test method TestProject1.UnitTest1.Open_Close threw exception:  System.Runtime.InteropServices.COMException: Exception from HRESULT: 0&#215;80040013.</p>
<p>It seams that C# can&#8217;t initialize R via the COM Interface. Do the C# binaries have to reside in the R path?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on R and C# on Windows by Matt P-H</title>
		<link>http://joachimvandenbogaert.wordpress.com/2009/03/26/r-and-c-on-windows/#comment-50</link>
		<dc:creator>Matt P-H</dc:creator>
		<pubDate>Thu, 10 Dec 2009 09:32:10 +0000</pubDate>
		<guid isPermaLink="false">http://joachimvandenbogaert.wordpress.com/?p=53#comment-50</guid>
		<description>Thanks for this code!

I am new to C# and wanted to utilise my R code. This will really help!!!</description>
		<content:encoded><![CDATA[<p>Thanks for this code!</p>
<p>I am new to C# and wanted to utilise my R code. This will really help!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on R and C# on Windows by rwillia2001</title>
		<link>http://joachimvandenbogaert.wordpress.com/2009/03/26/r-and-c-on-windows/#comment-49</link>
		<dc:creator>rwillia2001</dc:creator>
		<pubDate>Sat, 05 Dec 2009 20:16:45 +0000</pubDate>
		<guid isPermaLink="false">http://joachimvandenbogaert.wordpress.com/?p=53#comment-49</guid>
		<description>THANKS for the code! 

I needed to make a few changes but overall I would say that this is a nice demonstration of C# talking to R. Nice Histograms!

Here is my altered code (using a Main()) entry point.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;

//COM references
//using Interop.STATCONNECTORCLNTLib;
using StatConnectorCommonLib;
//using STATCONNECTORSRVLib;
using System.IO;
using Interop.STATCONNECTORSRVLib;


namespace RConnector.Tests.Integration
{

    //===============================================
    class MainEntryPoint
    {
        static void Main()
        { 
            TestConnectivityWithR.Open_Close();
            TestConnectivityWithR.Send_Receive_Data_();
            TestConnectivityWithR.Plot_CSharpInput_Simple();
            TestConnectivityWithR.Plot_CSharpInput_Simple_WithColors_Rainbow();
        }

    }

}
//=========================================================
   // [TestFixture]
    public class TestConnectivityWithR
    {

     //   [Test]
       
     public static void Open_Close()
        {
            Interop.STATCONNECTORSRVLib.StatConnectorClass RConnector = new Interop.STATCONNECTORSRVLib.StatConnectorClass();
            RConnector.Init(&quot;R&quot;);
            RConnector.Close();
            Console.ReadLine();
        }

      //  [Test]
      //      public static void Main()
        public static void Send_Receive_Data_()
        {
            Interop.STATCONNECTORSRVLib.StatConnectorClass RConnector = new Interop.STATCONNECTORSRVLib.StatConnectorClass();
            RConnector.Init(&quot;R&quot;); 
           // Data we are going to pass
            int n = 20;
            // Cast C# type to R type
            RConnector.SetSymbol(&quot;n1&quot;,n);
            // The cast value n to n1 is now being used in R
            RConnector.Evaluate(&quot;x1 &lt;- rnorm(n1)&quot;); 
            // We get back the value of x1, but it needs to be cast
            // to an array of doubles
            object o = RConnector.GetSymbol(&quot;x1&quot;);
            double[] random = (double[])o;
            foreach (double d in random)
            {
                Console.WriteLine(d);       
            }
            Console.ReadLine();
        }
     //   [Test]
        public static void Plot_CSharpInput_Simple()
        {
            Interop.STATCONNECTORSRVLib.StatConnectorClass RConnector = new Interop.STATCONNECTORSRVLib.StatConnectorClass();
            RConnector.Init(&quot;R&quot;);
            double[] input = new double[] { 1.0, 2.0, 3.0, 2.0, 1.0};
            RConnector.SetSymbol(&quot;input&quot;, input);
            RConnector.EvaluateNoReturn(&quot;hist(input)&quot;);
            RConnector.EvaluateNoReturn(
                &quot;savePlot(filename = \&quot;&quot; +
                @&quot;F:\\WEBSITE\\Plot_CSharpInput.eps&quot; + &quot;\&quot;, &quot; + 
                &quot;type = \&quot;eps\&quot;, device = dev.cur(), restoreConsole = TRUE )&quot;
            );
            Console.ReadLine();
           RConnector.Close();
        }
 
    //    [Test] 
       // public static void Main()
        public static void Plot_CSharpInput_Simple_WithColors_Rainbow()
        {
            Interop.STATCONNECTORSRVLib.StatConnectorClass RConnector = new Interop.STATCONNECTORSRVLib.StatConnectorClass();
            RConnector.Init(&quot;R&quot;);
            double[] input = new double[] {1.0, 2.0, 3.0, 2.0, 1.0};
            RConnector.SetSymbol(&quot;input&quot;, input);
            RConnector.EvaluateNoReturn(&quot;barplot(input, main=\&quot;Foobar\&quot;, xlab=\&quot;Value\&quot;, ylab=\&quot;Frequency\&quot;, col=rainbow(7))&quot;);
            RConnector.EvaluateNoReturn(&quot;legend(\&quot;topleft\&quot;, c(\&quot;Hello\&quot;, \&quot;World\&quot;), cex=0.6, bty=\&quot;n\&quot;, fill=rainbow(5))&quot;);
            RConnector.EvaluateNoReturn(
                &quot;savePlot(filename = \&quot;&quot; +
                @&quot;F:\\WEBSITE\\Plot_CSharpInput.eps&quot; + &quot;\&quot;, &quot; +
                &quot;type = \&quot;eps\&quot;, device = dev.cur(), restoreConsole = TRUE )&quot;);

            Console.ReadLine();
        RConnector.Close();
        }
        
    }</description>
		<content:encoded><![CDATA[<p>THANKS for the code! </p>
<p>I needed to make a few changes but overall I would say that this is a nice demonstration of C# talking to R. Nice Histograms!</p>
<p>Here is my altered code (using a Main()) entry point.<br />
using System;<br />
using System.Collections.Generic;<br />
using System.Linq;<br />
using System.Text;<br />
using NUnit.Framework;</p>
<p>//COM references<br />
//using Interop.STATCONNECTORCLNTLib;<br />
using StatConnectorCommonLib;<br />
//using STATCONNECTORSRVLib;<br />
using System.IO;<br />
using Interop.STATCONNECTORSRVLib;</p>
<p>namespace RConnector.Tests.Integration<br />
{</p>
<p>    //===============================================<br />
    class MainEntryPoint<br />
    {<br />
        static void Main()<br />
        {<br />
            TestConnectivityWithR.Open_Close();<br />
            TestConnectivityWithR.Send_Receive_Data_();<br />
            TestConnectivityWithR.Plot_CSharpInput_Simple();<br />
            TestConnectivityWithR.Plot_CSharpInput_Simple_WithColors_Rainbow();<br />
        }</p>
<p>    }</p>
<p>}<br />
//=========================================================<br />
   // [TestFixture]<br />
    public class TestConnectivityWithR<br />
    {</p>
<p>     //   [Test]</p>
<p>     public static void Open_Close()<br />
        {<br />
            Interop.STATCONNECTORSRVLib.StatConnectorClass RConnector = new Interop.STATCONNECTORSRVLib.StatConnectorClass();<br />
            RConnector.Init(&#8220;R&#8221;);<br />
            RConnector.Close();<br />
            Console.ReadLine();<br />
        }</p>
<p>      //  [Test]<br />
      //      public static void Main()<br />
        public static void Send_Receive_Data_()<br />
        {<br />
            Interop.STATCONNECTORSRVLib.StatConnectorClass RConnector = new Interop.STATCONNECTORSRVLib.StatConnectorClass();<br />
            RConnector.Init(&#8220;R&#8221;);<br />
           // Data we are going to pass<br />
            int n = 20;<br />
            // Cast C# type to R type<br />
            RConnector.SetSymbol(&#8220;n1&#8243;,n);<br />
            // The cast value n to n1 is now being used in R<br />
            RConnector.Evaluate(&#8220;x1 &lt;- rnorm(n1)&quot;);<br />
            // We get back the value of x1, but it needs to be cast<br />
            // to an array of doubles<br />
            object o = RConnector.GetSymbol(&quot;x1&quot;);<br />
            double[] random = (double[])o;<br />
            foreach (double d in random)<br />
            {<br />
                Console.WriteLine(d);<br />
            }<br />
            Console.ReadLine();<br />
        }<br />
     //   [Test]<br />
        public static void Plot_CSharpInput_Simple()<br />
        {<br />
            Interop.STATCONNECTORSRVLib.StatConnectorClass RConnector = new Interop.STATCONNECTORSRVLib.StatConnectorClass();<br />
            RConnector.Init(&quot;R&quot;);<br />
            double[] input = new double[] { 1.0, 2.0, 3.0, 2.0, 1.0};<br />
            RConnector.SetSymbol(&quot;input&quot;, input);<br />
            RConnector.EvaluateNoReturn(&quot;hist(input)&quot;);<br />
            RConnector.EvaluateNoReturn(<br />
                &quot;savePlot(filename = \&quot;&quot; +<br />
                @&quot;F:\\WEBSITE\\Plot_CSharpInput.eps&quot; + &quot;\&quot;, &quot; +<br />
                &quot;type = \&quot;eps\&quot;, device = dev.cur(), restoreConsole = TRUE )&quot;<br />
            );<br />
            Console.ReadLine();<br />
           RConnector.Close();<br />
        }</p>
<p>    //    [Test]<br />
       // public static void Main()<br />
        public static void Plot_CSharpInput_Simple_WithColors_Rainbow()<br />
        {<br />
            Interop.STATCONNECTORSRVLib.StatConnectorClass RConnector = new Interop.STATCONNECTORSRVLib.StatConnectorClass();<br />
            RConnector.Init(&quot;R&quot;);<br />
            double[] input = new double[] {1.0, 2.0, 3.0, 2.0, 1.0};<br />
            RConnector.SetSymbol(&quot;input&quot;, input);<br />
            RConnector.EvaluateNoReturn(&quot;barplot(input, main=\&quot;Foobar\&quot;, xlab=\&quot;Value\&quot;, ylab=\&quot;Frequency\&quot;, col=rainbow(7))&quot;);<br />
            RConnector.EvaluateNoReturn(&quot;legend(\&quot;topleft\&quot;, c(\&quot;Hello\&quot;, \&quot;World\&quot;), cex=0.6, bty=\&quot;n\&quot;, fill=rainbow(5))&quot;);<br />
            RConnector.EvaluateNoReturn(<br />
                &quot;savePlot(filename = \&quot;&quot; +<br />
                @&quot;F:\\WEBSITE\\Plot_CSharpInput.eps&quot; + &quot;\&quot;, &quot; +<br />
                &quot;type = \&quot;eps\&quot;, device = dev.cur(), restoreConsole = TRUE )&quot;);</p>
<p>            Console.ReadLine();<br />
        RConnector.Close();<br />
        }</p>
<p>    }</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on R and C# on Windows by sidharth</title>
		<link>http://joachimvandenbogaert.wordpress.com/2009/03/26/r-and-c-on-windows/#comment-48</link>
		<dc:creator>sidharth</dc:creator>
		<pubDate>Wed, 21 Oct 2009 07:52:42 +0000</pubDate>
		<guid isPermaLink="false">http://joachimvandenbogaert.wordpress.com/?p=53#comment-48</guid>
		<description>it still doesn&#039;t work. in fact the other link which u have provided at the top has some simpler examples and even they dont work. i work with c# in the command prompt. is there anyway i can do it ? the basic question i guess is that i am not being able to link the library files that u have mentioned as i am not being able to find them. the samples work fine as provided by the (D)COM but its the linking part which is creating problems. please do help me out as i am in an urgent need . thnx</description>
		<content:encoded><![CDATA[<p>it still doesn&#8217;t work. in fact the other link which u have provided at the top has some simpler examples and even they dont work. i work with c# in the command prompt. is there anyway i can do it ? the basic question i guess is that i am not being able to link the library files that u have mentioned as i am not being able to find them. the samples work fine as provided by the (D)COM but its the linking part which is creating problems. please do help me out as i am in an urgent need . thnx</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on R and C# on Windows by joachimvandenbogaert</title>
		<link>http://joachimvandenbogaert.wordpress.com/2009/03/26/r-and-c-on-windows/#comment-46</link>
		<dc:creator>joachimvandenbogaert</dc:creator>
		<pubDate>Thu, 24 Sep 2009 08:54:15 +0000</pubDate>
		<guid isPermaLink="false">http://joachimvandenbogaert.wordpress.com/?p=53#comment-46</guid>
		<description>The example here uses NUnit as a a testing framework. Are you sure you added a reference to the nunit.framework.dll? If not, download NUnit, install it and add a reference to the framework dll (you will also need this for the [TestFixture] and [Test] attributes). Please let me know if this is not the problem, the I wil look into it.</description>
		<content:encoded><![CDATA[<p>The example here uses NUnit as a a testing framework. Are you sure you added a reference to the nunit.framework.dll? If not, download NUnit, install it and add a reference to the framework dll (you will also need this for the [TestFixture] and [Test] attributes). Please let me know if this is not the problem, the I wil look into it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on R and C# on Windows by sidmaestro</title>
		<link>http://joachimvandenbogaert.wordpress.com/2009/03/26/r-and-c-on-windows/#comment-45</link>
		<dc:creator>sidmaestro</dc:creator>
		<pubDate>Wed, 23 Sep 2009 22:41:41 +0000</pubDate>
		<guid isPermaLink="false">http://joachimvandenbogaert.wordpress.com/?p=53#comment-45</guid>
		<description>hey its not coming together. i have downloaded .net SDK 2.0 and R version 2.9.2  . the server file is R_Scilab_DCOM3.0-1B5.exe. but then when i try to use the classes as u have used they dont compile in c# giving error 0246: the type or namespace cannot be found. are u missing a using directive or an assembly reference ?</description>
		<content:encoded><![CDATA[<p>hey its not coming together. i have downloaded .net SDK 2.0 and R version 2.9.2  . the server file is R_Scilab_DCOM3.0-1B5.exe. but then when i try to use the classes as u have used they dont compile in c# giving error 0246: the type or namespace cannot be found. are u missing a using directive or an assembly reference ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on R and C# on Windows by R Project for Statistical Computing + .net + BI - Joga&#39;s Blog</title>
		<link>http://joachimvandenbogaert.wordpress.com/2009/03/26/r-and-c-on-windows/#comment-44</link>
		<dc:creator>R Project for Statistical Computing + .net + BI - Joga&#39;s Blog</dc:creator>
		<pubDate>Sat, 01 Aug 2009 01:14:31 +0000</pubDate>
		<guid isPermaLink="false">http://joachimvandenbogaert.wordpress.com/?p=53#comment-44</guid>
		<description>[...] ya estas en algo con todo esto debes entrar a ejemplos mas avanzado -&gt; http://joachimvandenbogaert.wordpress.com/2009/03/26/r-and-c-on-windows/ [...]</description>
		<content:encoded><![CDATA[<p>[...] ya estas en algo con todo esto debes entrar a ejemplos mas avanzado -&gt; <a href="http://joachimvandenbogaert.wordpress.com/2009/03/26/r-and-c-on-windows/" rel="nofollow">http://joachimvandenbogaert.wordpress.com/2009/03/26/r-and-c-on-windows/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Integrating HunSpell into a C# application by Thomas MAierhofer</title>
		<link>http://joachimvandenbogaert.wordpress.com/2008/05/08/integrating-hunspell-into-a-c-application/#comment-40</link>
		<dc:creator>Thomas MAierhofer</dc:creator>
		<pubDate>Wed, 25 Feb 2009 15:18:33 +0000</pubDate>
		<guid isPermaLink="false">http://joachimvandenbogaert.wordpress.com/?p=4#comment-40</guid>
		<description>I&#039;ve released the first beta on
http://nhunspell.sourceforge.net
it deals with utf8, you can take a look at it.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve released the first beta on<br />
<a href="http://nhunspell.sourceforge.net" rel="nofollow">http://nhunspell.sourceforge.net</a><br />
it deals with utf8, you can take a look at it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Integrating HunSpell into a C# application by Thomas MAierhofer</title>
		<link>http://joachimvandenbogaert.wordpress.com/2008/05/08/integrating-hunspell-into-a-c-application/#comment-39</link>
		<dc:creator>Thomas MAierhofer</dc:creator>
		<pubDate>Sun, 22 Feb 2009 10:36:50 +0000</pubDate>
		<guid isPermaLink="false">http://joachimvandenbogaert.wordpress.com/?p=4#comment-39</guid>
		<description>I work on a x64 machine, so that don&#039;t help me much. I&#039;ve decided to port Hunspell and Hyphen with managed C++, and it works well on x64. Please take a look at the project on:

nhunspell.sourceforge.net

and tell me what i can do better or what you like. I know i don&#039;t deal with utf8 right at the moment. You can make some suggestions if you like.</description>
		<content:encoded><![CDATA[<p>I work on a x64 machine, so that don&#8217;t help me much. I&#8217;ve decided to port Hunspell and Hyphen with managed C++, and it works well on x64. Please take a look at the project on:</p>
<p>nhunspell.sourceforge.net</p>
<p>and tell me what i can do better or what you like. I know i don&#8217;t deal with utf8 right at the moment. You can make some suggestions if you like.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Unit testing private methods by khussein</title>
		<link>http://joachimvandenbogaert.wordpress.com/2008/04/28/unit-testing-private-methods/#comment-31</link>
		<dc:creator>khussein</dc:creator>
		<pubDate>Fri, 26 Sep 2008 07:52:05 +0000</pubDate>
		<guid isPermaLink="false">http://joachimvandenbogaert.wordpress.com/?p=3#comment-31</guid>
		<description>I personally think that testing private methods is as crucial as public ones. As for the enabling technology, I use Aspect Oriented Programming to access private methods. In fact, I summarized some of the existing workarounds and explained using AOP in a quick blog post
http://www.khussein.com/wordpress/?p=38

Please, share your thoughts!</description>
		<content:encoded><![CDATA[<p>I personally think that testing private methods is as crucial as public ones. As for the enabling technology, I use Aspect Oriented Programming to access private methods. In fact, I summarized some of the existing workarounds and explained using AOP in a quick blog post<br />
<a href="http://www.khussein.com/wordpress/?p=38" rel="nofollow">http://www.khussein.com/wordpress/?p=38</a></p>
<p>Please, share your thoughts!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
