FLR

Tasklist

FS#25 - FLCohort; bugs and missing bits

Attached to Project: FLR
Opened by Laurie Kell (ltkell) - Wednesday, 17 February 2010, 09:15 GMT+2
Task Type Bug Report
Package FLCore
Status New
Assigned To Ernesto Jardim (ernesto)
Iago Mosqueira (imosqueira)
Operating System All
Severity High
Priority High
Reported Version 2.0
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

There are a few bugs in FLCohort that make it difficult to use i.e.

#1) There is no creater
flc <-FLCohort(NA,dimnames=list(age=1:10,year=1980:2000,iter=1:100))

# You can get round this by creating an FLQuant first but that is not what you need if you want to create year-class structure
# e.g. fast/slow growing cohorts
flc <-FLCohort(FLQuant(NA,dimnames=list(age=1:10,year=1980:2000,iter=1:100)))

#2) You can´t create an FLQuant from an FLCohort
flq <-FLQuant(flc)

#You can work around this by creating a data.frame first
df <-as.data.frame(flc)
df$year<-df$cohort+df$age

#3) but even though you have all the required columns in te data.frame you can´t create the FLQuant
flq <-as.FLQuant(df)

# You have to remove the redundant column, I don´t see why this be so. The redundant data should be ignored
flq <-as.FLQuant(df[,-2])

#4) There is no corresponding as.FLCohort
flc <-as.FLCohort(df[,-8])

#5) You can´t create a data.frame from an FLCohort
dfc<-data.frame(flc)


We can correct this by implementing the corresponding methods

Laurie
This task depends upon

Loading...