As client, I'd like part 3 : generate graphs of the flat_main to be a documented and tested function, so that I can guarantee its outputs, whatever changes in the packages
Client - Validation
[x] There is a function with all parameters needed, which returns outputs of _part 3:generatgraphs as one object (a list)
[x] Transform code of the anonymous chunk as a function: Use the RStudio tool to do it:
Select code as is (without function()) => Go to Menu "Code" > Extract Function. Give the function a name, all variables should be extracted. You can try with a simple example like: print(toto)
[x] Get all necessary outputs as a list()
Discover outputs by running the next chunk, so that we only get necessary outputs.
The lists of outputs
outputs <- ma_function_prep( return(list(nom = contenu, nom2 = contenu2)))
saveRDS(outputs, "outputs_part1.rds") # in FISHMAP_OUTPUT
toto <- outputs[["toto"]]
As client, I'd like part 3 : generate graphs of the flat_main to be a documented and tested function, so that I can guarantee its outputs, whatever changes in the packages
Client - Validation
...
=> https://github.com/balglave/FishMap/blob/main/R/fm_generate_graphs.R
=> https://github.com/balglave/FishMap/blob/main/tests/testthat/test-fm_generate_graphs.R
=> https://balglave.github.io/FishMap/articles/running-fishmap.html
=> Link: https://app.codecov.io/gh/balglave/FishMap/tree/main/R
Dev - Tech
function()
) => Go to Menu "Code" > Extract Function. Give the function a name, all variables should be extracted. You can try with a simple example like:print(toto)