Skip to content

Commit

Permalink
Minor code cleanup of gendata.to.genind example
Browse files Browse the repository at this point in the history
  • Loading branch information
lvclark committed May 31, 2018
1 parent 263605c commit 6a7dc2d
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions man/gendata.to.genind.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ Lindsay V. Clark
\code{\link{freq.to.genpop}}
}
\examples{
require(adegenet)

# create a "genambig" object
mydata <- new("genambig", samples=c("a","b","c","d"), loci=c("e","f"))
PopNames(mydata) <- c("G","H")
Expand All @@ -64,13 +62,13 @@ Genotypes(mydata, loci="f") <- list(c(200,202,204),Missing(mydata),
c(210,212),c(204,210,214))

# convert to "genind"
if(require(adegenet)){
mydata2 <- gendata.to.genind(mydata)
mydata2@tab
locNames(mydata2)
indNames(mydata2)
popNames(mydata2)
pop(mydata2)
if(require("adegenet")){
mydata2 <- gendata.to.genind(mydata)
mydata2@tab
locNames(mydata2)
indNames(mydata2)
popNames(mydata2)
pop(mydata2)
}
}
\keyword{ manip }
Expand Down

0 comments on commit 6a7dc2d

Please sign in to comment.