Skip to content

Instantly share code, notes, and snippets.

View romunov's full-sized avatar

Roman Luštrik romunov

View GitHub Profile
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
}