Wen Li,<div><br></div><div>Thanks for sending this back. This is undoubtedly something that we will have to understand better as we move forward. I would expect that it is mainly a matter of cleaning up the environment and setting paths/shared libraries correctly. Is your machine a windows box, or Linux, or Mac, or ...? The easiest trick we have found so far, is simply to include the correct R libraries in the directory with the executable. That is the first place that should be searched. I will post if we get a better solution.</div>
<div><br></div><div>- Wes<br><br><div class="gmail_quote">On Tue, Mar 1, 2011 at 8:39 AM, Li, Wen <span dir="ltr"><<a href="mailto:wen-li@uiowa.edu">wen-li@uiowa.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Wes,</span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p><p class="MsoNormal">
<span style="font-size:11.0pt;color:#1F497D">R_HOME was set correctly.</span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">We found out the reason but we don’t have a very good solution so far.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">It is because we have multiple versions of R installed in the operating system.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">When we ran R by vtk, it had trouble finding the correct lib path.</span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Now we are simply running it on a clean operating system and we don’t</span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">see the errors and any problem using functions like read.csv().</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">It will be very nice if someone can give a better solution.</span></p><p class="MsoNormal">
<span style="font-size:11.0pt;color:#1F497D"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Best,</span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Wen Li</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span style="font-size:10.0pt">From:</span></b><span style="font-size:10.0pt"> Wes Turner [mailto:<a href="mailto:wes.turner@kitware.com" target="_blank">wes.turner@kitware.com</a>] <br>
<b>Sent:</b> Monday, February 28, 2011 8:53 AM<br><b>To:</b> Li, Wen<br><b>Cc:</b> <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br><b>Subject:</b> Re: [vtkusers] can not find some function of R when use R integrated in vtk</span></p>
</div><div><div></div><div class="h5"><p class="MsoNormal"> </p><p class="MsoNormal" style="margin-bottom:12.0pt">Do you have the R_HOME variable set to the results of executing "R RHOME"?</p><div><p class="MsoNormal">
- Wes</p></div><div><p class="MsoNormal"> </p><div><p class="MsoNormal">On Fri, Feb 25, 2011 at 4:49 PM, Li, Wen <<a href="mailto:wen-li@uiowa.edu" target="_blank">wen-li@uiowa.edu</a>> wrote:</p><div><div><p class="MsoNormal">
Hi, all</p><p class="MsoNormal"> </p><p class="MsoNormal">We have been trying to use R in vtk to do some statistic analysis for surfaces.</p><p class="MsoNormal"> </p><p class="MsoNormal">The program was running perfectly when we simply used functions like “mean” and “sum” in our R script.</p>
<p class="MsoNormal"> </p><p class="MsoNormal">But when we try to use other functions like “read.csv()”, it complains that this function can not be found.</p><p class="MsoNormal"> </p><p class="MsoNormal">And we see the errors like,</p>
<p class="MsoNormal"> </p><p class="MsoNormal">--------------------------------------------------------------------------------------------</p><p class="MsoNormal">Error in identical(env, as.environment(i)) :</p><p class="MsoNormal">
5 arguments passed to .Internal(identical) which requires 2</p><p class="MsoNormal">Error in file(paste(tempdir(), "/Routput.txt", sep = ""), open = "wt+") :</p><p class="MsoNormal"> 5 arguments passed to .Internal(file) which requires 4</p>
<p class="MsoNormal">Error in identical(arg, choices) :</p><p class="MsoNormal"> 5 arguments passed to .Internal(identical) which requires 2</p><p class="MsoNormal">-----------------------------------------------------------------------------------------------</p>
<p class="MsoNormal"> </p><p class="MsoNormal">Any help or suggestion to solve this problem will be appreciated.</p><p class="MsoNormal"> </p><p class="MsoNormal">Thank you in advance.</p><p class="MsoNormal"> </p><p class="MsoNormal">
Wen Li</p><p class="MsoNormal">The University of Iowa</p></div></div><p class="MsoNormal" style="margin-bottom:12.0pt"><br>_______________________________________________<br>Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br><br>Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a></p></div><p class="MsoNormal"><br><br clear="all">
<br>
-- <br>Wesley D. Turner, Ph.D.<br>Kitware, Inc.<br>Technical Leader<br>28 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4920</p></div></div></div></div></div></blockquote></div><br><br clear="all"><br>
-- <br>
Wesley D. Turner, Ph.D.<br>Kitware, Inc.<br>Technical Leader<br>28 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4920<br>
</div>