cols2vmat: Transform a dataframe carrying grid-oriented data into a list...

View source: R/utils.R

cols2vmatR Documentation

Transform a dataframe carrying grid-oriented data into a list of grid vectors and a data matrix.

Description

Transform a dataframe carrying grid-oriented data into a list of grid vectors and a data matrix.

Usage

cols2vmat(d)

Arguments

d

A data.frame with 3 columns. The first two columns must be vectors of grid coordinates, and the final column contains the value at that grid coordinate.

Value

a list of length 3; the first 2 entries are vectors of the grid values in each direction, and the last entry is the 2 dimensional matrix of the data values.


marcpaterno/rcosmosis documentation built on June 5, 2023, 6:43 p.m.