[R] predict function
Uwe Ligges
ligges at statistik.uni-dortmund.de
Fri Feb 13 19:40:04 CET 2004
Thomas Jagoe wrote:
> I am using R to do a loess normalisation procedure.
> In 1.5.1 I used the following commands to normalise the variable "logratio",
> over a 2d surface (defined by coordinates x and y):
>
>
>>array <- read.table("121203B_QCnew.txt", header=T, sep="\t")
>>array$logs555<-log(array$s555)/log(2)
>>array$logs647<-log(array$s647)/log(2)
>>array$logratio<-array$logs555-array$logs647
>>array$logav<-(array$logs555+array$logs647)/2
>>library(modreg)
>>loess2d<-loess(logratio~x+y,data=array)
>>array$logratio2DLoeNorm <-array$logratio - predict.loess(loess2d, array)
>
>
> However in 1.8.1 all goes well until the last step when I get an error:
>
> Error: couldn't find function "predict.loess"
>
> Can anyone help ?
Use predict() instead of predict.loess() (the method is hidden in a
namespace, you should use the generic function).
Uwe Ligges
More information about the R-help
mailing list