layers_long2wide: Reformat Layer Strcuture from Long Format to Wide Format

Description Usage Arguments Value Examples

View source: R/layers_long2wide.R

Description

The function takes a data-base type table and returns a table in wide format.

Usage

1
layers_long2wide(x, rowname, colname)

Arguments

x

matrix or data frame that is to be reformatted

rowname

name of the variable that is used as the row name

colname

name of the variable that is used as the column name

Value

matrix

Examples

1
2
3
4
5
6
## Not run: 
forcings <- read.table("forcings.txt", header=TRUE)
x <- as.matrix(forcings)
xx <- layers_long2wide(x, "time", "depth")

## End(Not run) % end dontrun

rSALMO documentation built on May 31, 2017, 4:40 a.m.