Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example for generating data returns Error #12

Open
jtdeweber opened this issue Aug 4, 2022 · 4 comments
Open

Example for generating data returns Error #12

jtdeweber opened this issue Aug 4, 2022 · 4 comments

Comments

@jtdeweber
Copy link

I installed LIME today on R 4.1.3 after installing RTools, TMBhelper as directed. When attempting to follow the vignette example in "LIME: An R package for simulation and estimation using length data to account for variable fishing mortality and recruitment", I get the following error shown below. Apparently I do have the latest versions installed.

R version 4.1.3 (2022-03-10) -- "One Push-Up"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

library(LIME)
lh <- create_lh_list(vbk=0.21,

  •                  linf=65,
    
  •                  t0=-0.01,
    
  •                  lwa=0.0245,
    
  •                  lwb=2.79,
    
  •                  M=0.27,
    
  •                  M50=34,
    
  •                  M95=NULL,
    
  •                  maturity_input="length",
    
  •                  S50=20,
    
  •                  S95=26,
    
  •                  selex_input="length",
    
  •                  binwidth=1,
    
  •                  CVlen=0.1,
    
  •                  SigmaR=0.737,
    
  •                  SigmaF=0.2,
    
  •                  R0=1,
    
  •                  rho=0.43,
    
  •                  nseasons=1)
    

true <- generate_data(modpath=NULL,

  •                   itervec=1,
    
  •                   lh=lh,
    
  •                   Fdynamics="Ramp",
    
  •                   Rdynamics="AR",
    
  •                   Nyears=20,
    
  •                   Nyears_comp=20,
    
  •                   comp_sample=200,
    
  •                   init_depl=0.8,
    
  •                   seed=1)
    

Error in FUN(X[[i]], ...) : object 'R_t' not found

devtools::install_github("kaskr/TMB_contrib_R/TMBhelper")
Skipping install of 'TMBhelper' from a github remote, the SHA1 (d275e522) has not changed since last install.
Use force = TRUE to force installation
devtools::install_github("merrillrudd/LIME", build_vignettes=TRUE)
Skipping install of 'LIME' from a github remote, the SHA1 (9dcfc7f) has not changed since last install.
Use force = TRUE to force installation

Thank you for the help,

Tyrell DeWeber

@jtdeweber
Copy link
Author

The error above was acquired when running the code from the PDF vignette - dated 2017.

When I run the script from Github directly, there is no error.

Thus, I suppose the issue is solved for me.

@xucamel
Copy link

xucamel commented May 20, 2024

@jtdeweber I have the same error, how did you solve it?

@jtdeweber
Copy link
Author

there was apparently a problem with the PDF vignette. I ran the script from Github and had no error message then.

@Nuruyawild
Copy link

there was apparently a problem with the PDF vignette. I ran the script from Github and had no error message then.

How did you ran the script? I downloaded the zip file and install, but I also have the same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants