R/ElevationOf.R

Defines functions ElevationOf

Documented in ElevationOf

#' 
#' 	Extracts the elevation of a meteorological station expressed in meters above a reference (sea level) 
#' 
#'  
#'   
#' @param name  character ID of the station 
#' @param station_names  vector of the IDs (characters) of the considered meteorological stations. An example is \code{STATION_NAMES}, which is defined in the \code{\link{trentino}} dataset.
#' @param elevation      vector of the elevation  of the considered meteorological stations. An example is \code{ELEVATION}, which is defined in the \code{\link{trentino}} dataset.
#'  
#' @export 
#'
#'       
#' @return  the elevation given the vectors of station IDs and the respective elevations

#' @examples 
#' data(trentino)
#' ElevationOf("T0099",station_names=STATION_NAMES,elevation=ELEVATION)




ElevationOf <-
function(name,station_names,elevation) { return(as.integer(elevation[station_names==name]))}

Try the RMAWGEN package in your browser

Any scripts or data that you put into this service are public.

RMAWGEN documentation built on Dec. 12, 2019, 9:07 a.m.