Science Score: 26.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
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.8%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: andrewraim
  • License: other
  • Language: C++
  • Default Branch: main
  • Size: 331 KB
Statistics
  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • Open Issues: 8
  • Releases: 1
Created almost 2 years ago · Last pushed about 1 year ago
Metadata Files
Readme Changelog License

README.md

Introduction

fntl is an R package to facilitate Rcpp programming. It provides a C++ API for routinely used numerical tools such as integration, root-finding, and optimization, where function arguments are given as lambdas. This enables the development of R-like code in C++ where functions can be defined on the fly and use variables in the surrounding environment.

See the included vignette for a more in-depth discussion of the package and an API guide.

Installation

The fntl package may be installed directly from Github using a standard R command like the following.

r devtools::install_github("andrewraim/fntl", ref = "v0.1.0")

Here, v0.1.0 represents a tagged release; replace it with a later version if one exists.

Getting Started

The following example computes the integral

$$ B(a,b) = \int_0^1 x^{a-1} (1-x)^{b-1} dx. $$

Create the file example.cpp with the following contents.

```cpp // [[Rcpp::depends(fntl)]]

include "fntl.h"

// [[Rcpp::export]] Rcpp::List example(double a, double b) { fntl::dfd f = & { return std::pow(x, a - 1) * std::pow(1 - x, b - 1); }; auto out = fntl::integrate(f, 0, 1); return Rcpp::wrap(out); } ```

The example function may be called through R as follows.

r Rcpp::sourceCpp("example.cpp") example(2, 3)

Owner

  • Name: Andrew Raim
  • Login: andrewraim
  • Kind: user

GitHub Events

Total
  • Issues event: 7
  • Watch event: 1
  • Issue comment event: 1
  • Push event: 12
  • Pull request event: 3
  • Create event: 1
Last Year
  • Issues event: 7
  • Watch event: 1
  • Issue comment event: 1
  • Push event: 12
  • Pull request event: 3
  • Create event: 1

Packages

  • Total packages: 1
  • Total downloads:
    • cran 507 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 3
  • Total maintainers: 1
cran.r-project.org: fntl

Numerical Tools for 'Rcpp' and Lambda Functions

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 507 Last month
Rankings
Dependent packages count: 28.4%
Dependent repos count: 35.0%
Average: 50.1%
Downloads: 86.8%
Maintainers (1)
Last synced: 10 months ago

Dependencies

DESCRIPTION cran
  • R >= 4.3 depends
  • Rcpp * imports
  • knitr * suggests
  • numDeriv * suggests
  • quarto * suggests
  • rmarkdown * suggests
  • tidyverse * suggests
  • tinytest * suggests