NEON-biodiversity / Ostats

O-statistics (community pairwise niche overlap statistics)
https://neon-biodiversity.github.io/Ostats/
Other
7 stars 2 forks source link

Overlap_circular example not working #10

Closed sydnerecord closed 4 years ago

sydnerecord commented 4 years ago

Hi @yyue-r

I noticed that the example for circular_overlap is not working. Can you look into this?

x <- runif(n = 100, min = 0, max = pi3/2) y <- runif(n = 100, min = pi, max = 2pi) circular_overlap(x, y, circular_units = "radians", density_args = list(bw = 1))

above line generates this error: Error in match.arg(type) : 'arg' must be NULL or a character vector

Thanks! Sydne

yyue-r commented 4 years ago

Hi Sydne

I think Quentin wrote this example. I remember running it and it worked. @qdread Could you help us take a look? Thank you very much!

qdread commented 4 years ago

Hi @yyue-r can you please point me to where this code is?

qdread commented 4 years ago

Also, apologies if it does not work. The circular overlap code was poorly developed. It might be OK to leave it in development form for now and not necessarily need to include it in the examples. But I will look into it.

qdread commented 4 years ago

OK I realized it was a very small bug 🐛 in the circular_overlap function, so I fixed it by adding two parentheses 🧙