Description Usage Arguments Details Value Author(s) Examples
View source: R/get-function-df.R
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.
1 2 | get.function.df(grf.object, function.numbers = 1,
function.names = NULL, all.functions = FALSE)
|
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. |
If more than one of function.names
, all.functions
and function.numbers
is specified, the prioritization is function.names
> all.functions
> function.numbers
.
A (num.functions*resolution.x*resolution.y) x 4
data.frame
.
Mathias Isaksen mathiasleanderi@gmail.com
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.