embedded-sergey / FishResp-Rpackage

R package for aquatic respirometry [FishResp project]
https://fishresp.org
GNU General Public License v3.0
2 stars 0 forks source link

potentially undefined variable in extract.slope #1

Open hugomflavio opened 3 years ago

hugomflavio commented 3 years ago

Hi!

I was reading through the code of extract.slope, and I couldn't find where the variable 'time' in the line below was defined.

https://github.com/embedded-sergey/FishResp-Rpackage/blob/a9c42ea52286fc443f7396bf1f5e9376235f2cb7/R/extract.slope.R#L157

Could it be a lost variable?

Thanks!

hugomflavio commented 6 months ago

I've tracked this bug to the original R appendix in the Chabot 2016 paper.

hugomflavio commented 6 months ago

I've read the paper back to back but couldn't understand what those lines should do. I've posted a comment on the ResearchGate page for that paper. Perhaps we'll get an answer that way.

https://www.researchgate.net/publication/290623162_The_determination_of_standard_metabolic_rate_in_fishes/comments

hugomflavio commented 6 months ago

Chabot got back to me on ResearchGate and confirmed that it should be 10% of the number of measurements. Changing to e.g.

valid <- cl2$Freq >= 0.1 * nrow(chamber.df) 

Should fix it.