Get Species Name or Information Based on IASDT Species ID
Source:R/DWF_GetSpeciesName.R
GetSpeciesName.Rd
This function retrieves detailed information on IASDT Species, optionally
filtered by a specific IASDT species ID. It first loads environment variables
from a given file, then reads a species list from a path specified in the
environment variables. If a species ID SpID
is provided, it only returns
species information for the listed species, otherwise return the full list of
IAS.
Arguments
- SpID
optional IASDT species ID for which detailed information is required. If not provided, the function returns the entire species list.
- EnvFile
EnvFile A string specifying the path to the environment variables file. Default is ".env". This file must exist in the specified path; otherwise, the function will stop with an error message.
- FromHPC
Logical. Indicates whether the function is being run on an HPC environment, affecting file path handling. Default:
TRUE
.
Value
A data frame containing species information. If a species ID SpID
is provided, it only returns species information for the listed species,
otherwise return the full list of IAS.
Details
The function reads the following environment variables:
DP_R_TaxaInfo
(ifFromHPC
=TRUE
) orDP_R_TaxaInfo_Local
(ifFromHPC
=FALSE
) for the location of theSpecies_List_ID.txt
file containing species information.DP_R_PA
(ifFromHPC
=TRUE
) orDP_R_PA_Local
(ifFromHPC
=FALSE
). The function reads the contents of theSp_PA_Summary_DF.RData
file from this path.