https://github.com/tla-org/rmathlib
A Rust port of R's C Library of Special Functions
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.8%) to scientific vocabulary
Repository
A Rust port of R's C Library of Special Functions
Basic Info
- Host: GitHub
- Owner: tla-org
- License: gpl-2.0
- Language: Rust
- Default Branch: main
- Homepage: https://docs.rs/rmathlib
- Size: 1.28 MB
Statistics
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 1
Metadata Files
README.md
rmathlib
A Rust port of R's C Library of Special Functions.
Benefits
Some benefits of this port over the native C code are:
- Support
wasm32-unknown-unknowntarget (avoiding emscripten). - Clearer documentation with the help of
cargo doc. - Easier to read thanks to
cargo fmt. - Enables Go To Definition (code navigation) when loading this package as a dependency.
- More clarity about the used compiler and supported Rust versions.
Status
The following functions have been ported:
Distribution | Density | Probability | Quantile | Random Generation
--- | :---: | :---: | :---: | :---:
Normal | dnorm | pnorm | qnorm |
Student's t | dt | pt, pnt | |
Beta | | pbeta | |
Poisson | dpois | | |
Gamma | dgamma | pgamma |
License
The original R code is licensed under the GPL-2.0. Therefore, this port is also licensed under the GPL-2.0.
The GPL-2.0 is known to be a very restrictive license. Each project that includes GPL-2.0 code should also be licensed under the GPL-2.0 ( One exception to this restriction is to use this library only for a small part of the functionality of your project (see, e.g., here). In such cases, your project would be considered not to be a "derivative work" and therefore not subject to the GPL-2.0.
Developer Notes
Some tips for debugging the C code in test/nmath/:
To print from C, set
rust
std::env::set_var("CFLAGS", "-DDEBUG_bratio");
and use --nocapture like so:
sh
$ cargo watch -x 'test -- --nocapture'
When printing inside C, verify that that the numbers are printed correctly.
REprintf seems to not always print numbers correctly.
To fix that, REprintf can just be replaced with printf (and some \n's).
For example, test the representation via:
c
double tmp = 1.2;
REprintf("from c: x=%g\n", x);
or
```c
include
double tmp = 1.2; printf("from c: x=%g\n", x); ```
Owner
- Name: Three Letter Acronym
- Login: tla-org
- Kind: organization
- Repositories: 1
- Profile: https://github.com/tla-org
GitHub Events
Total
- Pull request event: 1
- Create event: 1
Last Year
- Pull request event: 1
- Create event: 1
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 0
- Total pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 1
Past Year
- Issues: 0
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 1
Top Authors
Issue Authors
Pull Request Authors
- storopoli (2)
- dependabot[bot] (1)
- rikhuijzer (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- Swatinem/rust-cache v2 composite
- actions/checkout v4 composite
- dtolnay/rust-toolchain v1 composite
- Swatinem/rust-cache v2 composite
- actions/checkout v4 composite
- actions/deploy-pages v4 composite
- actions/upload-pages-artifact v3 composite
- dtolnay/rust-toolchain v1 composite
- approx 0.5.1 development