Skip to content

Instantly share code, notes, and snippets.

@romunov
Forked from MajaJelencic/gist:2050503b8eb2a018b17a
Last active August 29, 2015 14:15
Show Gist options
  • Save romunov/59865eecb7cf60cc1ef9 to your computer and use it in GitHub Desktop.
Save romunov/59865eecb7cf60cc1ef9 to your computer and use it in GitHub Desktop.
subsetGenData <- function(x) {
mp <- droplevels(other(x)$metadata)
iksips <- other(x)$xy
pet <- df2genind(X = genind2df(x, sep = "/"), sep = "/", ind.names = indNames(x),
loc.names = locNames(x))
pet@other$metadata <- mp
pet@other$xy <- iksips
pet
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment