EcoGenetics (version 1.2.1-5)

ecogen2geneland: Creating input data for Geneland with an ecogen object

Description

This function creates four data frames (XY.txt, NAMES.txt, P.txt, G.txt) in the indicated directory (default: working directory), which can be loadedin Geneland.

Usage

ecogen2geneland(eco, dir = "", ncod = NULL, ploidy = 2,
  to_numeric = FALSE, nout = 3, recode = c("all", "column", "paired"),
  replace_in = NULL, replace_out = NULL, ...)

Arguments

eco

Object of class "ecogen"

dir

output path. Default = "" (current directory).

ncod

Number of digits coding each allele (e.g., 1: x, 2: xx, 3: xxx, etc.).

ploidy

Ploidy of the data.

to_numeric

Recode the genetic data into numeric format? If TRUE, the functions performs the correction via eco.format. Additional formatting parameters can be passed to this function.

nout

Number of digits in the output when to_numeric = TRUE.

recode

Recode mode when to_numeric = TRUE: "all" for recoding the data considering all the individuals values at once (e.g., protein data), "column" for recoding the values by column (e.g., microsatellite data), "paired" for passing the values of allelic states and corresponding replacement values, using the replace_in and replace_out arguments (e.g. replace_in = c("A", "T", "C", "G"), replace_out = c(1,2,3,4)).

replace_in

vector with states of the data matrix to be replaced, when recode = "paired". This argument must be used in conjunction with the argument "replace_out".

replace_out

vector with states of the data matrix used for replacement, when recode = "paired". This argument must be used in conjunction with the argument "replace_in".

...

Additional parameters passed to eco.format when to_numeric = TRUE

Value

XY.txt Matrix with coordinates.

NAMES.txt Matrix with row names.

P.txt Matrix with phenotypic data.

G.txt Matrix with genotypic data.

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
data(eco.test)
ecogen2geneland(eco, dir = "", ncod=1)

# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace