-
Notifications
You must be signed in to change notification settings - Fork 0
/
user_profile.R
51 lines (39 loc) · 1.43 KB
/
user_profile.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
#-------------------------------------------------------------------
# Project: RPJ paper
# Organization: SFedU Future Skills Research Lab
# Author: Valeria Egorova
# Date: 16 June 2024
#-------------------------------------------------------------------
# set working directories and all directories
# this is the profile for the RPJ paper
# this profile should be loaded before running any other script
# for Windows
USERNAME <- Sys.getenv("USERNAME")
# for Mac
USER <- Sys.getenv("USER")
#version from everyone, the profile works for everyone
if (USERNAME == "Админ") {
projectFolder <- getwd()
}
if (USERNAME == "Valery") {
projectFolder <- getwd()
}
if (USER == "Админ") {
projectFolder <- getwd()
}
# confirm that the main directory is correct
# check if the folders exist
stopifnot(dir.exists(projectFolder))
# set up key folders
documentation <- file.path(projectFolder, "00_documentation")
inputData <- file.path(projectFolder, "01_input_data")
rcodes <- file.path(projectFolder, "02_codes")
outData <- file.path(projectFolder, "03_outputs/0301_data")
outTables <- file.path(projectFolder, "03_outputs/0302_tables")
outFigures <- file.path(projectFolder, "03_outputs/0303_figures")
stopifnot(dir.exists(documentation))
stopifnot(dir.exists(inputData))
stopifnot(dir.exists(rcodes))
stopifnot(dir.exists(outData))
stopifnot(dir.exists(outTables))
stopifnot(dir.exists(outFigures))