[R] Rlanguage plr and loadiing climatol package

David Potts dave.potts at pinan.co.uk
Sat Nov 20 21:25:16 CET 2010

Hi List

I am trying to call the R library function rosavent from the climatol
package via the plr interface package to the postgres database.

My code is a follows

create or replace function w_graph() returns text as
str <- pg.spi.exec("select
n,nne,ne,ene,e,ese,se,sse,s,ssw,sw,wsw,w,wnw,nw,nnw from wdata");
rosavent(str,4,4,ang=-3*pi/16,main="Annual windrose")


When invoked it gives the error

# select w_graph();
ERROR:  R interpreter expression evaluation error
DETAIL:  Error in PLR7843132 <- function() { : could not find function
CONTEXT:  In PL/R function w_graph

I assume this means it can not find the rosavent function from the
climatol package.

I have loaded the climatol package using the following syntax

I assume that the an R process created by the plr interface will load a
library, does any body know how I tell it to load it?

Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of the
Pinan Software

More information about the R-help mailing list