-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.Rhistory
59 lines (59 loc) · 2.52 KB
/
.Rhistory
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
#' @export
library(devtools)
library(roxygen2)
roxygenise()
devtools::install_github("zxs132/LDN")
library(LDN)
?LDN::compute_test
######################
# Internet addiction #
######################
ia_test_data <- read.csv("test_data.csv")
setwd("~/Desktop/Yonsei/Research/Longitudinal dependency network")
######################
# Internet addiction #
######################
ia_test_data <- read.csv("test_data.csv")
setwd("~/Desktop/Yonsei/Research/Longitudinal dependency network/LDN")
######################
# Internet addiction #
######################
ia_test_data <- read.csv("test_data.csv")
setwd("~/Desktop/Yonsei/Research/Longitudinal dependency network")
######################
# Internet addiction #
######################
ia_test_data <- read.csv("LDN/data/test_data.csv")
ia_test1 <- data_reshape(test_data, time_dep = c("mdep", "IA", "smart", "happy", "sleep", "health", "CBCL",
"family", "income", "empstatus"),
time_indep = c("peridep", "gender"), year = "year", id = "N_ID")
source("LDN.R")
ia_test1 <- data_reshape(test_data, time_dep = c("mdep", "IA", "smart", "happy", "sleep", "health", "CBCL",
"family", "income", "empstatus"),
time_indep = c("peridep", "gender"), year = "year", id = "N_ID")
ia_test1 <- data_reshape(ia_test_data, time_dep = c("mdep", "IA", "smart", "happy", "sleep", "health", "CBCL",
"family", "income", "empstatus"),
time_indep = c("peridep", "gender"), year = "year", id = "N_ID")
ia_test2 <- compute_test(ia_test1)
?ranger
setwd("~/Desktop/Yonsei/Research/Longitudinal dependency network")
source("LDN.R")
######################
# Internet addiction #
######################
ia_test_data <- read.csv("LDN/data/test_data.csv")
ia_test1 <- data_reshape(ia_test_data, time_dep = c("mdep", "IA", "smart", "happy", "sleep", "health", "CBCL",
"family", "income", "empstatus"),
time_indep = c("peridep", "gender"), year = "year", id = "N_ID")
View(ia_test1$data)
ia_test2 <- compute_test(ia_test1)
color_brewer <- RColorBrewer::brewer.pal(8, "Pastel1")
visualize(ia_test2, color = color_brewer[1:3])
qol_test_data <- read.table("test_data_2.csv", sep = ",", header = TRUE)
qol_test_data <- read.table("LDN/data/test_data_2.csv", sep = ",", header = TRUE)
qol_test1 <- data_reshape(qol_test_data, time_dep = c("score", "education", "income", "marriage", "area", "injurytype", "smoking", "drinking"),
time_indep = c("employment_after_injury", "gender"), year = "year", id = "ID")
View(qol_test1$data)
qol_test2 <- compute_test(qol_test1)
color_brewer <- RColorBrewer::brewer.pal(8, "Pastel1")
visualize(qol_test2, color = color_brewer[1:5])