Error in if (popLoc[1] == 3) { : missing value where TRUE/FALSE needed in DiveRsity

Please I want to know how I am going to fix this problem. Thx in advanced

X <- readGenepop (infile = "data_genepop.txt", gp = 3, bootstrap = FALSE)

basicStats (infile = x, outfile = basicstat, fis_ci = FALSE, ar_ci = FALSE, fis_boots = NULL, ar_boots = NULL, mc_reps = 9999, rarefaction = TRUE, ar_alpha = 0.05, fis_alpha = 0.05)

Error in if (popLoc[1] == 3) { : missing value where TRUE/FALSE needed

It would be easier to find the problems by providing some data as a reprex.

In particular, what package are you using? Is it diveRsity? You should also make sure the code you provide does create that error message on a fresh R session, in your example you read X but then execute basicStats on x, R is case-sensitive so X and x are different variables.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.