mirror of
https://gitlab.com/manzerbredes/loosely-coupled-dss.git
synced 2025-04-06 03:26:24 +02:00
17 lines
652 B
R
17 lines
652 B
R
library("tidyverse")
|
|
library("knitr")
|
|
|
|
data=read_csv("results.csv")
|
|
|
|
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)
|
|
|
|
for(wake in unique(data$wakeupfor)){
|
|
print(kable(final%>%filter(wireless=="lora",wakeupfor==wake)))
|
|
print(kable(final%>%filter(wireless!="lora",wakeupfor==wake)))
|
|
}
|