bcgov / ssdtools

An R package to fit and plot Species Sensitivity Distributions (SSDs)
https://bcgov.github.io/ssdtools/
Apache License 2.0
31 stars 16 forks source link

Implement [<- and [[<- operators for fitted distributions #230

Open joethorley opened 3 years ago

joethorley commented 3 years ago

Example code

x<-fit.list[[1]]
dist.list <- x
d<-dist.list[[1]]
pvals.vec <- c(1,5,10,20)
ssd_hc(d, percent=pvals.vec)
I get:
Error in UseMethod("ssd_hc") :
  no applicable method for 'ssd_hc' applied to an object of class "tmbfit"
(fit list as a list of ssdtools@tbmtools fitted models to all the simulated datasets)
joethorley commented 3 years ago

[<- should return fitdist object [[<- should return tmbfit object and I'm thinking $ should be same as [<- unless name of parameter values?

joethorley commented 3 years ago

Actually I think $ should be [[<-