-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglobal.R
executable file
·87 lines (67 loc) · 2.17 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# share the vairiables
# For the global configuration --------------------------------------------
# Store variable in config ------------------------------------------------
config <- list()
# Version -----------------------------------------------------------------
config$version <- "0.0.1"
# Working directory -------------------------------------------------------
# default getwd()
# in development mode, change the config$wd to your working directory
config$wd <- "/home/xiamx/github/GEDS"
#config$wd <- "/data/liucj/github/GEDS"
#config$wd <- "/home/liucj/github/GEDS"
# Databases ---------------------------------------------------------------
#config$database <- "/data/shiny-data/GEDS"
config$database <- '/home/liucj/shiny-data/GEDS'
# Absolute paths ----------------------------------------------------------
# server
config$serv <- file.path(config$wd, "serv")
# ui
config$ui <- file.path(config$wd, "ui")
# functions
config$func <- file.path(config$wd, "func")
# user data
config$usrdat <- file.path(config$wd, "usrdat")
# logs
config$logs <- "logs"
# Path to zip -------------------------------------------------------------
Sys.setenv("R_ZIPCMD" = "/usr/bin/zip")
download_bt <- function(id){
ns <- NS(id)
tagList(
shinyWidgets::dropdownButton(
tags$h3("Download Options"),
#prettyRadioButtons(
# inputId = ns("pictype"),
# label = "Selcet format for your pictur",
# choices = list("PDF" = "pdf", "PNG" = "png","EPS"="eps"),
# inline = TRUE,
# icon = icon("check"),
# bigger = TRUE, status = "info",
# animation = "jelly"
#),
numericInput(
inputId = ns("d_width"),
label = "Width",
value = 16,
min = 10,
max = 30
),
numericInput(
inputId = ns("d_height"),
label = "Height",
value = 20,
min = 15,
max = 40
),
downloadButton(
outputId = ns("picdownload"),
label = "Download"
),
circle = TRUE, status = "default",
right = TRUE,
icon = icon("download"), width = "300px",
tooltip = shinyWidgets::tooltipOptions(title = "Click to download")
)
)
}