<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>Darrel,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Hmm that would suggest you might have the R-path wrong. Those statements should all be pretty fast<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>As noted in article, <o:p></o:p></span></p><p class=MsoNormal>If you are running R version 2.12 or above on Windows, the R bin folder has changed. Instead of <em><span style='font-family:"Calibri",sans-serif'>bin</span></em> it's <em><span style='font-family:"Calibri",sans-serif'>bin\i386</span></em> or <em><span style='font-family:"Calibri",sans-serif'>bin\x64<o:p></o:p></span></em></p><p class=MsoNormal><em><span style='font-family:"Calibri",sans-serif'><o:p> </o:p></span></em></p><p class=MsoNormal><em><span style='font-family:"Calibri",sans-serif;font-style:normal'>Also you want to make sure you restart postgres service after setting the environment variables, since it doesn't take effect until relaunch.<o:p></o:p></span></em></p><p class=MsoNormal><em><span style='font-family:"Calibri",sans-serif;font-style:normal'><o:p> </o:p></span></em></p><p class=MsoNormal><em><span style='font-family:"Calibri",sans-serif;font-style:normal'>Which version of R are you running? I'm running R 3.2.2 x64 with PostgreSQL 9.4.5, compiled by Visual C++ build 1800, 64-bit and plr 8.3.0.16<o:p></o:p></span></em></p><p class=MsoNormal><em><span style='font-family:"Calibri",sans-serif;font-style:normal'> It's possible things have changed since I installed, but all those commands work pretty fast on my database.<o:p></o:p></span></em></p><p class=MsoNormal><em><span style='font-family:"Calibri",sans-serif;font-style:normal'><o:p> </o:p></span></em></p><p class=MsoNormal><em><span style='font-family:"Calibri",sans-serif;font-style:normal'><o:p> </o:p></span></em></p><p class=MsoNormal><em><span style='font-family:"Calibri",sans-serif;font-style:normal'>Thanks,<o:p></o:p></span></em></p><p class=MsoNormal><em><span style='font-family:"Calibri",sans-serif;font-style:normal'>Regina<o:p></o:p></span></em></p><p class=MsoNormal><em><span style='font-family:"Calibri",sans-serif;font-style:normal'><a href="http://www.postgis.us">http://www.postgis.us</a><o:p></o:p></span></em></p><p class=MsoNormal><em><span style='font-family:"Calibri",sans-serif;font-style:normal'><a href="http://postgis.net">http://postgis.net</a><o:p></o:p></span></em></p><p class=MsoNormal><em><span style='font-family:"Calibri",sans-serif;font-style:normal'><o:p> </o:p></span></em></p><p class=MsoNormal><em><span style='font-family:"Calibri",sans-serif;font-style:normal'><o:p> </o:p></span></em></p><p class=MsoNormal><em><span style='font-family:"Calibri",sans-serif;font-style:normal'><o:p> </o:p></span></em></p><p class=MsoNormal><em><span style='font-family:"Calibri",sans-serif'><o:p> </o:p></span></em></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='margin-left:.5in'><b>From:</b> postgis-users [mailto:postgis-users-bounces@lists.osgeo.org] <b>On Behalf Of </b>Darrel Maddy<br><b>Sent:</b> Sunday, November 08, 2015 10:23 AM<br><b>To:</b> PostGIS Users Discussion <postgis-users@lists.osgeo.org><br><b>Subject:</b> [postgis-users] New day, new problem - now with pl/r<o:p></o:p></p></div></div><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p><p class=MsoNormal style='margin-left:.5in'><span lang=EN-GB>Dear all,<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span lang=EN-GB>Not sure if this is the right place to ask this but…<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span lang=EN-GB>I have just installed the plr extension using the instructions given here:<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span lang=EN-GB><a href="http://www.bostongis.com/PrinterFriendly.aspx?content_name=postgresql_plr_tut01">http://www.bostongis.com/PrinterFriendly.aspx?content_name=postgresql_plr_tut01</a><o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span lang=EN-GB>Setting both the path and R_Home variables.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span lang=EN-GB>The extension shows up in PGAdmin for this database.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span lang=EN-GB>I tried to check the installation using the suggested commands<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span lang=EN-GB style='font-size:9.0pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB'>SELECT * FROM plr_environ();<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span lang=EN-GB style='font-size:9.0pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB'>SELECT load_r_typenames();<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span lang=EN-GB style='font-size:9.0pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB'>SELECT * FROM r_typenames();<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span lang=EN-GB style='font-size:9.0pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB'>SELECT plr_array_accum('{23,35}', 42);<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span lang=EN-GB>The first of these runs but the second command seems to go into an endless loop (I stopped this after one hour- I assume it should not take that long?). I assume the failure to finish means there is a problem seeing the r typenames? As it does not fall over there is no error message to help. <o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span lang=EN-GB>I am open to any suggestions how to proceed.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span lang=EN-GB>Darrel<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span lang=EN-GB><o:p> </o:p></span></p></div></body></html>