r - **Error in if (del == 0 && to == 0) return(to) : missing value where TRUE/FALSE needed** -


i running below code , returns below error- solutions appreciated.

## uqdata = positive count abundance data (i.e. positive values only)          aa2<-gam(uqdata~s(muduq,bs="ps", k=15) ,family=gamma(link=log),data=antho)         xmin <- ceiling(min(antho$muduq[antho$bin==1]))         xmax <- floor(max(antho$muduq[antho$bin==1]))         mudnew <- seq(from=xmin, to=xmax, by=0.1)       **error in if (del == 0 && == 0) return(to) :                        missing value true/false needed**         pred.dat <- data.frame(mudnew)         names(pred.dat) <- "muduq"         pred.aa2 <- data.frame(predict.gam(aa2, pred.dat, se.fit=true, type="response"))         pred.aa2.comb <- data.frame(pred.dat, pred.aa2)         names(pred.aa2.comb)         plot(fit ~ muduq, data=pred.aa2.comb, type="l", lwd=2, col=1, ylab="density per 0.0132 m2", xlab="mud content (%)") 

perhaps:

    xmin <- ceiling( min( antho$muduq[antho$bin==1] , na.rm=true) )     xmax <- floor( max( antho$muduq[antho$bin==1] , na.rm=true) ) 

i think error being thrown seq function.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -