-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlotProfiling.R
More file actions
41 lines (31 loc) · 1.28 KB
/
PlotProfiling.R
File metadata and controls
41 lines (31 loc) · 1.28 KB
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
library(profr)
# Profile the code
summary <- parse_rprof("~/EddieDir/Honeybees/SloSpatialSimulation/Spatial_NoLoc_554/CreateMultiColony.out", interval = 0.02)
ggplot.profr(summary, minlabel = 0.2)
# Summarise cross
crossOut <- summaryRprof("~/EddieDir/Honeybees/SloSpatialSimulation/Spatial_NoLoc_554/Cross.out")
# Plot
crossOut$by.self %>%
filter(self.pct > 1) %>%
mutate(Function = reorder(rownames(.), -self.pct)) %>%
ggplot(aes( x= Function, y = self.pct)) +
geom_col() +
theme(axis.text.x = element_text(angle = 75, hjust = 1, size = 18))
# Summarise create initial colonies
createOut <- summaryRprof("~/EddieDir/Honeybees/SloSpatialSimulation/Spatial_NoLoc_554/CreateMultiColony.out")
# Plot
createOut$by.self %>%
filter(self.pct > 5) %>%
mutate(Function = reorder(rownames(.), -self.pct)) %>%
ggplot(aes( x= Function, y = self.pct)) +
geom_col() +
theme(axis.text.x = element_text(angle = 75, hjust = 1, size = 18))
# Summarise everything
allOut <- summaryRprof("~/EddieDir/Honeybees/SloSpatialSimulation/Spatial_NoLoc_554/")
# Plot
createOut$by.self %>%
filter(self.pct > 5) %>%
mutate(Function = reorder(rownames(.), -self.pct)) %>%
ggplot(aes( x= Function, y = self.pct)) +
geom_col() +
theme(axis.text.x = element_text(angle = 75, hjust = 1, size = 18))