#' @title Extracts data on the NUTS1-level of a data set.
#' @description Extracts all observations/rows which are on the NUTS1-level from a data set. Default is the Entrances data set.
#'
#' @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 containing only observations with NUTS1_IDs
#' @export
#' @examples
#' #extracts data only for the NUTS1 level from a data set. Default is the EntrancesData data set.
#' get_data_NUTS1(data=EntrancesData)
get_data_NUTS1<-function(data=EntrancesData) {
NUTS1<-NUTS_data$NUTS[which(nchar(NUTS_data$NUTS)==3)]
dataout<-data[which(data[,1] %in% NUTS1),]
return(dataout)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.