[S] Memory frame question

Robert Key (key@geo.princeton.edu)
Thu, 5 Nov 1998 13:54:24 -0500


The following few lines are taken from a function I have:

.
.
.
if(hmethod=="loess")
{
if(is.null(er)|(length(glon)<20&er<.65))er_.75
datfr_data.frame(cbind(x=glon,y=glat,z=gz))
attach(datfr)
fit_loess(z~x*y,span=er,degree=forder,family=family,data=datfr)
if(errmap)
{
predsurf_predict(fit,datgrid,se.fit=T)
surf_predsurf$fit
surferr_predsurf$se.fit
surf[!inside]_NA
surferr[!inside]_NA
surf_list(x=xo,y=yo,z=surf,zerr=surferr)
}
else
{
surf_predict(fit,datgrid)
surf[!inside]_NA
surf_list(x=xo,y=yo,z=surf)
}
detach(2)
}
.
.
.

If errmap==F then all is ok. If errmap==T then the function:
predict(fit,datgrid,se.fit=T)
fails, complaining that it can't find the data frame "datfr". My guess is that
this is a memory frame problem (which I've read about but never before
encountered). What is the proper way to pass datfr to predict()?

thanks in advance
bob

ps. SPlus 3.4 under Solaris 2.5.1 on SUN Ultra-2

-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news