hsp2expr: Returns a R expression that will recreate a saved scatterplot...

Description Usage Arguments Details Value

Description

Returns a R expression that will recreate a saved scatterplot of hull metrics

Usage

1
hsp2expr(hsp, reg_nodes_prec = 3, var_name = "hsp")

Arguments

hsp

A list of objects of class locoh.hsp

reg_nodes_prec

The number of decimal places that will be preserved when printing the coordinates of the nodes of manually defined polygon regions in scatterplot space

var_name

The name(s) of the variable that will be initialized in the output code

Details

Hull metric scatterplot settings can be saved as an object for reuse as a map legend or subsetting data (see T-LoCoH Tips on website). Saved scatterplot settings can include the boundaries of manually defined (i.e., with the mouse) regions of interest, that can be used as a map legend or for data subsetting. The purpose of this function is to generate R code so that polygons that were manually defined with the mouse in a hull metric scatterplot can be recreated (e.g., in a markdown document) for the purposes of reproducible research. hsp2expr will return a valid chunk of R code that recreates the saved scatterplot settings. This code can be copy-pasted into a RMarkdown document or other report format so the work may be recreated.

Value

A chunk of R code that will reproduce the hsp object


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