Skip to content

Commit

Permalink
add additional catch for geodists/user input
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas Brazeau committed Nov 27, 2024
1 parent cdef084 commit 7a4849f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/main_pso.R
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ deme_inbreeding_spcoef_pso <- function(discdat,
#......................
goodegg::assert_eq(
x = choose(length(unique(c(discdat$deme1, discdat$deme2))), 2), # max number of between distances
y = unique(paste0(discdat$deme1, discdat$deme2, discdat$geodist)), # count of unique between distances
y = length(unique(paste0(discdat$deme1, discdat$deme2, discdat$geodist))), # count of unique between distances
message = "You have pairwise demes with differing geodistances measurements in your data input. Geodistances must be the same between demes (pairwise geodistances should be the same)."
)

Expand Down
2 changes: 1 addition & 1 deletion R/main_vanilla.R
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ deme_inbreeding_spcoef_vanilla <- function(discdat,
#......................
goodegg::assert_eq(
x = choose(length(unique(c(discdat$deme1, discdat$deme2))), 2), # max number of between distances
y = unique(paste0(discdat$deme1, discdat$deme2, discdat$geodist)), # count of unique between distances
y = length(unique(paste0(discdat$deme1, discdat$deme2, discdat$geodist))), # count of unique between distances
message = "You have pairwise demes with differing geodistances measurements in your data input. Geodistances must be the same between demes (pairwise geodistances should be the same)."
)

Expand Down

0 comments on commit 7a4849f

Please sign in to comment.