pfmc-assessments / PacFIN.Utilities

R code to manipulate data from the PacFIN database for assessments
http://pfmc-assessments.github.io/PacFIN.Utilities
Other
7 stars 1 forks source link

cleanPacFIN #39

Closed chantelwetzel-noaa closed 3 years ago

chantelwetzel-noaa commented 3 years ago

https://github.com/nwfsc-assess/PacFIN.Utilities/blob/eae799217697406a3af0e95b6b9db80b60afc3ba/R/cleanPacFIN.R#L337

@kellijohnson-NOAA I tried testing out this function using the example data in the package. When CLEAN = TRUE all record were being removed. I think I traced it back to this line where I think the check should be:

ifelse(keep_missing_length, TRUE, !is.na(Pdata$length))

rather than

ifelse(keep_missing_length, TRUE, is.na(Pdata$length))

I wanted to double check that I am understanding the issue correctly prior to pushing the fix.

kellijohnson-NOAA commented 3 years ago

Thanks @chantelwetzel-noaa, your correction is spot on. Push away!

kellijohnson-NOAA commented 3 years ago

This is a duplicate of #40 right?

chantelwetzel-noaa commented 3 years ago

@kellijohnson-NOAA Thank you! I have pushed the correction to this line. My internet was glitching this morning, sorry for the accidental duplicate issue.

iantaylor-NOAA commented 3 years ago

@chantelwetzel-noaa if we could only just clean away all the data, many modeling problems would go away. I accidentally duplicated an issue elsewhere on github this morning as well (I got a "404 Not Found" page), so I'd like to think it's a problem with github, not us.