Learn R Programming

PopGenome (version 2.7.2)

set.populations-methods: Define populations

Description

This generic function defines the populations. Using this function obviates the need to specify the populations for each calculation separately. The populations can be set differently for different PopGenome modules by applying the function between module calls.

Usage

# S4 method for GENOME
set.populations(object,new.populations=FALSE, diploid=FALSE,
triploid=FALSE,tetraploid=FALSE)

Arguments

object

an object of class "GENOME"

new.populations

list of populations. default:FALSE

diploid

if diploid data is present

triploid

if triploid data is present

tetraploid

if tetraploid data is present

Examples

Run this code
# NOT RUN {
# GENOME.class <- readData("\home\Alignments")
# pop.1 <- c("seq1","seq2")
# pop.2 <- c("seq3","seq4","seq1")
# GENOME.class <- set.populations(GENOME.class,list(pop.1,pop.2))
# GENOME.class@region.data@populations2
# GENOME.class <- neutrality.stats(GENOME.class)
# }

Run the code above in your browser using DataLab