loosely-coupled-dss-extended/results/analysis.R

18 lines
652 B
R
Raw Normal View History

2021-05-08 21:38:26 +02:00
library("tidyverse")
2021-05-10 10:33:11 +02:00
library("knitr")
2021-05-08 21:38:26 +02:00
data=read_csv("results.csv")
2021-05-10 10:33:11 +02:00
final=data%>%group_by(simkey,wireless,wakeupfor)%>%summarize(energy=mean(energy),wireless=first(wireless),sd=sd(energy),wakeupfor=first(wakeupfor))
ggplot(final,aes(x=simkey,y=energy))+
geom_bar(stat="identity",aes(fill=wireless),position=position_dodge())+
xlab("Scenarios")+ylab("Energy (J)")+
geom_errorbar(aes(ymin=energy-sd, ymax=energy+sd),width=.2,size=1.5) +
facet_wrap(~ wakeupfor)
2021-05-08 21:38:26 +02:00
2021-05-10 10:33:11 +02:00
for(wake in unique(data$wakeupfor)){
print(kable(final%>%filter(wireless=="lora",wakeupfor==wake)))
print(kable(final%>%filter(wireless!="lora",wakeupfor==wake)))
}