fit<- Tps( BD[,1:4], BD$lnya) # fit surface to data
# evaluate on a grid on two
# variables holding two fixed
# default surface and contour plot
# make grid list
grid.list<- list( KCl="x", MgCl2=mean(BD[,2]),KPO4="y",dNTP=mean(BD[,4]))
out.p<- predict.surface(fit,grid.list, extrap=TRUE)
surface(out.p)
set.panel(1,1)
Run the code above in your browser using DataLab