matrix_to_df: Convert a matrix to a data frame.

Description Usage Arguments Value

Description

Convert a matrix to a data frame with columns time, location, and one more containing the elements of the input matrix.

Usage

1
matrix_to_df(mat, name, locations = NULL, times = NULL)

Arguments

mat

A matrix.

name

The name of the third column in the output matrix.

locations

If not NULL, a vector with the names of the locations.

times

If not NULL, a vector with the time points. If NULL, the matrix is assumed to be ordered with time point 1 in the first row.

Value

A matrix with columns time, location, name, where name is specified in the input.


BenjaK/scanstatistics documentation built on May 5, 2019, 2:41 p.m.