On 11/20/2010 12:55 PM, David Winsemius wrote: > On Nov 20, 2010, at 3:25 PM, David Potts wrote: >> I am trying to call the R library function rosavent from the climatol >> package via the plr interface package to the postgres database.
>> # select w_graph(); >> ERROR: R interpreter expression evaluation error >> DETAIL: Error in PLR7843132 <- function() { : could not find function >> "rosavent" >> 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 >> install.packages("climatol",lib="/home/dfuncs/r-lang/my-rlib") > I'm not sure if not having loaded climatol is the source of your > problem, but if it is, you have forgotten to load the package after > installing it. Perhaps: > > require(climatol) # before the pdf(...) call That would be needed for sure. >> 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? The R interpreter works just like the command line one in that respect -- load the needed library in one of the usual ways from within the R function if you want to use it. > This page: > http://www.varlena.com/GeneralBits/Tidbits/bernier/art13mar04/graphingWithR.html > > makes me thing that PL/R passes r code pg.spi.exec (... calls. Does it > matter that the illustration on that page uses str<<- pg.spi.exec ( > rahter than str<- ? <<- puts the variable in the global environment so that it is preserved across PL/R calls to the R interpreter. > (This would seem to be the wrong place to be asking these questions. > There are websites set up to mediate conversations between PL/R users.) Correct. Please see: http://www.joeconway.com/plr/ http://pgfoundry.org/mail/?group_id=1000247 HTH, Joe -- Joe Conway credativ LLC: http://www.credativ.us Linux, PostgreSQL, and general Open Source Training, Service, Consulting, & 24x7 Support
signature.asc
Description: OpenPGP digital signature
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.