[FLR-list] bug in areaSums()
Iago MOSQUEIRA (JRC)
iago.mosqueira-sanchez at jrc.ec.europa.eu
Thu Aug 8 15:26:48 CEST 2013
On 07/31/2013 04:53 PM, Hintzen, Niels wrote:
> Hi,
>
>
>
> Using FLCore under R2.13.2 on windows machine under 32 bits. Version
> 2.4, build 2011-10-05 12:21:01, and I just came across a bug I assume in
> areaSums()
>
>
>
> The function sums over area but also over iters, while that should not
> be the case.
>
>
>
> See e.g.
>
>
>
> library(FLCore)
>
> data(ple4)
>
>
>
> dmns <- dimnames(ple4 at stock.n)
>
> dmns$area <- 1:3
>
> ple <- FLStock(stock.n=FLQuant(dimnames=dmns))
>
> for(iArea in dmns$area)
>
> ple[,,,,iArea] <- ple4
>
> ple <- propagate(ple,iter=10)
>
>
>
> dim(ple at harvest) #still 10 iters
>
> dim(areaSums(ple at harvest)) #only 1 iter...
>
>
>
>
>
> Is this solved in later versions already, because then I’ll fix it for
> my own code for now.
>
>
>
> Cheers, Niels
Hi,
Yes, this has been fixed in the development version now at
https://github.com/flr/FLCore
> dim(ple at harvest) #still 10 iters
[1] 10 52 1 1 3 10
> dim(areaSums(ple at harvest)) #only 1 iter...
[1] 10 52 1 1 1 10
Thanks,
Iago
--
Dr Iago Mosqueira
European Commission – Joint Research Center
Institute for the Protection and Security of the Citizen (IPSC)
Maritime Affairs Unit FISHREG – Scientific Support to Fisheries
TP 051, Via Enrico Fermi 2749
I-21027 Ispra (VA), Italy
Office : +39 0332 785413
Fax: +39 0332 789658
iago.mosqueira at jrc.ec.europa.eu
http://fishreg.jrc.ec.europa.eu/home
More information about the flr-list
mailing list