build.isotopeframe: build.isotopeframe

Description Usage Arguments Details Value Author(s) Examples

View source: R/build.isotopeframe.R

Description

Given local filenames leading to tab-delimited files of isotope values, read in the values from the file and store them in a dataframe.

Usage

1
2
build.isotopeframe(pred.file, prey.file, prey.header=TRUE,
  pred.header=FALSE, sep="\t")

Arguments

pred.file

The name of the file containing the predator isotope data.

prey.file

The name of the file containing the prey isotope data.

prey.header

TRUE if the file pointed to by prey.file has a header line.

pred.header

TRUE if the file pointed to by pred.file has a header line.

sep

The separator used within the isotope files. Defaults to tab.

Details

The isotope measurement files allowable for input by the system must be formatted in one of two ways. The first are files containing raw data: they must contain one measurement per line, with the measurement for each isotope separated into columns. If the prey file contains more than a single species, then the measurements for each species must be appended as additional blocks of columns. The columns for each species must preserve the ordering of the isotopes.

The second file format contain the mean and standard deviation of the isotopic measurements of each species. Each input species will have it's measurements on a single line, organized like so: <name of species> <mean of isotope 1> <sd of isotope 1> <mean of isotope 2> <sd of isotope 2> ...

A final note: predator files may also have more than one species, although any extra predators will be ignored.

Value

prey.frame

A data frame containing the prey isotopic measurements (or the mean/sd of each isotope).

pred.frame

A data frame containing the predator isotopic measurements (or the mean/sd of each isotope).

Author(s)

Robert Robere

Examples

1
2
3
4
## import data files, assuming the predator file contains header lines
## Not run: input <- build.isotopeframe("pred_dataset.csv",
"prey_dataset.csv", pred.header=TRUE, prey.header=TRUE)
## End(Not run)

EDFIR documentation built on May 2, 2019, 12:36 p.m.