-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.R
53 lines (41 loc) · 1.04 KB
/
template.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
# --- TIDYTUESDAY::YYYY§WW --- #
# https://github.com/rfordatascience/tidytuesday/tree/master/data/2024/...
# library path
.libPaths(c("~/.R/x86_64-pc-linux-gnu-library/4.4", .libPaths()))
# packages
pacman::p_load(
data.table, # https://cran.r-project.org/web/packages/data.table/
janitor, # https://cran.r-project.org/web/packages/janitor/
skimr, # https://cran.r-project.org/web/packages/skimr/
styler, # https://cran.r-project.org/web/packages/styler/
tidyverse # https://cran.r-project.org/web/packages/tidyverse/
)
# Import ----
df <-
fread(
'link.csv'
) |>
clean_names()
# dictionary
# https://raw.
# Understand ----
# names
df |>
slice(0) |>
glimpse()
# glimpse & skim
df |>
glimpse() |>
skim()
# tokenize
# df |>
# unnest_tokens(output = word, input = variable) |>
# anti_join(stop_words, by = "word") |>
# group_by(word) |>
# summarise(n = n()) |>
# arrange(desc(n))
# transform ----
# visualise ----
# model ----
# Communicate ----
# ...