Skip to content

Bugs in the main function #24

Description

@GabrieleNocchi

Hi there,

I was trying to give a try to your tool but I think there are some issues.

These lines in your code causes problems, and I am not sure why are there:
Check coordinate site IDs exactly match admixture site IDs

  if ( all(coords_df[[1]] == unique(admixture_df[[1]])) == FALSE ) {
    stop("Site names in coordinates data frame do not match site names in admixture data frame. Check site names are not empty or NA and that they match.")
  }

Why simply not:
Check coordinate site IDs exactly match admixture site IDs

  if ( unique(coords_df[[1]] == unique(admixture_df[[1]])) == FALSE ) {
    stop("Site names in coordinates data frame do not match site names in admixture data frame. Check site names are not empty or NA and that they match.")
  }

My site names are exactly the same between coordinates and admixture file, but I can t go past this error. This however does not happen with your data. If I remove those lines above from the function, it works. Also note sure why the warning about longer object having to be a multiple.
Also, if the sampling area is small, I can t find a way for the pie not to overlap even when I decrease the pie size and map size, they overlap. If I adjust the limits of the map to make it much smaller (ie 1 degree Lat and 1 degree Lon), it still makes it bigger than specified.

I'd love to use your package but at the moment is much easier to do this from scratch using mapplots draw.pie function:
https://www.rdocumentation.org/packages/mapplots/versions/1.5.2/topics/draw.pie

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions