Learn R Programming

RADami (version 1.1-2)

rad2mat: Generates a matrix of sequences from a

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

Value

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

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.

See Also

rad2phy, summary.pyRAD.loci

Examples

Run this code
data(oak.rads)
out <- rad2mat(oak.rads)

Run the code above in your browser using DataLab