-
Notifications
You must be signed in to change notification settings - Fork 2
/
1_cmd_jcss_packages.R
47 lines (39 loc) · 1.69 KB
/
1_cmd_jcss_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
##-----------------------------------------------------------------------------
# LOAD PACKAGES
##-----------------------------------------------------------------------------
# install.packages("pacman")
# install.packages("devtools")
# devtools::install_github("lionel-/ggstance")
# devtools::install_github("quanteda/quanteda.corpora")
pacman::p_load(text2vec,fasttextM,
tm, Matrix,tidytext,
textstem,dplyr,
tidyverse,textclean,
quanteda.corpora,
stringr,extrafont,
ggplot2,ggrepel,
gutenbergr,ggstance,
ggpubr,GGally,
install=TRUE)
# forcats
# reshape2
# for plot aesthetics
# devtools::install_github("UrbanInstitute/urbnthemes")
# Mac users will probably need to install the Lato font.
# After the font is installed and you run the library(urbnthemes)
# line, run this: urbnthemes::lato_install()
# (see https://github.com/UI-Research/urbnthemes).
library(urbnthemes)
set_urbn_defaults()
## Download the fasttext word embeddings dataset:
## https://fasttext.cc/docs/en/english-vectors.html
## we are using the fasttextM package.
# devtools::install_github("statsmaths/fasttextM")
## This only needs to be done once. We recommend at least 1000mb.
# ft_download_model("en", mb = 3000)
## To load this locally downloaded set run this:
ft_load_model("en")
## load CMD function
source("1_FINAL_CMD_Function.R")
##-----------------------------------------------------------------------------
## END ##