#' @title Extracts data for specific regional IDs from a data set.
#' @description Extracts data for specific regional IDs (e.g. NUTS IDs from a data set. Default is the Entrances data set.
#'
#' @param RegionIDs vector with character strings of the regional IDs, e.g. NUTS IDs, LAU IDs
#' @param data dataframe, from which you want to extract your data. The data frame must contain the regional IDs in the first column. Default is the EntrancesData data set.
#' @return dataframe
#' @export
#' @examples
#' #extracts data for specific NUTS IDs from a dataframe. Default is the EntrancesData dataset
#' get_data_for_regions(RegionIDs=c("ITG2C","ITG2B"), data=EntrancesData)
get_data_for_regions<- function(RegionIDs, data=EntrancesData){
dataout<-data[which(data[,1] %in% c(RegionIDs)),]
return(dataout)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.