f.convert.matrix.ff {Haplin}R Documentation

Converting Haplin-formatted matrix into the new format

Description

Internal function for converting an R matrix object into the new format of data used in Haplin. The output is the same as from genDataRead.

Usage

f.convert.matrix.ff(
  data = stop("You must give the data to convert!", call. = FALSE),
  n.vars = stop("You must explicitly give the number of columns with covariates!", call.
    = FALSE),
  cov.header,
  gen.levels
)

Arguments

data

A character matrix (NB: it's assumed that this matrix contains genotypes and covariate data, if any; i.e., as if it was a table read in from a haplin-formatted file).

n.vars

Number of columns with covariate variables - if the data does not contain covariates, give 0 explicitly.

cov.header

Optional; if there are covariates in the data, you can give their names explicitly here. Otherwise, dummy names will be created.

gen.levels

Optional; a vector with all the possible values for alleles in the genotype part of data. If not given, these will be assessed from the given data.

Value

A list object with two elements:


[Package Haplin version 7.3.1 Index]