Reformat Layer Strcuture from Long Format to Wide Format

Share:

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

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.