-
Notifications
You must be signed in to change notification settings - Fork 1
/
.Rhistory
38 lines (38 loc) · 911 Bytes
/
.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
a <- 5L
class(a)
q()
install.packages("rjson")
ls
install.packages('rjson')
library('rjson')
install.packages("rjson")
library("rjson")
installed.packages()
setwd("D:/zhangyao/_lessons_3A/算法博弈导论/project/repo/mpd")
#N <- 12
#ROUND <- 80
Plist <- c("10", "9", "8", "7", "6", "5", "4", "3", "2", "1", "0")
PTlist <- c("9", "8", "7", "6", "5", "4", "3", "2", "1")
folder <- "RandvsConst_12_5_80"
for (P in Plist) {
for (PT in PTlist) {
rawjson <- rjson::fromJSON(file =
paste("data/",folder,"/points_",
P,"_",PT,".json", sep=""))
rawpjson <- rjson::fromJSON(file =
paste("data/",folder,"/pointsp_",
P,"_",PT,".json", sep=""))
Data <- as.data.frame(rawjson)
Datap <- as.data.frame(rawpjson)
#print(Data)
p <- ggplot2::ggplot(Datap,
ggplot2::aes(x=Round,
y=Points,
group=categ,
color=categ)
) + ggplot2::geom_line(size=1.2)
png(paste("data/",folder,"/figs/",P,"_",PT,".png",sep=""))
plot(p)
dev.off()
}
}