writeEnv: Write files in the 'env' format

Description Usage Arguments Value Author(s) See Also Examples

Description

Write a file in the env format.

Usage

1
    write.env(R, output.file)

Arguments

R

A matrix containing the environmental variables with one line for each individual and one column for each environmental variable. The missing genotypes have to be encoded with the value 9.

output.file

A character string containing a path to the output file, an environmental data matrix in the env formt.

Value

output.file

A character string containing a path to the output file, an environmental data matrix in the env formt.

Author(s)

Eric Frichot

See Also

read.env env lfmm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Creation of an environmental matrix C 
# containing 2 environmental variables for 3 individuals.
# C contains one line for each individual and one column for each variable.
C = matrix(runif(6), ncol=2, nrow=3)

# Write C in a file called "tuto.env".
# Create file:    "tuto.env".
write.env(C,"tuto.env")

# Read the file "tuto.env".
C = read.env("tuto.env")

Example output

[1] "tuto.env"

LEA documentation built on Nov. 8, 2020, 8:19 p.m.