whitlock / OutFLANK

A procedure to find Fst outliers based on an inferred distribution of neutral Fst
18 stars 9 forks source link

Error in if (base$mrun[i] == base$mrun[i + 1] && base$rbd[j] == base$rbd[j + : missing value where TRUE/FALSE needed #22

Open gabrielazuniga opened 4 years ago

gabrielazuniga commented 4 years ago

Hi everyone, I am trying to do compare every one row with the next in two variables but I got that error, my code is:

base$cambio =0 i=j for (i in 1:length(base[,1])){ #length of mrun for (j in 1:length(base[,3])){ #length of rbd, same of mrun if (base$mrun[i]==base$mrun[i+1] && base$rbd[j]==base$rbd[j+1]){ base$cambio[i]=0} else {base$cambio[i]=1} } }

Error in if (base$mrun[i] == base$mrun[i + 1] && base$rbd[j] == base$rbd[j + : missing value where TRUE/FALSE needed