<div dir="ltr">hey,<div><br></div><div>"FIT" is a list and it seems that function calls ssb and rec work:</div><div><br></div><div><div>> SRplot(FIT)</div><div>Error in split.default(X, group) : first argument must be a vector</div><div>In addition: Warning messages:</div><div>1: In max(ssb) : no non-missing arguments to max; returning -Inf</div><div>2: In max(ssb) : no non-missing arguments to max; returning -Inf</div><div>3: In max(rec * 1.5) : no non-missing arguments to max; returning -Inf</div><div><br></div><div>> class(FIT)</div><div>[1] "list"</div><div><br></div><div>> ssb(stock)</div><div>An object of class "FLQuant"</div><div>, , unit = unique, season = all, area = unique</div><div><br></div><div>.....</div><div>.....</div><div>age   1999   2000   2001   2002   2003   2004   2005   2006   2007   2008   2009   2010   2011   2012  </div><div>  all  78536  81162  83683  80683  96734 112908 127358 126181 120553 104484  92801  67499  54354  55251</div><div><br></div><div>units:  t </div><div><br></div><div>> rec(stock)</div><div><br></div><div>....</div><div>....</div><div>   year</div><div>age 1991     1992     1993     1994     1995     1996     1997     1998     1999     2000     2001     2002     2003     2004     2005    </div><div>  3  24969.8  19552.4  23778.3  16873.2  38969.7  24308.2  33472.0  12741.5  58789.8  35781.1  87950.1 105894.1  64469.1  53818.0  69512.3</div><div>   year</div><div>age 2006     2007     2008     2009     2010     2011     2012    </div><div>  3  21688.7  18407.1  32493.3  13606.6  27986.9  73259.1  28990.8</div></div><div><br></div><div>Trying to figuring out what function:</div><div> </div><div><div>FIT <- eqsr_fit(stock,</div><div>+ <span class="" style="white-space:pre">                                </span>  nsamp = 1000,</div><div>+ <span class="" style="white-space:pre">                         </span>  <a href="http://id.sr">id.sr</a> = "stock",</div><div>+ <span class="" style="white-space:pre">                           </span>  models = c("segreg"),</div><div>+ <span class="" style="white-space:pre">                               </span>  method = "Buckland")</div></div><div><br></div><div>is doing.</div><div><br></div><div>Best,</div><div>Luis</div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div><br>-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-</div>Luis Ridao Cruz<br>Faroe Marine Research Institute<br>Nóatún 1, P.O. Box 
3051<br>FO-110 Tórshavn<br>Faroe Islands<br>Tel   : (+298) 353900<br>Fax: : (+298) 353901<br>e-mail: 
<a href="mailto:luisr@hav.fo" target="_blank">luisr@hav.fo</a><br>           <a href="mailto:luridao@gmail.com" target="_blank">luridao@gmail.com</a><div>-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-<br><br></div></div></div>
<br><div class="gmail_quote">On Mon, Jan 26, 2015 at 12:22 PM, Iago MOSQUEIRA (JRC) <span dir="ltr"><<a href="mailto:iago.mosqueira@jrc.ec.europa.eu" target="_blank">iago.mosqueira@jrc.ec.europa.eu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hi,<br>
<br>
That warning by lattice has nothing to do with the units. It shows up<br>
every now and then, I will investigate it further.<br>
<span class=""><br>
>> SRplot(FIT)<br>
> Error in split.default(X, group) : first argument must be a vector<br>
> In addition: Warning messages:<br>
> 1: In max(ssb) : no non-missing arguments to max; returning -Inf<br>
> 2: In max(ssb) : no non-missing arguments to max; returning -Inf<br>
> 3: In max(rec * 1.5) : no non-missing arguments to max; returning -Inf<br>
<br>
</span>I don't know that package, but my guess is something is not right in the<br>
calculation of ssb and rec. Look at ssb(stock). What type f object is FIT?<br>
<br>
Cheers,<br>
<br>
<br>
Iago<br>
<div><div class="h5"><br>
<br>
On 26/01/15 11:27, Luis Ridao wrote:<br>
><br>
> I have changed the FLStock units to ('ple4' units):<br>
> $catch<br>
> [1] "t"<br>
><br>
> $catch.n<br>
> [1] "10^3"<br>
><br>
> $catch.wt<br>
> [1] "kg"<br>
><br>
> $discards<br>
> [1] "t"<br>
><br>
> $discards.n<br>
> [1] "10^3"<br>
><br>
> $discards.wt<br>
> [1] "kg"<br>
><br>
> $landings<br>
> [1] "t"<br>
><br>
> $landings.n<br>
> [1] "10^3"<br>
><br>
> $landings.wt<br>
> [1] "kg"<br>
><br>
> $stock<br>
> [1] "t"<br>
><br>
> $stock.n<br>
> [1] "10^3"<br>
><br>
> $stock.wt<br>
> [1] "kg"<br>
><br>
> $m<br>
> [1] "m"<br>
><br>
> $mat<br>
> [1] "NA"<br>
><br>
> $harvest<br>
> [1] "f"<br>
><br>
> $harvest.spwn<br>
> [1] "NA"<br>
><br>
> $m.spwn<br>
> [1] "NA"<br>
><br>
> The plot function does the plotting but it stills issues a warning:<br>
><br>
>> plot(stock)<br>
> Warning message:<br>
> In `[<-.factor`(`*tmp*`, ri, value = c(3, 3, 3, 3, 3, 3, 3, 3, 3,  :<br>
>   invalid factor level, NA generated<br>
><br>
><br>
> which it might trigger the error when calling the SRplot function<br>
> in "msy" package:<br>
><br>
>> SRplot(FIT)<br>
> Error in split.default(X, group) : first argument must be a vector<br>
> In addition: Warning messages:<br>
> 1: In max(ssb) : no non-missing arguments to max; returning -Inf<br>
> 2: In max(ssb) : no non-missing arguments to max; returning -Inf<br>
> 3: In max(rec * 1.5) : no non-missing arguments to max; returning -Inf<br>
><br>
> I'm just trying to make sure that the error does not come from the FLR<br>
> objects<br>
> which "msy" package makes use of.<br>
><br>
> Best,<br>
> Luis<br>
><br>
><br>
> On 01/23/2015 03:20 PM, Iago Mosqueira wrote:<br>
>> Hi,<br>
>><br>
>> The FLQuant arithmetic tries now to do something about combinations of<br>
>> units, but as you saw only issues warnings when it fails. To get it to<br>
>> work, you need to use the standard units names, which are<br>
>><br>
>> 't' instead of 'tonnes'<br>
>><br>
>> '1000' instead of 'thousands'<br>
>><br>
>> For example<br>
>><br>
>> kg * 1000 = t<br>
>><br>
>>> FLQuant(1, units='kg') * FLQuant(10, units='1000')<br>
>> An object of class "FLQuant"<br>
>> , , unit = unique, season = all, area = unique<br>
>><br>
>>       year<br>
>> quant 1<br>
>>    all 10<br>
>><br>
>> units:  t<br>
>> The warning has been taken away in recent versions, so try re-installing<br>
>> from the repository.<br>
>><br>
>> Let us know how it goes.<br>
>><br>
>> Best,<br>
>><br>
>><br>
>> Iago<br>
>><br>
>> On 23/01/15 16:13, Havstovan FAMRI wrote:<br>
>>> Hi all,<br>
>>><br>
>>> Trying to work with a FLStock object.<br>
>>> When doing a basic call like:<br>
>>><br>
>>>> plot(stock)<br>
>>> Warning messages:<br>
>>> 1: In FLCore:::uom(op, units(e1), units(e2)) :<br>
>>>    incompatible units of measurements in FLQuant objects: f + NA<br>
>>> 2: In `[<-.factor`(`*tmp*`, ri, value = c(3, 3, 3, 3, 3, 3, 3, 3, 3,  :<br>
>>>    invalid factor level, NA generated<br>
>>><br>
>>> I get the graph but the warning propagates forward to other function<br>
>>> calls<br>
>>> like<br>
>>><br>
>>> eqsr_fit(stock,.....) in packaǵe "msy":<br>
>>><br>
>>>> eqsr_fit(stock,<br>
>>> +    nsamp = 1000,<br>
>>> +    <a href="http://id.sr" target="_blank">id.sr</a> = "mystock",<br>
>>> +    models = c("segreg"),<br>
>>> +    method = "Buckland")<br>
>>><br>
>>> Warning message:<br>
>>> In FLCore:::uom(op, units(e1), units(e2)) :<br>
>>>    incompatible units of measurements in FLQuant objects: f + NA<br>
>>><br>
>>> The units in the "stock" object are:<br>
>>><br>
>>>> units(stock)<br>
>>> $catch<br>
>>> [1] "tonnes"<br>
>>><br>
>>> $catch.n<br>
>>> [1] "thousands"<br>
>>><br>
>>> $catch.wt<br>
>>> [1] "kg"<br>
>>><br>
>>> $discards<br>
>>> [1] "tonnes"<br>
>>><br>
>>> $discards.n<br>
>>> [1] "thousands"<br>
>>><br>
>>> $discards.wt<br>
>>> [1] "kg"<br>
>>><br>
>>> $landings<br>
>>> [1] "tonnes"<br>
>>><br>
>>> $landings.n<br>
>>> [1] "thousands"<br>
>>><br>
>>> $landings.wt<br>
>>> [1] "kg"<br>
>>><br>
>>> $stock<br>
>>> [1] "tonnes"<br>
>>><br>
>>> $stock.n<br>
>>> [1] "NA"<br>
>>><br>
>>> $stock.wt<br>
>>> [1] "kg"<br>
>>><br>
>>> $m<br>
>>> [1] "NA"<br>
>>><br>
>>> $mat<br>
>>> [1] "NA"<br>
>>><br>
>>> $harvest<br>
>>> [1] "f"<br>
>>><br>
>>> $harvest.spwn<br>
>>> [1] "NA"<br>
>>><br>
>>><br>
>>> I'm using:<br>
>>><br>
>>> R version 3.0.2 (2013-09-25)<br>
>>> Platform: x86_64-pc-linux-gnu (64-bit) UBUNTU<br>
>>><br>
>>> and FLCore version  FLCore_2.5.20140213<br>
>>><br>
>>><br>
>>> Thanks in advance<br>
>>><br>
>>> #######################################################<br>
>>> The full sessionInfo() is below:<br>
>>> #######################################################<br>
>>><br>
>>>> sessionInfo()<br>
>>> R version 3.0.2 (2013-09-25)<br>
>>> Platform: x86_64-pc-linux-gnu (64-bit)<br>
>>><br>
>>> locale:<br>
>>>   [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C<br>
>>> LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8<br>
>>> LC_MONETARY=en_US.UTF-8<br>
>>>   [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C<br>
>>>             LC_ADDRESS=C               LC_TELEPHONE=C<br>
>>> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C<br>
>>><br>
>>> attached base packages:<br>
>>> [1] grid      stats     graphics  grDevices utils     datasets  methods<br>
>>> base<br>
>>><br>
>>> other attached packages:<br>
>>>   [1] msy_0.1.12          stringr_0.6.2       R2admb_0.7.10<br>
>>> gridExtra_0.9.1     ggplot2_1.0.0       reshape2_1.2.2<br>
>>>   [7] scam_1.1-8          mgcv_1.7-28         nlme_3.1-113<br>
>>>   devtools_1.5        FLCore_2.5.20140213 MASS_7.3-29<br>
>>> [13] lattice_0.20-29     xtable_1.7-1        plyr_1.8.1<br>
>>><br>
>>> loaded via a namespace (and not attached):<br>
>>>   [1] colorspace_1.2-4   dichromat_2.0-0    digest_0.6.4<br>
>>> evaluate_0.5.5     formatR_0.10       gtable_0.1.2       httr_0.4<br>
>>>   [8] knitr_1.6          labeling_0.2       Matrix_1.1-2<br>
>>> memoise_0.2.1<br>
>>>       munsell_0.4.2      parallel_3.0.2     proto_0.3-10<br>
>>> [15] RColorBrewer_1.0-5 Rcpp_0.11.0        RCurl_1.95-4.3<br>
>>> scales_0.2.3<br>
>>>        splines_3.0.2      stats4_3.0.2       tools_3.0.2<br>
>>> [22] whisker_0.3-2<br>
>>><br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> flr-list mailing list<br>
>>> <a href="mailto:flr-list@flr-project.org">flr-list@flr-project.org</a><br>
>>> <a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/flr-list" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/flr-list</a><br>
>>><br>
>> _______________________________________________<br>
>> flr-list mailing list<br>
>> <a href="mailto:flr-list@flr-project.org">flr-list@flr-project.org</a><br>
>> <a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/flr-list" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/flr-list</a><br>
><br>
> _______________________________________________<br>
> flr-list mailing list<br>
> <a href="mailto:flr-list@flr-project.org">flr-list@flr-project.org</a><br>
> <a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/flr-list" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/flr-list</a><br>
<br>
<br>
</div></div>--<br>
Dr Iago Mosqueira<br>
<br>
European Commission – Joint Research Center<br>
Institute for the Protection and Security of the Citizen (IPSC)<br>
Maritime Affairs Unit G03<br>
TP 051, Via Enrico Fermi 2749<br>
I-21027 Ispra (VA), Italy<br>
<br>
Office : <a href="tel:%2B39%200332%20785413" value="+390332785413">+39 0332 785413</a><br>
Fax: <a href="tel:%2B39%200332%20789658" value="+390332789658">+39 0332 789658</a><br>
<br>
<a href="mailto:iago.mosqueira@jrc.ec.europa.eu">iago.mosqueira@jrc.ec.europa.eu</a><br>
<br>
<a href="http://fishreg.jrc.ec.europa.eu/home" target="_blank">http://fishreg.jrc.ec.europa.eu/home</a><br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
flr-list mailing list<br>
<a href="mailto:flr-list@flr-project.org">flr-list@flr-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/flr-list" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/flr-list</a><br>
</div></div></blockquote></div><br></div>