Closed MarkTrinder closed 5 years ago
Hi Mark,
Yes, you are absolutely right. Suggested zero padding of the flight height data will be made and included in the next version of the app (to be released within the next couple of weeks).
Thank you for the input!
No problem
On later reflection (I posted that issue in haste shortly before leaving the office!) I wondered if it might be better to extrapolate the trends – I suspect the difference would be barely detectable (at least not to <10 decimal places!) because the numbers are so low, but it’s a thought.
Took me ages to find the source of this error – I ended up changing each parameter in turn! I’m not familiar with how shiny apps operate. Is there a way to view the intermediate data frames etc? I could see the error in the console, but couldn’t find out how to interrogate the data to try and trace it.
Mark
From: bcaneco notifications@github.com Sent: 31 August 2018 14:34 To: dmpstats/stochCRM stochCRM@noreply.github.com Cc: Mark Trinder Mark.Trinder@macarthurgreen.com; Author author@noreply.github.com Subject: Re: [dmpstats/stochCRM] maximum heights (#3)
Hi Mark,
Yes, you are absolutely right. Suggested zero padding of the flight height data will be made and included in the next version of the app (to be released within the next couple of weeks).
Thank you for the input!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/dmpstats/stochCRM/issues/3#issuecomment-417665528, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AZjIjRQigMmUSV74_D6qKy4iQ_DZvGOKks5uWTtHgaJpZM4WTnYi.
Hi Mark, Indeed, debugging shiny apps is a bit trickier than standard R.
For monitoring relevant R objects I typically print out their values on the console via a print() inside the reactive section of interest. I also find useful to use browser() to inspect and debug problematic code sections.
To debug errors and app crashes, I set "options(shiny.error = browser)". Then, when the app pauses due to an error, I use recover() to traceback the error by selecting the stack frame of interest.
You can find more details on debugging shiny in this helpful article: https://shiny.rstudio.com/articles/debugging.html
Cheers
FHD data padded with zeros from 300m to 500m in app v2.3.1. Presence at 300m virtually zero (< 10^-15) for all species, so expanding data to 500m with zeros assumed as reasonable.
I think there may be a restriction on maximum rotor size - if the total tip height (air gap + offset + rotor diam) exceeds the flight height data then NAs are introduced the and the simulation fails.
I have been trying to figure out why I was having errors and this seems to be the most likely one.
This is a problem as bigger turbines will often exceed the 300m currently defined for flight heights. But above ~150m most species have very small proportions flying so suggest simplest is just to pad the flight height data with zeros.