GithubHelp home page GithubHelp logo

sam's Issues

setup.sam.data missing checks

setup.sam.data should check that number of years and ages match what is expected ala stockassessment.org datavalidator

Release tags

Hi,

I've found these release tags helpful to reference, download, and compare versions:

  git tag  v0.9.0  df0b7c1
  git tag  v0.8.1  92aa728
  git tag  v0.8.0  1347c74
  git tag  v0.7.0  1dcf8b6
  git tag  v0.6.0  334a34b
  git tag  v0.5.5  d9a0c42
  git tag  v0.5.4  bf56f2b
  git tag  v0.5.3  02395eb
  git tag  v0.5.2  c8c940d
  git tag  v0.5.1  c460203
  git tag  v0.5.0  3c5f8dd
  git tag  v0.4.0  24081bd
  git tag  v0.3.0  186ec82
  git tag  v0.2.0  796f7c1
  git tag  v0.1.0  ea59306
  git tag  v0.0.9  5a1e1d3
  git tag  v0.05   367a8ae
  git tag  v0.04   0619022
# git tag  v0.03   16eea2a
  git tag  v0.02   cddb008
# git tag  v0.01   09f67ed

Perhaps they can be tagged in the main repository?

.plotit public

Would it make sense for the .plotit funciton to be public so that users can see the arguments (e.g. add, ci, cicol)? Alternatively, we may want to document these arguments for each of the other functions they can be used with (e.g. ssbplot)

installation issue with Windows 32-bit

I'm having a problem updating my package:

cc1plus.exe: out of memory allocating 538160 bytes
make: *** [C:/Users/taylor/DOCUME~1/R/R-36~1.3/etc/i386/Makeconf:215: stockassessment.o] Error 1
ERROR: compilation failed for package 'stockassessment'
* removing 'C:/Users/taylor/Documents/R/win-library/3.6/stockassessment'

The solution is to only install within the R 64-bit version:
devtools::install_github("fishfollower/SAM/stockassessment", INSTALL_opts=c("--no-multiarch"))

Maybe something add to the readme.

add conf checks

missing number in keyLogFsta (e.g. 0 1 3 4) causes segfault
missing number in keyCorObs causes non-positive definite Hessian
also check that obsCorStruct code matches numbers/NAs used in keyCorObs

tests with newtonsteps=0

It seems that with the argument newtonsteps=0 travis and I get different results for diag.cov, gradient, and sdrep$value. The tests pass on my Mac (where I created the expected results), so maybe it's a platform issue? Also, travis tests were passing with newtonsteps=3.

MSY function

Dear sirs,
I wonder if there is a function in the package stockassessment that enables calculating the reference points and mainly MSY.
best regards.

Load package to each node

Hi!

I need a specific version of the stockassessment package to run my analysis. I have this version installed in a project-specific library called myproject/library. Other analyses use other versions of stockassessment. To avoid confusion while working on my project, I do not have the stockassessment package installed globally. I load the correct version using the command
library(stockassessment, lib.loc="myproject/library")

I already have model.RData containing the fit object, but an error occurs when I run
retro(fit, year=4)
because it tries to load the wrong version of the stockassessment package, the global version instead of my project-specific package that is already loaded.

The source of the problem seems to be this line of code
https://github.com/fishfollower/SAM/blob/8ebd840/stockassessment/R/run.R#L170
where the jit function calls library(stockassessment) to load the package to each node.

Do you think it would be possible to implement jit without an explicit library() call? Currently, it assumes something about the user setup - that only one version of stockassessment is installed - and this assumption may not always hold.

I'll experiment a bit more with this and get back to you.

mclapply not compatible with Windows

retro and leaveout should use parLapply from the parallel package (distributed with base R). See simulate vignette for an example of how to use parLapply.

nscod test

It seems that there might be a bug in the nscod example. When I run make in that directory, I get this

Error in scan(filen, skip = 2, n = 5, quiet = TRUE) : 
  scan() expected 'a real', got 'IBTS_Q1_gam'
Calls: source -> withVisible -> eval -> eval -> read.ices -> scan
Execution halted
make: *** [all] Error 1

I didn't look into the details.

fitplot() broken

Hi,

When I run:

fit <- fitfromweb("nscod19_ass01")
fitplot(fit)

I was expecting to get a plot, but instead I get the following error:

Error in retape(set.defaults = FALSE) : 
  Error when reading the variable: 'constRecBreaks'. Please check data and parameters.
In addition: Warning message:
In retape(set.defaults = FALSE) : Expected object. Got NULL.

This is in the current version of stockassessment a233e88 (2019-10-30). When I install an old version 631fe00 (2019-03-13) the plot looks fine.

I'm running R 3.6.2 in Debian 10.

catchplot and catchscaling

catchplot function shows the unscaled catches when catch multiplier is turned on.
better option would be to show both the scaled and unscaled values in that case.

catchtable function

Is it possible to have a catchtable function included in the package please, analogous to tsbtable?

catchtable <-
function (fit)
{
ret <- .tableit(fit, "logCatch", trans = exp)
return(ret)
}

Thanks for the useful package

Recruitment sampling in forecast

The recruitment vector is correlated with the other N's and F's, so the recruitment pool should be resampled as part of the final state before resampling recruitments with replacement for a given trajectory.
(Note: the effect is that the uncertainty is over-estimated slightly which might not be so bad given other simplifying assumptions)

Error when undertaking a forecast with zero F

Hi,

the stockasssessment::forecast function now returns a summary tables with quantiles for a stochastic forecast but this causes an error if you're projecting a stock with zero catch advice in any year, i.e.

forecast(fit, fval = c(0.8,0.6,0,0.2), ave.years=2017:2019, rec.years=2005:2019, splitLD=TRUE, nosim = 50001)

Error in quantile.default(x, c(0.5, 0.025, 0.975)) :
missing values and NaN's not allowed if 'na.rm' is FALSE

plotting: legend problem with long names

Plots of multiple runs such as leaveout runs with long fleet names makes legend unreadable.
Possible solution: truncate names to a maximum number of characters that fits into a plot.

size of fitted object

the size of the fitted object should be reduced (e.g. by optionally not storing the cov)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.