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

nrep<1 error in analysis.funcs #28

Closed
stranda opened this issue Mar 9, 2016 · 8 comments
Closed

nrep<1 error in analysis.funcs #28

stranda opened this issue Mar 9, 2016 · 8 comments
Labels

Comments

@stranda
Copy link
Collaborator

stranda commented Mar 9, 2016

Hi All,

Error in if (nrep < 1) keep.null <- FALSE : argument is of length zero

I get this when running rmetasim and microsatellite loci. It seems to be occurring in the analysis funcs, but I can't actually find this test in any of the codebase. Must be a result of class conformation tests?

@EricArcher
Copy link
Collaborator

This looks like a strataG thing. Would you make sure you've pulled the latest version and let me know if you get it again.

@stranda
Copy link
Collaborator Author

stranda commented Mar 9, 2016

Have you made changes in the past two hours? I pulled new strataG, apex, hierfstat, and swfscMisc two hours ago.

@EricArcher
Copy link
Collaborator

no I haven't, so I should be able to find and fix this. I'll take a quick
look after the telcon.


Eric Archer, Ph.D.
Southwest Fisheries Science Center
NMFS, NOAA
8901 La Jolla Shores Drive
La Jolla, CA 92037 USA
858-546-7121 (work)
858-546-7003 (FAX)

Marine Mammal Genetics Group: swfsc.noaa.gov/mmtd-mmgenetics
ETP Cetacean Assessment Program: swfsc.noaa.gov/mmtd-etp

"

The universe doesn't care what you believe. The wonderful thing about
science is that it doesn't ask for your faith, it just asks for your
eyes.
" - Randall Munroe

"Lighthouses are more helpful than churches."

  • Benjamin Franklin

    "...but I'll take a GPS over either one."

    • John C. "Craig" George

On Wed, Mar 9, 2016 at 12:56 PM, stranda notifications@github.com wrote:

Have you made changes in the past two hours? I pulled new strataG, apex,
hierfstat, and swfscMisc two hours ago.


Reply to this email directly or view it on GitHub
#28 (comment)
.

@smhoban smhoban added the bug label Mar 15, 2016
@stranda
Copy link
Collaborator Author

stranda commented Mar 16, 2016

I've added a selection in the ui for this parameter (general parameters tab). It is set to 1 by default. No longer dies

@stranda stranda closed this as completed Mar 16, 2016
@smhoban
Copy link
Collaborator

smhoban commented Mar 16, 2016

Awesome!

On Wed, Mar 16, 2016 at 2:42 PM, stranda notifications@github.com wrote:

I've added a selection in the ui for this parameter (general parameters
tab). It is set to 1 by default. No longer dies


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#28 (comment)

Sean Hoban
Tree Conservation Biologist
The Morton Arboretum http://www.mortonarb.org/
4100 Illinois Rt 53, 3rd Floor Research Bldg, room 324, Lisle, IL
630-719-2419

New publications!!
Accounting for the nested nature of genetic variation
http://onlinelibrary.wiley.com/doi/10.1111/oik.02760/abstract Oikos 2016
Exploring seaweed population dynamics
http://onlinelibrary.wiley.com/doi/10.1111/jpy.12366/abstract Journal of
Phycology 2016
Loci under selection in expanding tree populations
http://onlinelibrary.wiley.com/doi/10.1111/mec.13234/abstract Molecular
Ecology 2015
Designing optimal seed collection protocols
http://www.sciencedirect.com/science/article/pii/S0006320715001767
Biological Conservation 2015
Using ABC to understand invasive species establishment
http://www.nature.com/hdy/journal/vaop/ncurrent/full/hdy201538a.html
Heredity 2015

research webpage: http://sites.google.com/site/hoban3/
ResearchGate Profile: http://www.researchgate.net/profile/Sean_Hoban/
food blog: http://cuisineraveclevin.blogspot.it/
blog about invasive species: http://invasivore.org/

@EricArcher
Copy link
Collaborator

It should also work being set to 0 (no p-values calculated). I think I fixed strataG so it would have this behavior. NULL should produce the same result. I haven't sat down to set up the Shiny GUI recently, so could someone check this out?

@christianparobek
Copy link
Owner

I think this is related to a problem I'm running into (just pulled latest commits, but this was a problem before too). Under General Conf, in the "Number of simulation reps box" (this is what you all are talking about in this issue, right?), you're right Eric, I can now set it to 0, and it's fine with that. However, anytime that there is not a number in the box (for example, I delete the 1 so I can type 2), the interface crashes with this error:

Warning: Error in <Anonymous>: assignment of an object of class “logical” is not valid for @‘num.reps’ in an object of class “skeleSim.params”; is(value, "intOrNum") is not TRUE
Stack trace (innermost first):
    65: <Anonymous>
    64: observeEventHandler [make-skelesim-class.R#38]
     2: runApp
     1: skeleSimGUI

@EricArcher
Copy link
Collaborator

Christian, this is the skeleSim@num.rep slot which sets the number of simulation replicates. For the sake of clarity, I have changed it to @num.sim.rep in the skeleSim class and the code it is referenced in. I also wrapped it in as.numeric() to keep a blank from being treated as a logical in the shiny GUI. I don't get an error now.

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

No branches or pull requests

4 participants