これを実行するとエラーメッセージが表示されますが、誰かにはっきりとわかるものはありますか?
yo <- function(x) {
filt <- ddply(x, .(primer,day), summarise, count=sum(timepoints==0)) # this will tell you all primers that have a 0 hr time point by giveing a 1 in the count column
if (any(filt$count) == 0) { # this was the case once so I implemented this if else part
filt <- filt[filt$count == 0,]
include <-!(x$primer%in%filt$primer)&(x$day%in%filt$day) # all primers that have 0 hrs
x <- x[include,]
### for any given replicate, divide each timepoint by its zero hour
x <- ddply(x, .(primer),transform, foldInduction=realConc/realConc[timepoints==0])
}
else {
x <- ddply(x, .(primer), transform, foldInduction=realConc/realConc[timepoints==0])
}
x[,-9]
}