[R] trellis -graphic

Geoff Wright geoffwright at sympatico.ca
Sat Aug 10 04:43:22 CEST 2002


Peter,

I was struggling with something similar to this earlier today.  You need to 
include a "panel =" into your xyplot function.  Look at the first few 
examples here...

http://terra.acs.unt.edu/Rdoc/library/lattice/demo/lattice.R

I think that you need to do something like...

xyplot(yhat~time |Subject,data=datafi,type="l", panel=function(x){
	panel.abline(0,1)
	})

I am not sure exactly what you need to put for function(x)... but I hope this 
puts you on the right track.

Cheers.
geoff

On Friday 09 August 2002 11:47 am, you wrote:
> Dear all,
>
> I am stuck with the following problem:
>
> Using the Indometh data set I want to plot the predicted
> values of a simple bixeponential model together with the observed
> concentrations.
>
> I managed to plot the predicted values:
>
> datafi<-Indometh
> fm<-nls(conc~SSbiexp(time,A1,lrc1,A2,lrc2),data=datafi)
> yhat<-predict(fm)
> datafi<-data.frame(datafi,yhat)
> xyplot(yhat~time |Subject,data=datafi,type="l")
>
> but how can I superpose the observed concentrations?
>
> Thanks a lot for your help
>
> Cheers
> Peter
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
>.-.- r-help mailing list -- Read
> http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or
> "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>._._
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list