Skip to content

Commit 0f79b09

Browse files
authored
Add a plot. (#25)
1 parent 6e7f2f3 commit 0f79b09

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,10 @@
22

33
Exploring the spectra of maximal partial Room squares in R using the wallis package.
44

5+
## Plot
6+
7+
![](png/plot-results.png)
8+
9+
## Table
10+
511
![](png/final-results.png)

_targets.R

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
library(targets)
22

33
tar_option_set(
4-
packages = c("dplyr", "flextable", "here", "purrr", "readr", "tibble", "tidyr", "wallis"),
4+
packages = c("dplyr", "flextable", "ggplot2", "here", "purrr", "readr", "tibble", "tidyr", "wallis"),
55
format = "rds",
66
memory = "transient",
77
garbage_collection = TRUE
@@ -44,6 +44,18 @@ list(
4444
select(n, t1, t2, r1, r2)
4545
}
4646
),
47+
tar_target(
48+
name = plot_results,
49+
command = {
50+
ggplot(results, aes(n, volume, colour = name)) +
51+
geom_line() +
52+
theme_bw() +
53+
theme(
54+
legend.position = "bottom",
55+
legend.title = element_blank()
56+
)
57+
}
58+
),
4759
tar_target(
4860
name = final_results_as_flextable,
4961
command = {
@@ -55,6 +67,10 @@ list(
5567
flextable(final_results)
5668
}
5769
),
70+
tar_target(
71+
name = save_plot_results,
72+
command = ggsave(plot = plot_results, filename = "png/plot-results.png", height = 1000, width = 1200, units = "px")
73+
),
5874
tar_target(
5975
name = save_as_png,
6076
command = save_as_image(final_results_as_flextable, path = "png/final-results.png")

_targets/meta/meta

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
name|type|data|command|depend|seed|path|time|size|bytes|format|repository|iteration|parent|children|seconds|warnings|error
2-
.Random.seed|object|f4c6c24a41abd409|||||||||||||||
2+
.Random.seed|object|818746498bfabffd|||||||||||||||
33
final_results|stem|4896116a45bb3e4a|a63eb843b5558c8a|22ab70a8ea29e022|-1928978403||t19928.6296229904s|5c60d10b4e181301|1081|rds|local|vector|||0.012||
44
final_results_as_flextable|stem|112f6e1cdad97634|b0cb751ae07fedf6|2a1abd2297662430|1369938987||t19928.6296254905s|7182cde377769133|7500|rds|local|vector|||0.07||
55
greedy1|function|0e99b3b300a1c404|||||||||||||||
66
greedy2|function|057b89f6773fb4d4|||||||||||||||
77
orders|stem|bf6392dd0e277989|48b14b0ed924f539|2c530c1562a7fbd1|807163747||t19928.611425515s|c33c60f7554ab437|137|rds|local|vector||orders_1f35528bd840b63d*orders_195dadb6d6a0c78f*orders_0daafb990c5993f9*orders_cc74994856042732*orders_d516855f98da7f3d*orders_bfdfb93adc61812f*orders_f5ad5e71973196ef*orders_1c7a09e5108e897f*orders_aa1e09b89e211016*orders_6347f0df4a6e5234*orders_557d54830fc201b3*orders_8fcab20d0358681b*orders_7107feb584630f9c*orders_facd42dbb2b738e1*orders_eced30da0c13a5bf*orders_10d4c57f141ad2c3*orders_209e32b299cc056e*orders_b66f5f232b42832a*orders_28e76c0917097715*orders_a76bc12e314e25eb*orders_982c173ba6de0b8b*orders_d21be8cf0dd771ce*orders_c3d3b541ede7844e*orders_ba41eabafff2540f*orders_4b5db3c5a8219e22*orders_b2d5d26f8983d7ae*orders_03d0c2cbf5aa332b*orders_a1d6ca5c0c2596ab*orders_86c36464e2e2a367*orders_5af7efb62b7d05c3*orders_08ec9a1d380611bb*orders_0f5cc5be67b9db73*orders_7b8a7f5d937ff9ae*orders_6dba06bb5782f84f*orders_580e0375f1117643*orders_3ed5ce5eeeea6e9a*orders_4be831169559909a*orders_e12065d620e41fd5*orders_d22c29dc585b97b0*orders_87bbe5f41aaaedf6|0.452||
8+
plot_results|stem|90fcd46f411dada5|13eb7567b5a1a224|22ab70a8ea29e022|-1462503952||t19929.401726685s|d152657a0ee8979f|1054842|rds|local|vector|||0.012||
89
results|pattern|40ace0e3722a0618|b1e7525f605b0d9d||-322906963||||17416|rds|local|vector||results_113ae8b0e63b1192*results_37914fd44e0c4950*results_b0a9eaed475d3035*results_a3b763368c2325b9*results_9365b9df3c182f6e*results_1a9c69f5812bb0d2*results_73c3d2f0f48c20dc*results_8b5f7c1fbffebe25*results_98739f5256618dec*results_95ee59a58f992ff5*results_174ccff3fac7772a*results_a55dfc17619144df*results_0e28f9e44f1da8cc*results_661e2b01a04981de*results_e2c84fdfb01a558d*results_221d11ec14c0925d*results_5e46cd7274e0ed9d*results_01141213e9285eaf*results_518a8227b2136774*results_6621c61cc4143045*results_a4230f4c7843e9e8*results_4b07b784f0378ebb*results_ddf0265458c7b9cf*results_4d084fbf4f91b2b3*results_2d98c95cdedeb9b4*results_c90230df7f42d892*results_8477264695912511*results_14ee9c221b3cb0de*results_483f8c02071dc6ab*results_8582204f1e3c8376*results_c67b27f48388a9e4*results_fcfce927ee3b31d3*results_d61cc176439eb8ac*results_e30df3fdaeed31b0*results_e7adb009cbfbf77b*results_8bd5e2d364ee5f4d*results_6f9effadfa560c6f*results_ca4984685f3fd9ad*results_f49e0979a0802263*results_20c1a6119b50adae|1571.836||
910
results_01141213e9285eaf|branch|a0f974df22628050|b1e7525f605b0d9d|2b09d25573589126|632314704||t19927.7391535529s|6f9bf613989b54f1|3867|rds|local|vector|results||41.002||
1011
results_0e28f9e44f1da8cc|branch|3d46b5f1594bf0fe|b1e7525f605b0d9d|2b09d25573589126|-1530542237||t19927.7376108047s|b5302ce55dcf6817|2137|rds|local|vector|results||11.656||
@@ -47,3 +48,4 @@ results_e7adb009cbfbf77b|branch|2789b82b40e4b315|b1e7525f605b0d9d|2b09d255735891
4748
results_f49e0979a0802263|branch|612ebc4f46179ab5|b1e7525f605b0d9d|2b09d25573589126|-1480812338||t19928.5894063668s|344cffcf71547584|16680|rds|local|vector|results||1348.153||
4849
results_fcfce927ee3b31d3|branch|5c271690894e581d|b1e7525f605b0d9d|2b09d25573589126|-879381640||t19928.3282232678s|699f9881b140834b|11182|rds|local|vector|results||510.816||
4950
save_as_png|stem|8d777dd323cd4b63|bc6e563aad946edc|9a22682e596ad081|1119836695||t19928.6296440102s|e7b83425a991cb39|73|rds|local|vector|||1.468||
51+
save_plot_results|stem|36e1d691ea11afff|7be8bb8333a344d0|ce24d6b0086dc39d|1011128728||t19929.4035722847s|3ed5ce5eeeea6e9a|72|rds|local|vector|||0.2||

png/plot-results.png

69.2 KB
Loading

0 commit comments

Comments
 (0)