[FLR-list] trim method for stock and indices objects

Iago MOSQUEIRA (JRC) iago.mosqueira-sanchez at jrc.ec.europa.eu
Fri Apr 19 10:25:50 CEST 2013


Sorry, trim is defined for FLIndex, so you need to call it through
lapply in FLIndices


lapply(FLIndices, trim, age=4:6))



Iago

On 04/19/2013 10:09 AM, Luis Ridao wrote:
> 
> I also tried that:
> 
>> FLIndices(trim(My_indices,age=4:6))
> Error in FLIndices(trim(sai.indices, age = 4:6)) :
>   error in evaluating the argument 'object' in selecting a method for
> function 'FLIndices': Error in function (classes, fdef, mtable)  :
>   unable to find an inherited method for function "trim", for signature
> "FLIndices"
> 
> Luis
> 
> 
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> Luis Ridao Cruz
> Faroe Marine Research Institute
> Nóatún 1, P.O. Box 3051
> FO-110 Tórshavn
> Faroe Islands
> Tel   : (+298) 353900
> Fax: : (+298) 353901
> e-mail: luisr at hav.fo <mailto:luisr at hav.fo>
>            luridao at gmail.com <mailto:luridao at gmail.com>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 
> 
> 
> On Thu, Apr 18, 2013 at 6:06 PM, Iago Mosqueira
> <iago.mosqueira at gmail.com <mailto:iago.mosqueira at gmail.com>> wrote:
> 
> 
>     Hi,
> 
>     Without checking, that command is passing the age argument to window,
>     not trim. windows only takes start and end. What about
> 
>     FLIndices(trim(My_indices, age = 3:8))
> 
> 
>     Iago
> 
>     On 04/18/2013 11:21 AM, Luis Ridao wrote:
>     >
>     > FLR-help,
>     >
>     > Trying to use the "trim" function to subset a FLIndices object.
>     > but just getting errors all the way:
>     >
>     > FLIndices(trim(window(My_indices, age = 3:8)))
>     >
>     > Using R-2.14.2 and FLCore 2.4 and FLXSA 2.4
>     >
>     > Any help?
>     >
>     > Thanks in advance
>     >
>     >
>     > _______________________________________________
>     > flr-list mailing list
>     > flr-list at flr-project.org <mailto:flr-list at flr-project.org>
>     > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/flr-list
>     >
> 
> 
> 
> 
> _______________________________________________
> flr-list mailing list
> flr-list at flr-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/flr-list
> 


-- 
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