运行时我收到一条错误消息,有什么对任何人来说都是显而易见的吗?
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]
}