https://github.com/mdsumner/rmdal0
https://github.com/mdsumner/rmdal0
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mdsumner/rmdal0
- Owner: mdsumner
- Created: 2018-11-14T01:49:24.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-09-20T07:05:10.000Z (over 6 years ago)
- Last Synced: 2024-12-28T12:16:55.737Z (over 1 year ago)
- Language: C++
- Size: 33.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
---
output: github_document
---
[](https://travis-ci.org/mdsumner/rmdal0)[](https://ci.appveyor.com/project/mdsumner/rmdal0)
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# rmdal0
An attempt, minimal proof of concept for an R package using the [MDAL library](https://www.mdal.xyz/).
See also https://github.com/lutraconsulting/MDAL/issues/42 which I will speak to once I get some functionality working.
## setup MDAL
```bash
git clone https://github.com/lutraconsulting/MDAL.git
cd MDAL
mkdir build;cd build
## DONE AS ROOT, BECAUSE otherwise fail for some reason
cmake -DCMAKE_BUILD_TYPE=Rel -DENABLE_TESTS=ON ..
make
make all install
```
Run the init thing for the C++ in this package:
```{r init, eval=FALSE, include = TRUE}
tools::package_native_routine_registration_skeleton("../rmdal0", "src/init.c",character_only = FALSE)
```
Run the package, currently only calls [MDAL_Status()](https://github.com/lutraconsulting/MDAL/blob/0.3.3/mdal/mdal.cpp) as a minimal test.
All going well it should return the value `2` and print out "mdalinfo 0".
```{r minimal, }
rmdal0:::rmdal0()
```
---
Please note that the 'rmdal0' project is released with a
[Contributor Code of Conduct](https://github.com/mdsumner/rmdal0/blob/master/CODE_OF_CONDUCT.md).
By contributing to this project, you agree to abide by its terms.