Closed esanchezll closed 8 years ago
la2 is defined for a single FLIndex
> showMethods('l2a')
Function: l2a (package FLa4a)
object="FLIndex", model="a4aGr"
object="FLQuant", model="a4aGr"
object="FLStockLen", model="a4aGr"
so try calling it on each element, or use lapply
, as in (untested)
lapply(HKE.idx, l2a, vbTriSmall, n=10)
Everything solved with lapply!
Thanks a lot @iagomosqueira !
Hello all,
I'm trying to convert from length to age based data (using the l2a method).
I'm new in this kind of analysis, so I am following the a4a draft manual, 2004 to reach my objective.
The problem it's that the program returns me an error...
...when I have to convert my FLIndex.
It is the code of this part:
vbTriSmall <- mvrtriangle(10, vbObj, paramMargins=triPars)
cth.n <- l2a(catch.n(HKE.stk), vbTriSmall)
aStk <- l2a(cth.n, vbTriSmall)
aIdx <- l2a(HKE.idx, vbTriSmall,10)
`#Error in (function (classes, fdef, mtable) :unable to find an inherited method for function ‘l2a’ for signature ‘"FLIndices", "a4aGr"`
Do you know where is the error?
Thank you in advance,
King regards
Eduardo