Open cameronbracken opened 4 years ago
Dear @https://github.com/cameronbracken,
Can you confirm that those warnings were solved in hydroPSO 0.5-1?
The warnings are still occurring for me in 0.5-1. I believe they are from the following lines:
https://github.com/hzambran/hydroPSO/blob/e6f17140c0864f65b7519ebfcdbe32684525a9c3/R/PSO_v2013.R#L2115 https://github.com/hzambran/hydroPSO/blob/e6f17140c0864f65b7519ebfcdbe32684525a9c3/R/PSO_v2013.R#L2117
For matrix objects, class(par) has two elements, which is causing the warning.
In R 4.x "array" was added to the class of matrix objects in addition to the "matrix" class. The checks in the hydroPSO function for vector vs matrix/data.frame throw warnings in R 4.x.
https://github.com/tidymodels/recipes/issues/422 https://cran.r-project.org/doc/manuals/r-release/NEWS.html