[FLR-list] problem to create a FLStock object

Iago Mosqueira iago.mosqueira at gmail.com
Sat Apr 19 23:06:55 CEST 2014


Hi,

I am afraid some material is in need of review.

Please try this:

# Create an empty FLQuant but of the right size, change values below

flq <- FLQuant(NA, dimnames=list(year=1980:2010, age=1:10))

# Now the FLStock will get the dimensions from this FLQuant

sol <- FLStock(flq)

# or if you have loaded on it the data for, for example, catch.n

sol <- FLStock(catch.n = flq)


> sol <- FLStock(iniFLQuant=sol)

but iniFLQuant is not a named slot in FLStock

Best,


Iago


On 04/18/2014 11:32 AM, Muriel LISSARDY wrote:
> Hi,
> 
> I work at Ifremer and I am responsible for sole in the Bay of Biscay for
> the ICES / WGBIE.
> I need to create a FLStock object (to use the EqSim software), I went to
> the web site (How to create an FLStock object):
> http://flr-project.org/doku.php?id=courses:fisboat_ijmuiden:beginners:ind_data
> 
> 
> I tried with R 3.0.2 (64bits):
> # Load the FLCore library
> library(FLCore)
> 
> # Create the FLQuant object
> sol <- FLQuant(quant='age')
> 
> #We can now transform the FLQuant object into an FLStock object.
> 
> sol <- FLStock(iniFLQuant=sol)
> 
> But I have this error message:
>> sol <- FLStock(FLQuant=sol)
> Erreur dans checkSlotAssignment(object, name, value) :
> ‘FLQuant’ is not a slot in class “FLStock”
> 
> Can you help me please?
> Thank you.
> Best regards,
> 
 Muriel Lissardy
> 



More information about the flr-list mailing list