get_field_predictors: Calculate specified predictors for given fields

Description Usage Arguments Value

View source: R/mines.R

Description

Takes a vector of functions which represent predictors and applies them to the given list of fields

Usage

1
get_field_predictors(predictors, fields, rename_rows = TRUE)

Arguments

predictors

- a character vector containing the names of functions that take a field$image and return the value of a predictor

fields

- a list containing objects of class 'field', usually got from the extract_fields function

rename_rows

- whether to name rows as (i, j) indicating location in a 9x9 matrix (only use for length(fields) == 81)

Value

A matrix with each row being the calculated predictors for a field, populated column-by-column, just as a regular R matrix, so the (i,j) field predictors are in the (i + 9*(j-1))-th row of the matrix.


Blaza/ssoftveR documentation built on May 6, 2019, 11:19 a.m.