[R] packages masking other objects

Gabor Grothendieck ggrothendieck at myway.com
Tue Mar 1 03:21:28 CET 2005


James Smith <james.smith <at> cdu.edu.au> writes:

: 
: hello all, 
: 
: I am trying to use the function getCovariateFormula(nlme) in conjunction 
with the library lme4. When I
: load both packages I get the following message and the getCovariateFormula 
function no longer works:
: 
: library(nlme)
: library(lme4)
: 
: Attaching package 'lme4':
: 
:         The following object(s) are masked from package:nlme :
: 
:          contr.SAS getCovariateFormula getResponseFormula groupedData 
lmeControl 
: 
: I have tried removing the package after using it, with:
: detach(package:lme4)
: library(nlme)
: 
: but I still get an error message when I try to use getCovariateFormula. The 
line I use it in, and the error
: message is below:
: 
: rownames(table)<-c((getCovariateFormula(model1)),(getCovariateFormula
(model2)),(getCovariateFormula(model3)),(getCovariateFormula(model4)),
(getCovariateFormula(model5)),(getCovariateFormula(model6)),
(getCovariateFormula(modelnull)))
: 
: Error in switch(mode(x), "NULL" = structure(NULL, class = "formula"),  : 
:         invalid formula
: 
: This line works fine when I run models with different structures that are 
not in the lme4 package.
: Does anyone have any suggestions about this ?
: Am I not removing the package completely ?
: 

Check out:

?"::"




More information about the R-help mailing list