[postgis-users] kmeans/natural breaks returns R_HOME error when called
David William Bitner
bitner at gyttja.org
Thu Oct 12 13:39:22 PDT 2006
I don't quite remember the details too much, but I think that you need to
have R_HOME declared at the time you start postmaster, so if you change
R_HOME, you need to restart postmaster as well.
David
On 10/12/06, Jeff Cavner <jcavner at edac.unm.edu> wrote:
>
> In a post for March 2006 David Bitner had a nifty SQL function using plr
> for natural breaks. I have successfully installed R and plr in postgress
> and created the function in my database but when called with select
> kmeans(array[1,1,1,1,4,3,5,6,45,3,5,7,8,6,4,3,2,1,32,6,7,5,6,7,8],4); to
> test it , it reports ERROR: environment variable R_HOME not defined
>
>
>
> I have noticed that when I run R from the command line I get the line
> ignoring the R_HOME variable. When installing plr, I had problems with the
> make file finding R.h. R.h lives in /usr/local/lib/R/include. But when I
> looked at the plr makefile I noticed it was concatenating an extra /include
> onto the path. So I set R_HOME using export R_HOME=/usr/local/lib/R (one
> directory up from the actual location of R.h) since running my sql call
> to the kmeans function I have changed R_HOME back to the actual location of
> R.h. No path setting for R_HOME seems to allow me to call the kmeans
> function. Each returns the same R_HOME error. Does any body know where
> R_HOME is actually supposed to be set,e.g. to the R.h, the .so, the
> /bin? And if anyone has had this problem why R_HOME works for the plr
> install but not the actual execution of the function kmeans?
>
>
>
> Jeff Cavner
>
> Earth Data Analysis Center
>
> University of New Mexico
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
>
--
************************************
David William Bitner
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061012/82a3d192/attachment.html>
More information about the postgis-users
mailing list