rad2mat: Generates a matrix of sequences from a 'pyRAD.loci' object

View source: R/rad2mat.R

rad2matR Documentation

Generates a matrix of sequences from a pyRAD.loci object

Description

This function exports a matrix of sequences from a pyRAD.loci object, with aligned sequences in the cells, individuals as rows, and loci as columns. As a matrix, this is very easy to work with in R for subsetting and creating new datasets.

Usage

rad2mat(pyDat, fill.N = TRUE)

Arguments

pyDat

an object of class pyRAD.loci

fill.N

indicates whether empty cells should be filled with Ns (TRUE) or not

Details

In general, filling with Ns is a handy thing to do, even though it presumably eats up a bunch of memory. As written, RADami is not memory-friendly.

Value

A matrix of sequences from a pyRAD.loci object, with aligned sequences in the cells, individuals as rows, and loci as columns

Author(s)

Andrew Hipp

See Also

rad2phy, summary.pyRAD.loci

Examples

data(oak.rads)
out <- rad2mat(oak.rads)

andrew-hipp/RADami documentation built on Nov. 9, 2023, 5:40 p.m.