Then I moved onto some phase difference statistics and encountered for the n-th time the nicely non-Gaussian von Mises distribution. Trying to use R Circular Statistics from Python became the bane of my existence tonight. RPy2 current code is unsupported on windows so I am lacking package import. At least I managed to hack it into compiling with the following tricks:
- Copied Rinterface.h from R source distro
- Hacked Rinterface.h to remove uintptr_t typedef
- Hacked na_values.c to remove dynamic allocations (compile time non-constants)
- Copied R dll's from "bin" to "lib" in R install
/* on some platforms these are not compile-time constants, so we must fill them at runtime */
+ NAInteger_Type.tp_base = &PyInt_Type;
+ NALogical_Type.tp_base = &PyInt_Type;
+ NAReal_Type.tp_base = &PyFloat_Type;
+ NACharacter_Type.tp_base = &PyString_Type;
Now to figure out where to put it and von Mises are in Python.
Talk like a Pirate Day" so "R - ARRR in".