Code Monkey home page Code Monkey logo

lbspr's People

Contributors

adrianhordyk avatar ahharvey avatar yreecht avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

lbspr's Issues

Difference between LBSPR package in R and LBSPR Shiny App results

Hi, AdrianHordyk.
I uploaded my data and found out that the estimated parameters (SL50, SL95, F / M, SPR) are slightly different when they are calculated in the LBSPR package and LBSPR Shiny App. There are differences in both cases (the individual point estimates and the smoothed ones). The difference between the parameters are the same: for SL50 - 0.2, SL95 - 0.2, F / M - (-0.02 or - 0.03), SPR - 0.01.
Could you explain the reason for the difference in parameter values?

Help

Dear

I try to run the LBSPR method to my data. but i find a little problem in the section 'Reading in Example CSV'

Actually, i couldn't read my csv file wich contain my data. so please can you help me in this case. i am sorry for this but i am a bigguner in R.

Thank you very much

data issues on LBSPR script

Hello Adrian !

I have got some issus when trying to run the LBSPR script with my data. I followed the script as it is explains but the problem appears in the "Reading in Example CSV" part when I try to create the object with my length frequency data in this command ;
Len2 <- new("LB_lengths", LB_pars=MyPars, file=paste0(datdir, "/LFreq_MultiYrHead.csv"), dataType="freq", header=TRUE)

I tried several thing, but the file is related to the function DataDir with sends everything to a place I can't find on my laptop. Even by changing the data in the csv file directly in the LBSPR package it doesn't change anything when importing data. So I tried to change the data directory with the DataDir function but it's not working. And finally, without the DataDir function, and by using read.csv2 with my file it's not working, maybe because of the "new" function?

Anyway, can you help me so that I can run the script with my data please ? I hope my explanations are clear !

Thanks in adavance
Gabrielle Cotonéa

I can not plot imported length data

Hi Adrian Hordyk.
I study a manual for LBSPR package. I ran into one problem - can not plot the imported length data.
I run all codes in the manual :
MyPars <- new("LB_pars")
MyPars@Species <- "MySpecies"
MyPars@Linf <- 100
MyPars@L50 <- 66
MyPars@L95 <- 70
MyPars@MK <- 1.5
MyPars@L_units <- "mm"
Len1 <- new("LB_lengths", LB_pars=MyPars, file=paste0(datdir, "/LFreq_MultiYr.csv"),
dataType="freq")
Len2 <- new("LB_lengths", LB_pars=MyPars, file=paste0(datdir, "/LFreq_MultiYrHead.csv"),
dataType="freq", header=TRUE)
Len3 <- new("LB_lengths", LB_pars=MyPars, file=paste0(datdir, "/LRaw_MultiYr.csv"),
dataType="raw")
PlotSize (Len1) an so on.
But i get wrong plots like in an attached file.
Could you explaine what i do wrong?
Rplot

Specifying SL50 and SL95 when fitting data

Hi, I was wondering if it is possible to force the SL50 and SL95 outputs from LBSPRfit(), instead of having them estimated?

I tried adding SL50 and SL95 parameters to the LB_pars object before adding our length measurement data, but it seems that LBSPRfit() still estimates the SL50 and SL95 independently from the data.

Creating LB_lengths objects from data inside R

If I am not mistaken, the initialize method for LB_lengths is designed to be used with data in files, but it becomes difficult to use it inside R when the length samples are in an R object in the workspace.

I am trying to run LBSPR inside some MSE simulations, and I seem to be forced to create an empty object and then populate the stocks directly.

My view is that the kind of input juggling that it is being done should be carried out by a creator method/function, LB_lengths(), while a call to new() should be able to simply assign named inputs to the corresponding slot.

Missing dependency

Hi,
My first attempt to install the package (version 0.1.9000, commit 12849d3, R 3.3.2 64-bits on Windows) failed due to a missing 'colorspace' package.
Worked fine after installing it manually.
Yves

About shiny app YPRsim

Dear Adrian,

in barefootecologist, what do you mean with parameters dL95 and dSL95 (Particullary what means the "d"). The codes in Rstudio didn't show what means.

Thanks

Specifying MLL and sdLegal

When trying to specify MLL and sdLegal in the LB_pars parameter, I receive this error:

Error in ZKLMat[L - 1, ] : incorrect number of dimensions

Code example below:

MyPars <- new("LB_pars")
MyPars@Species <- "Red hind"
MyPars@Linf <- 54.6
MyPars@L50 <- 21.5
MyPars@L95 <- 28.5
MyPars@M <- 0.24
MyPars@MK <- 0.24/0.176
MyPars@L_units <- "cm"
MyPars@FM <- 0.87
MyPars@SL50 <- 35
MyPars@SL95 <- 36
MyPars@MLL <- 35
MyPars@sdLegal <- 1

MySim <- LBSPRsim(MyPars)

Removing the parameters for MLL and sdLegal results in no error and a reasonable SPR (~0.61).

Am I specifying the MLL and sdLegal incorrectly?

Plot function behaviour is inconsistent

The documentation indicates that plotTarg returns a ggplot object.

However, plotTarg returns a dataframe, unlike LBSPR's other plot functions,

Are the final lines of this function intentional?

...
print(Plot)
return(invisible(longDat))

How to check convergence of model?

Hi Adrian,
I was wondering how do you check whether the model has converged or not? Some other models have that build in and I was wondering if you had any advice or ideas to check that. When running the model my output numbers are pretty strange so I was wondering whether that might be something that I need to address and adjust for.

Thanks in advance,
Juliet

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.