lhs.exp.csv: Export a LoCoH-hullset to csv

Description Usage Arguments Value Note See Also

Description

Export hull metrics to a csv file / data frame

Usage

1
2
3
4
lhs.exp.csv(lhs, id = NULL, k = NULL, r = NULL, a = NULL,
  s = NULL, hs.names = NULL, csv.save = TRUE, dir = ".",
  csv.fn.pre = NULL, csv.fn.mid = c("none", "short", "long")[2],
  hm = "all", anv = NULL, hsp = NULL, status = TRUE)

Arguments

lhs

A LoCoH-hullset object

id

The name(s) of individuals to export

k

The k value of hullsets to export

r

The r value of hullsets to export

a

The a value of hullsets to export

s

The s value of hullsets to export

hs.names

The name(s) of saved hullsets to analyze

csv.save

Whether to create csv file(s). If FALSE, a list of data frames will still be returned. T/F

dir

The directory where the csv file(s) will be saved

csv.fn.pre

A prefix for the csv file name(s)

csv.fn.mid

Style of the filename mid-section: none, short, or long

hm

The name of hull metric(s) that will be exported. Character vector or comma separated string.

anv

The name(s) of ancillary variables(s) of the parent point of each hull to be exported. Default is NULL, can also be set to 'all'. Character vector or comma separated string.

hsp

A list containing one hull scatterplot object with regions saved (i.e., object returned by lhs.plot.scatter), or the index of a hull scatter plot saved in the hullset (see lhs.hsp.add). If passed, a column for the region number will be included in the attribute table. Applicable only to hulls and hull parent points.

status

Show messages. T/F

Value

List (one list element for each hullset) of data frames of hull metrics and possibly ancillary variables

Note

This function exports hull metrics only. If you want to export the coordinates of the hulls themselves for further analysis in a GIS, see /link{lhs.exp.shp}.

If file is left blank, no csv file will be written to disk but the function will still return a list of data frames (one for each hullset)

If you have created a scatterplot legend with manually defined regions (see tutorial for details), the region number of each hull parent point can be included in the csv file if you pass the hullscatter plot as parameter hsp.

See Also

lhs.exp.shp


tlocoh documentation built on May 2, 2019, 5:27 p.m.