[ESS] evaluation problem in ESS [Diagnosed]

Ross Boylan ross at biostat.ucsf.edu
Tue Sep 12 03:42:50 CEST 2006


On Mon, Sep 11, 2006 at 02:01:53PM -0700, Ross Boylan wrote:
> I have some code that runs OK outside of ESS, but inside I get
> Error in mspath(states ~ times, qmatrix, misc = SIMPLE, ematrix, inits,  : 
> 	object "SIMPLE" not found
> 

The symptoms were misleading; this was not an ESS problem.  I happened
to be running ESS in a directory that already had the function mspath
defined in the autoload data.  This old-style definition apparently
hid the newer one from the library I loaded.  The old one referenced
the misc argument directly (i.e., without substitute).  At that point
the lazy evaluation kicked in, and the fact that SIMPLE was undefined
became a problem.

Thanks to Rich Heiberger for a helpful hint off-list.

Ross Boylan



> The original line is like
> r <- mspath(states~times, qmatrix, misc=SIMPLE, ematrix,
>             inits, subject=c(rep(1,4), rep(23, 3)),
>             covariates = ~ cov1 + cov2,
> 	    [many more arguments])
> 
> and misc is an argument that the function plays games with via substitute:
>         if (as.character(substitute(misc)) == "SIMPLE")
> 
> Originally I was trying to pull this line in from another file (that
> is, outside of R session).  But even when I tried pasting the command
> into the R/ESS buffer and executing I got the error.
> 
> Is there a way around this?
> 
> Thanks.




More information about the ESS-help mailing list