Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

stamppConvert

Import and Convert


Description

Imports biallelic AB formated or allele A frequency genotype data. If the data is in imported in biallelic AB format this function also converts it to allele frequencies

Usage

stamppConvert(genotype.file, type = "csv")

Arguments

genotype.file

the genotype input file. This should be a R matrix object or a file path for a csv file containing the genotype data in either bialleleic AB format or allele 'A' frequency format, or a genlight object containing genotype data

type

the type of file the genotype data is being imported from; "csv" = comma seperated file, "r" = data frame in the R workspace, "genlight" = genlight object.

Value

An object of class data.frame which contains allele frequency data for use in other StAMPP functions

Author(s)

Luke Pembleton <luke.pembleton at agriculture.vic.gov.au>

Examples

# Import example data into the R workspace
data(potato.mini, package="StAMPP")
# Convert to allele frequencies
potato.freq <- stamppConvert(potato.mini, "r")

StAMPP

Statistical Analysis of Mixed Ploidy Populations

v1.6.2
GPL-3
Authors
LW Pembleton
Initial release
2021-04-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.