From 58ab7e93e4118a0bd04c32e385e7a81c75d97c3b Mon Sep 17 00:00:00 2001 From: Francis Banville Date: Mon, 7 Dec 2020 13:39:47 -0500 Subject: [PATCH] :memo: update example --- docs/src/examples/integration_mangal.md | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/docs/src/examples/integration_mangal.md b/docs/src/examples/integration_mangal.md index 92570cc8c..1772eb814 100644 --- a/docs/src/examples/integration_mangal.md +++ b/docs/src/examples/integration_mangal.md @@ -46,20 +46,12 @@ foodwebs = mangal_networks[mangal_networks[!, :pred] .+ mangal_networks[!, :herb first(foodwebs, 5) ``` -To analyse their properties, we first need to read all of these food webs using the `Mangal.jl` package, and then convert them to UnipartiteNetworks, when possible, using the `EcologicalNetworks.jl` package. We end up with 241 unipartite food webs. +To analyse their properties, we first need to read all of these food webs using the `Mangal.jl` package, and then convert them to UnipartiteNetworks using the `EcologicalNetworks.jl` package. ```@example mangal mangal_foodwebs = network.(foodwebs.id) -unipartite_foodwebs = [] - -for i in eachindex(mangal_foodwebs) - try - unipartite_foodweb = convert(UnipartiteNetwork, mangal_foodwebs[i]) - push!(unipartite_foodwebs, unipartite_foodweb) - catch - end -end +unipartite_foodwebs = convert.(UnipartiteNetwork, mangal_foodwebs) unipartite_foodwebs[1:5] ```