-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackages.R
96 lines (75 loc) · 1.49 KB
/
packages.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
86
87
88
89
90
91
92
93
94
95
96
#Libraries
if(!require(tidyverse)){
install.packages("tidyverse")
library(tidyverse)
}
if(!require(jsonlite)){
install.packages("jsonlite")
library(jsonlite)
}
if(!require("jpeg")){
install.packages("jpeg")
library("jpeg")
}
if(!require(utf8)){
install.packages("utf8")
library(utf8)
}
if(!require(RedditExtractoR)){
install.packages("RedditExtractoR")
library(RedditExtractoR)
}
if(!require(RSelenium)){
install.packages("RSelenium")
library(RSelenium)
}
if(!require(xml2)){
install.packages("xml2")
library(xml2)
}
if(!require(rvest)){
install.packages("rvest")
library(rvest)
}
if(!require(lubridate)){
install.packages("lubridate")
library(lubridate)
}
if(!require(tidytext)){
install.packages("tidytext")
library(tidytext)
}
if(!require(mongolite)){
install.packages("mongolite")
library(mongolite)
}
if(!require(cld3)){
install.packages("cld3")
library(cld3)
}
if(!require(reticulate)){
install.packages("reticulate")
library(reticulate)
}
if(!require(rredis)){
install.packages("rredis")
library(rredis)
}
if(!require(data.table)){
install.packages("data.table")
library(data.table)
}
# Set path to python executable
if (dir.exists("output")) {
print('Directory "output" already exists.')
} else {
dir.create("output")
print('Directory "output" created.')
}
if (dir.exists("output/temp")) {
print('Directory "temp" already exists.')
} else {
dir.create("output/temp")
print('Directory "temp" created.')
}
options(scipen = 1000)