Re: [R] If function error: missing value where TRUE/FALSE needed

2012-03-05 Thread charo san andres
Hello, Petr Thanks for answering, I am trying to run a model, , so the data it just the values especify, This is what I was triyng to do, but it is comming the this error mesage, which I don't understand why becouse, I think that the sintacsi was fine, I couldn't fine any mistakes. result

[R] If function error: missing value where TRUE/FALSE needed

2012-03-04 Thread charo san andres
Hello! I am trying to get a logic estatement in R using the if function, but it is all the time comming and error, I have tryied different methods but nothing is working the sentence is the following: dispersal[1] <- if (any (relativenes[1] < cost)) ((relativenes[1]- cost)/(relativenes[1]- co