write_results: Write results to file

Description Usage Arguments Examples

View source: R/cracle_build.R

Description

Write results from a results object from either vegdistmod::get_optim() to a tab delimited table in a text file. This is done one 'method' at a time. Supported methods are "conintkde", "conintgauss", "origg", "origk", "dirconint" for the "get_optim()" type objects.

Usage

1
write_results(optima, siteval = "", clim, method, filename, append = F)

Arguments

optima

A results object from vegdistmod::get_optim()

siteval

A vector of site values for envirnomental parameters (See example for generating).

clim

The original raster object used in the vegdistmod::extraction() step.

method

The result summary method. Supported methods are "conintkde", "conintgauss", "origg", "origk", "dirconint" for the "get_optim()" type objects.

filename

Path to desired file.

append

Should this be appended to an existing file. Default is FALSE.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
#distr <- read.table('test_mat.txt', head=T, sep ="\t");
#OR:
data(distr); data(climondbioclim);
extr.raw = extraction(data=distr, clim= climondbioclim, schema='raw');
dens.list.raw <- dens_obj(extr.raw, clim = climondbioclim, bw = 'nrd0', n = 1024);
and <- and_fun(dens.list.raw);
optima <- get_optim(and);
#Compare to optima.
write_results(optima, clim = climondbioclim, method = 'conintkde', file = 'raw')

## End(Not run)

rsh249/vegdistmod documentation built on May 28, 2019, 3:31 a.m.