Learn R Programming

numberofalleles (version 1.0.1)

mean.pf: Mean method for objects of class pf

Description

Mean method for objects of class pf

Usage

# S3 method for pf
mean(x, by_locus = FALSE, ...)

Arguments

x

Object of class pf: output of pr_total_number_of_distinct_alleles

by_locus

If TRUE then the results will be returned locus by locus

...

other arguments that may p

Value

either a vector of means, one for each locus, or the sum of the locus means. The means are the expected number of alleles observed at each locus

Examples

Run this code
# NOT RUN {
freqs <- read_allele_freqs(system.file("extdata","FBI_extended_Cauc.csv",
                           package = "numberofalleles"))
p <- pr_total_number_of_distinct_alleles(contributors = c("U1","U2"),
                                         freqs = freqs)
mean(p)
var(p)
# }

Run the code above in your browser using DataLab