get.function.df: Get a data frame containing grid cell centers and...

Description Usage Arguments Details Value Author(s) Examples

View source: R/get-function-df.R

Description

This function returns a data frame containing 4 columns: The x- and y-coordinates of the centers of the grid cells in the regular grid, the value of the GRF in each location, and the name of the function.

Usage

1
2
get.function.df(grf.object, function.numbers = 1,
  function.names = NULL, all.functions = FALSE)

Arguments

grf.object

The GRF object of interest.

function.numbers

The indices of the functions of interest.

function.names

The names of the functions of interest.

all.functions

If true, the data frame will include all of the functions.

Details

If more than one of function.names, all.functions and function.numbers is specified, the prioritization is function.names > all.functions > function.numbers.

Value

A (num.functions*resolution.x*resolution.y) x 4 data.frame.

Author(s)

Mathias Isaksen mathiasleanderi@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
library(GRFics)
# Prepare GRF object
grf.object = generate.grf.object(0, 1, 0, 1, 25, 25,
                                 strength.parameter = 2,
                                 direction.parameter = pi/4,
                                 initial.seed = 1000,
                                 num.functions = 1)
# Extract data frame containing the 50 x 50 grid coordinates and
# the value of the GRF in each grid cell.
original.df = get.function.df(grf.object)
# Print first portion of original.df
head(original.df)

mathiasisaksen/GRFics documentation built on May 20, 2021, 5:55 a.m.