h3r
h3r copied to clipboard
fix h3 makefile bug
should be PKG_LIBS=-L/usr/local/lib -lh3
if this bug doesn't fix, it will tell you:
/usr/bin/g++ -shared -L/usr/lib64/R/lib -Wl,-z,relro -o h3r.so RcppExports.o h3api.o -L/usr/local/lib -lh3.1 -L/usr/lib64/R/lib -lR
/usr/bin/ld: cannot find -lh3.1
collect2: error: ld returned 1 exit status
make: *** [h3r.so] Error 1
ERROR: compilation failed for package ‘h3r’
Thanks for the contribution! I should probably set up CI for this, but I'll need to validate it locally.
I think I probably had an older version of h3 installed that wanted to be addressed by -lh3.1.
Great appreciate your job to integrate H3 in R.
previously, I was stuck by DGGS dggridR package with inconsistent shape problem (pentagon + hexagon ) like this:

Now, our large scale machine learning model can be normalized very well in shape and area all over the world.
This is so cool! Thanks again for the contribution!
I can confirm this is working for me
@scottmmjackson could you merge this branch into master?
You can install with devtools::install_github("harryprince/h3r", ref="bug-fix/Makefile") to get this PR version.
Also shameless plug, I built an H3 binding using V8 and h3.js, which imports all public JS APIs with examples. It can be installed much more easily if you are not running performance critical code since V8 has more overhead than Rcpp: https://github.com/saurfang/h3js