readEnv: Read environmental file in the 'env'format

Description Usage Arguments Value Author(s) See Also Examples

Description

Read a file in the env format.

Usage

1
read.env(input.file)

Arguments

input.file

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

Value

R

A matrix containing the environmental variables with one line for each individual and one column for each environmental variable.

Author(s)

Eric Frichot

See Also

env write.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 "example.env".
# Create file:    "example.env".
write.env(C,"example.env")

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

Example output

[1] "example.env"

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