<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style='font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;'><div>Hi,<br></div><div><br></div><div>The units in the panels in ggplotFL were added quite some time ago. Take a quick look at the units in your slots with<br></div><div><br></div><div>summary(stock)<br></div><div><br></div><div>try changing those 'thousands' in stock.n for '1000' or '1e3', and see where that NA comes from. Maybe m.spwn or harvest.spwn, which should have units="". With those, ssb() comes with units='t', as when you do<br></div><div><br></div><div>units(FLQuant(units='1000') * FLQuant(units='kg'))<br></div><div><br></div><div>ssb is the result of a method, not a slot, so there is not units to be changed. Rather it is generated from the slots used in the calculation.<br></div><div><br></div><div>Also, if the units in stock are meant to be the same as ple4 (1000 for the *.n slots, kg for *.wt, "" for mat, m.spwn and harvest.spwn, "f" for harvest) you can do<br></div><div><br></div><div>units(stock)  <- units(ple4)<br></div><div><br></div><div>Let me know how it goes. Cheers,<br></div><div><br></div><div><br></div><div>Iago<br></div><div><br></div><div class="zmail_extra"><div id="Zm-_Id_-Sgn1"><div><br></div><div>---- On Fri, 08 Dec 2017 17:45:33 +0400 <b>Clara Ulrich <clu@aqua.dtu.dk></b> wrote ----<br></div></div><div><br></div><blockquote style="border-left: 1px solid #cccccc; padding-left: 6px; margin:0 0 0 5px"><div lang="DA"><div><p class="MsoNormal">Hi all,<br></p><p class="MsoNormal"> <br></p><p class="MsoNormal"><span>Brief question, it seems to me that the default stock plot in ggplotFL has changed in the most recent FLCore update, with the units now appearing on the panel title. This fails for the SSB panel on my stocks, because  of the units:</span><br></p><p class="MsoNormal"><span> </span><br></p><p class="MsoNormal"><span>> ssb(stock)</span><br></p><p class="MsoNormal"><span>An object of class "FLQuant"</span><br></p><p class="MsoNormal"><span>, , unit = unique, season = all, area = unique</span><br></p><p class="MsoNormal"><span>     year</span><br></p><p class="MsoNormal"><span>age   2012   2013   2014   2015   2016 </span><br></p><p class="MsoNormal"><span>  all 605787 694432 809921 770556 836066</span><br></p><p class="MsoNormal"><span> </span><br></p><p class="MsoNormal"><span>units:  1 * thousands 1 *  1 * kg 1 * NA</span><br></p><p class="MsoNormal"><span> </span><br></p><p class="MsoNormal"><span>> units(ssb(stock))</span><br></p><p class="MsoNormal"><span>[1] "1 * thousands" "1 * "          "1 * kg"        "1 * NA"      </span><br></p><p class="MsoNormal"><span>> units(ssb(ple4))</span><br></p><p class="MsoNormal"><span>[1] "t"</span><br></p><p class="MsoNormal"><span> </span><br></p><p class="MsoNormal"><span>How does this work for ple4, to force the unit of the ssb function, as it is not a slot?</span><br></p><p class="MsoNormal"><span>Thanks</span><br></p><p class="MsoNormal"><span>Clara</span><br></p><p class="MsoNormal"><span> </span><br></p><p class="MsoNormal"><span> </span><br></p><p class="MsoNormal"><span> </span><br></p></div><div>_______________________________________________<br></div><div>flr-list mailing list <br></div><div><a href="mailto:flr-list@flr-project.org">flr-list@flr-project.org</a> <br></div><div><a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/flr-list">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/flr-list</a> <br></div></div></blockquote></div><div><br></div></div><br></body></html>