medrxivr icon indicating copy to clipboard operation
medrxivr copied to clipboard

Error in count/100 : non-numeric argument to binary operator

Open hack-r opened this issue 3 months ago • 1 comments

Session Info
 setting  value
 version  R version 4.2.2 (2022-10-31)
 os       macOS Ventura 13.2.1
 system   x86_64, darwin17.0
 ui       RStudio
 language (EN)
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       America/Toronto
 date     2024-03-20
 rstudio  2023.09.1+494 Desert Sunflower (desktop)
 pandoc   NA
> mx_api_content(
+     from_date = "2013-01-01",
+     to_date = as.character(Sys.Date()),
+     clean = TRUE,
+     server = "medrxiv",
+     include_info = FALSE
+ )
Error in count/100 : non-numeric argument to binary operator
> mx_data <- mx_api_content(from_date = "2020-01-01",
+                           to_date = "2020-01-07")
Error in count/100 : non-numeric argument to binary operator
> if(interactive()){
+     mx_data <- mx_api_content(from_date = "2020-01-01",
+                               to_date = "2020-01-07")
+ }
Error in count/100 : non-numeric argument to binary operator

> preprint_data <- mx_api_content(server = "biorxiv")
Error in count/100 : non-numeric argument to binary operator
> preprint_data <- mx_api_content()
Error in count/100 : non-numeric argument to binary operator

Offhand, I can see that this is caused by a bad value of count, probably NA, null, or 0. I believe the same error has been included automatically in the docs.

I am guessing either something changed server-side or in a dependency that invalidated the lib's logic. I am writing a Python version now; will let you know if I find the problem and solution.

hack-r avatar Mar 21 '24 02:03 hack-r