quanteda / quanteda.textstats

Textual statistics for quanteda
GNU General Public License v3.0
14 stars 2 forks source link

Enable use_nan in proxyC v0.2.1 #41

Closed koheiw closed 2 years ago

koheiw commented 3 years ago

Upcoming proxyC v0.21 has a new argument use_nan to get NaN for vectors that have zero standard deviation. It will replace this part of the code:

https://github.com/quanteda/quanteda.textstats/blob/3302369c2913595564304d99ff769f9884509de9/R/textstat_simil.R#L650-L660

koheiw commented 3 years ago

If will also warn when use_nan = FALSE, so it might break tests.

kbenoit commented 3 years ago

OK let me know when it's ready for testing and I will add a fix. Will try to change the tests so that it works on both the 0.21 and the current CRAN, then I can update quanteda.textstats so that you won't have any CRAN issues when you submit the proxyC update.

koheiw commented 3 years ago

Please see the new behavior in the unit test

https://github.com/koheiw/proxyC/blob/96770543908922f93c431cd8d64df483d85fb74d/tests/testthat/test-simil.R#L113-L134

I have submitted v0.2.1 to CRAN already.

kbenoit commented 2 years ago

The latest CRAN checks are now failing on all devel releases as well as

r-patched-linux-x86_64 r-patched-solaris-x86 r-release-linux-x86_64

(see https://cran.r-project.org/web/checks/check_results_quanteda.textstats.html)

@koheiw you mentioned you'd issue a PR to fix, and we can refresh quanteda as well?

koheiw commented 2 years ago

CRAN checks look good now.