Learn R Programming

LEA (version 1.4.0)

read.env: Read environmental file in the envformat

Description

Read a file in the env format.

Usage

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.

See Also

env write.env lfmm

Examples

Run this code
# 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")

Run the code above in your browser using DataLab