Learn R Programming

SplitR (version 0.3)

dispersion_preset_list: Get list of presets

Description

This function allows you to generate a simple list of presets of a given type. If no type is provided, the user is prompted to enter a type. The list is presented as a series of oneline summaries that are numbered in the order they appear in their respective files. This numbering is important, as the 'hysplit_dispersion' function calls presets by these numbers. It is possible to search for a preset of a certain type by its name through use of the 'search' argument. If there is an exact match by name, then the number associated with that preset is returned.

Usage

dispersion_preset_list(read = NULL, search = NULL, path_wd)

Arguments

read

the type of preset to get. The three preset types are "emissions", "grids", and "species". Only a single type can be specified.

search

a search term corresponding to the name of a preset of the type provided within the argument 'read'. If an exact match is found (case-sensitive), then the number corresponding to the matched preset is provided.

path_wd

a full path should be provided for the HYSPLIT working directory since presets will normally reside in this folder.

Examples

Run this code
# NOT RUN {
# Get a list of 'species' presets
dispersion_preset_list(read = "species",
                       path_wd = "C:\\hysplit4\\working\\")

# Find the number for the 'emissions' preset named 'E134'
dispersion_preset_list(read = "emissions", search = "E134",
                       path_wd = "~/Documents/Hysplit/working/")
# }

Run the code above in your browser using DataLab