Creates a new pft that is a duplicate of an existing pft,
including relationships with priors, species, and cultivars (if any) of the existing pft.
This function mimics the 'clone pft' button in the PFTs record view page in the
BETYdb web interface for PFTs that aggregate >=1 species, but adds the ability to
clone the cultivar associations.
Usage
clone_pft(parent.pft.name, new.pft.name, new.pft.definition, settings)
Arguments
- parent.pft.name
name of PFT to duplicate
- new.pft.name
name for new PFT. Must not be the same as parent.pft.name
- new.pft.definition
text for the new PFT's definition field.
- settings
PEcAn settings list, used only for BETYdb connection parameters
Value
ID of the newly created pft in database, creates new PFT as a side effect
Author
David LeBauer, Chris Black
Examples
if (FALSE) { # \dontrun{
clone_pft(parent.pft.name = "tempdecid",
new.pft.name = "mytempdecid",
new.pft.definition = "mytempdecid is a new pft",
settings = pecan_settings_list)
} # }