var {numberofalleles}R Documentation

Variance method for objects of class pf

Description

Variance method for objects of class pf

Variance method for pf object

Usage

var(x, ...)

## S3 method for class 'pf'
var(x, by_locus = FALSE, ...)

Arguments

x

Object of class pf: output of pr_total_number_of_distinct_alleles

...

other arguments that may p

by_locus

If TRUE then the results will be returned locus by locus

Value

Either a vector of variances, one for each locus, or the sum of the locus variances. The variances are the variances of the number of alleles observed at each locus.

See Also

mean.pf

Examples

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)


[Package numberofalleles version 1.0.1 Index]