-
Notifications
You must be signed in to change notification settings - Fork 0
/
.Rprofile
53 lines (38 loc) · 1.17 KB
/
.Rprofile
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
source("renv/activate.R")
# Set-up a local instance of the EMU-webApp ----
#
# If the directory ~/EWA/ does not exist, it is created and the EMU-webAPP is
# downloaded in it.
# Fixed in emuR 2.3.0
# This is needed because emuR overrides options at loading.
# library(emuR)
# Don't use local emu-WebApp
# ewa_dir <- file.path(Sys.getenv("HOME"), "EWA")
# ewa_git <- file.path(ewa_dir, ".git")
#
# if (!dir.exists(ewa_git)) {
# cat(crayon::yellow("x Local EMU-webApp not found. Downloading now!\n"))
# dir.create(ewa_dir, showWarnings = F)
# git2r::clone(
# url = "https://github.com/IPS-LMU/EMU-webApp.git",
# local_path = ewa_dir,
# branch = "gh-pages"
# )
# } else {
# cat(crayon::green("✓ Local EMU-webApp found! Setting as default now!\n"))
# }
#
# Set EMU-webApp directory ----
#
# The following sets the directory from which the EMU-webApp is launched to
# ~/EWA/.
#
# options(emuR.emuWebApp.dir = ewa_dir)
# Load the alb-ipa emuDB ----
alb_ipa <- "./data/alb-ipa_emuDB"
cat(crayon::green("✓ Loading alb-ipa_emuDB...\n"))
alb_ipa_db <- emuR::load_emuDB(alb_ipa)
# Function to serve the alb-ipa emuDB ----
serve_albDB <- function() {
serve(alb_ipa_db)
}