write_headfile: Write a companion results file providing site details and...

Description Usage Arguments Examples

View source: R/cracle_build.R

Description

Companion file will include the environmental data extracted for the site locality, site locality information (lat/lon), and the list of taxa used in this analysis as derived from an extraction object. This list may differ from the original list requested if some taxa were excluded due to too few records left once filtered.

Usage

1
write_headfile(site.coord = "", tax.list = "", filename)

Arguments

site.coord

A vector of the site coordinates and any other desired site metadata.

tax.list

A list of unique taxon names. Usually obtained by running 'tax.list <- unique(extraction_object$tax)' on your 'extraction_object' (See example).

filename

The path to desired file.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## 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');
site.coord <- extr.raw[1,1:5]; 
#Assuming that the site details are given in the first row of the original datafile. 
tax.list <- unique(subset(extr.raw, extr.raw$tax != 'SITECOORD')$tax); 

#Assumes that the site details are given in the original 
#data file and that the entry in the 'tax' column for the site is "SITECOORD". 
#Substitute whatever you called your site if you did it this way. OR:
#tax.list <- unique(extr.raw$tax);
write_headfile(site.coord=site.coord, tax.list=tax.list, filename = "headfile.try.hdr")

## End(Not run)

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