to_mv: Returns the passed items as multivariate data

Description Usage Arguments Value Author(s)

View source: R/to_mv.R

Description

This function will provide the alleles within a locus object for either a single locus or for a vector of loci

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
to_mv(x, ploidy, alleles, drop.allele = FALSE, leave.as.na = FALSE, ...)

## Default S3 method:
to_mv(x, ...)

## S3 method for class 'locus'
to_mv(
  x,
  ploidy = 2,
  alleles = NA,
  drop.allele = FALSE,
  leave.as.na = FALSE,
  ...
)

## S3 method for class 'data.frame'
to_mv(
  x,
  ploidy = 2,
  alleles = NA,
  drop.allele = FALSE,
  leave.as.na = FALSE,
  ...
)

Arguments

x

A object to convert.

ploidy

The number of alleles at an individuals locus (default=2)

alleles

A set of alleles to make the matrix columns on.

drop.allele

A flag indicating an allele should be dropped.

leave.as.na

A flag to re-insert NA values into multivariate data where missing genotypes were encountered (Default=FALSE) if not, zeros are used.

...

Ignored

Value

The matrix representation of x.

Numerical value of x

Matrix representing the locus

A matrix

Author(s)

Rodney J. Dyer rjdyer@vcu.edu

Rodney J. Dyer rjdyer@vcu.edu


MarianaLag/Mlag documentation built on Feb. 13, 2020, 12:30 a.m.