-
Notifications
You must be signed in to change notification settings - Fork 1
/
global.R
32 lines (25 loc) · 1.1 KB
/
global.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
## +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
## Title: Filter_app
## Authors: Urs Tilmann Wolpert, Department of Geography, Justus-Liebig-University Giessen
## Sebastian Kreutzer, IRAMAT-CRP2A, Universite Bordeaux Montaigne (France)
## Contact: [email protected]
## Date: Thu June 22 2017
##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
library(shiny)
library(Luminescence)
require(readxl)
source("chooser.R")
##check whether a real database exists or the template should be loaded
if (dir.exists("Data")) {
##set to first file
database_path <- list.files("Data/", full.names = TRUE)[1]
##check whether this is a real XLSX file
if (rev(strsplit(database_path, split = ".", fixed = TRUE)[[1]])[1] != "xlsx") {
stop("The filter database file needs to be of type 'xlsx'!")
}
}else{
database_path <- "template/template.xlsx"
}
# ##load data and cleanup filter list
filters <- readxl::excel_sheets(database_path)
filters <- filters[!grepl(pattern = "Main List", x = filters, fixed = TRUE)]