Dear R-user I used lme to fit a linear mixed model inlcuding weights=varPower(). Additionally I wanted to use glht to calculate Tukey-Kramer multiple comparision. error: > glht(modelF, linfct=mcp(Species="Tukey")) Error in glht.matrix(model = list(modelStruct = list(reStruct = list(SubPlot = -0.305856275920955, : ?ncol(linfct)? is not equal to ?length(coef(model))? > glht(modelF, linfct=mcp(Diversity="Tukey")) Error in mcp2matrix(model, linfct = linfct) : Variable(s) ?Diversity? of class ?integer? is/are not contained as a factor in ?model?. Does anyone know, if glht does not function using weights/interactions in lme? Thanks Sibylle LME MODEL > Kaltenborn<-read.table("Kaltenborn_YEARS.txt", na.strings="*", header=TRUE) > library(nlme) > modelF<-lme(asin(sqrt(PropMortality))~Diversity+Management+Species +Height+Year+Diversity*Year, data=Kaltenborn, random=~1|Plot/SubPlot, na.action=na.omit, weights=varPower(form=~Diversity), subset=Kaltenborn $ADDspecies!=1, method="REML") > anova(modelF, type="marginal") numDF denDF F-value p-value (Intercept) 1 162 7.12789 0.0084 Diversity 1 14 12.89284 0.0030 Management 2 30 5.52544 0.0091 Species 3 162 41.81003 <.0001 Height 1 162 2.59134 0.1094 Year 1 162 7.07660 0.0086 Diversity:Year 1 162 12.88095 0.0004 >
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"); pdf("/tmp/foobar.pdf"); rosavent(str,4,4,ang=-3*pi/16,main="Annual windrose") dev.off(); print("Done"); ' LANGUAGE plr; When invoked it gives the error # 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 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? xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 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