FLR

| Tasklist |

FS#12 - FLEDA brp(FLBRP) breaks

Attached to Project: FLR
Opened by Niels Hintzen (niels.hintzen) - Monday, 09 March 2009, 13:42 GMT+2
Last edited by Iago Mosqueira (imosqueira) - Wednesday, 25 March 2009, 11:29 GMT+2
Task Type Bug Report
Package FLBRP
Status Assigned
Assigned To Iago Mosqueira (imosqueira)
Operating System All
Severity Medium
Priority Normal
Reported Version 2.0
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

--error message at bottom--

R.2.8.1
FLCore 2.0 Packaged: Wed Feb 18 09:24:52 2009; mpa
FLBRP 2.0 Packaged: Thu Mar 5 14:57:39 2009; LTK00

library(FLCore)
library(FLBRP)

data(ple4)
bevholtfactor <- 100000
ple4.sr <- fmle(as.FLSR(transform(ple4, stock.n = ple4@stock.n/bevholtfactor),model="bevholt"))
ple4.sr@params <- ple4.sr@params * bevholtfactor

rpts<-refpts()[4:5,]
dimnames(rpts)[[1]][2] <- "crash"

ple4.brp <- brp(FLBRP(ple4,sr=ple4.sr,fbar=seq(0,1,length.out=100),nyrs=35,refpts=rpts))
#Error in obj@range[["minyear"]] : subscript out of bounds
This task depends upon

Comment by Iago Mosqueira (imosqueira) - Wednesday, 25 March 2009, 10:59 GMT+2
This seems to work now with the new FLBRP creator, uploaded a couple of weeks ago:
library(FLBRP)

data(ple4)
bevholtfactor <- 100000
ple4.sr <- fmle(as.FLSR(transform(ple4, stock.n = ple4@stock.n/bevholtfactor),
model="bevholt"))
ple4.sr@params <- ple4.sr@params * bevholtfactor

rpts<-refpts()[4:5,]
dimnames(rpts)[[1]][2] <- "crash"

ple4.brp <- brp(FLBRP(ple4,sr=ple4.sr,fbar=seq(0,1,length.out=100),refpts=rpts))

The nyrs argument in FLBRP needs to be deleted in the call. If you want less years to be used when constructing the FLBRp object from an FLStock, they need to be selected in the inpout object, using window or '['.

I will close this bug unless it is found to persist in other settings.
Comment by william (william) - Thursday, 15 October 2009, 08:48 GMT+2
data(ple4)
bevholtfactor <- 100000
ple4.sr <- fmle(as.FLSR(transform(ple4, stock.n = ple4@stock.n/bevholtfactor),model="bevholt"))
ple4.sr@params <- ple4.sr@params * bevholtfactor
I cant under stand this.Please help me about that matter.Thanks...I am william from a <a href="http://www.mostaccepted.co.uk">credit cards</a> company.
Comment by william (william) - Thursday, 15 October 2009, 08:48 GMT+2
data(ple4)
bevholtfactor <- 100000
ple4.sr <- fmle(as.FLSR(transform(ple4, stock.n = ple4@stock.n/bevholtfactor),model="bevholt"))
ple4.sr@params <- ple4.sr@params * bevholtfactor
I cant under stand this.Please help me about that matter.Thanks...I am william from a [url=http://www.getplastic.co.uk]credit cards[/url]
company.

Loading...