ctmm-initiative / ctmm

Continuous-Time Movement Modeling. Functions for identifying, fitting, and applying continuous-space, continuous-time stochastic movement models to animal tracking data.
http://biology.umd.edu/movement.html
47 stars 12 forks source link

pkgdown functions all crashing #29

Closed chfleming closed 4 years ago

chfleming commented 5 years ago

I can't get basic commands in the pkgdown package to run after updates. For example:

> library(ctmm)
> pkgdown::build_news()
Error: Result 1 must be a single string, not a character vector of length 0
Call `rlang::last_error()` to see a backtrace

I traced the error down to some compiled code in the purr package, but I couldn't get any further than that.

For the last few versions of pkgdown, build_site has crashed (with a different error), but the individual commands worked. Now, the individual commands don't work.

xhdong-umd commented 5 years ago

I added browser() and print calls in the line of pkgdown that caused the problem, and found the error was caused by S4method(projection, list(NULL)). pkgdown is getting the signature from purrr::map_chr(as.list(x[[3]][-1]), as.character) and NULL will cause problem.

Comment out line 26 of projection.Rd \S4method{projection}{NULL}(x,asText=TRUE) will make the error disappear, but I don't know how can you still keep your original design.

chfleming commented 5 years ago

I would like to have projection(NULL) output NULL and R check as CRAN forces me to document this method, as trivial as it is.

I avoid S4 as much as possible, but I am overloading raster methods here and don't have a choice. I assume I am doing this correctly? If so I will submit a bug report to pkgdown and code a work around. I can probably obfuscate the method with a virtual class that resolves to class NULL or something.