Learn R Programming

dartR (version 1.9.9.1)

gl.stockR: Generate a SNP matrix from a genlight {adegenet} object for subsequent use in R package stockR.

Description

The script extracts the SNP data from the gl object as a matrix and transposes it to comply with the format expected by stockR.

Usage

gl.stockR(x, verbose = 2)

Arguments

x

-- name of the genlight object containing SNP genotypes [required]

verbose

-- verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log ; 3, progress and results summary; 5, full report [default 2]

Value

A matrix with the SNP scores in the form expected by stockR

Details

The script returns the transposed SNP matrix

Examples

Run this code
# NOT RUN {
   gl <- gl.stockR(testset.gl)
# }

Run the code above in your browser using DataLab