polyCub

polyCub: An R package for Integration over Polygons - Published in JOSS (2019)

https://github.com/bastistician/polycub

Science Score: 93.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
    Found 5 DOI reference(s) in README and JOSS metadata
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

numerical-integration polygons r
Last synced: 6 months ago · JSON representation

Repository

An R package for numerical integration over polygonal domains

Basic Info
Statistics
  • Stars: 10
  • Watchers: 1
  • Forks: 0
  • Open Issues: 1
  • Releases: 6
Topics
numerical-integration polygons r
Created almost 13 years ago · Last pushed 8 months ago
Metadata Files
Readme Changelog License

README.md

polyCub

The R package polyCub implements cubature (numerical integration) over polygonal domains. It solves the problem of integrating a continuously differentiable function f(x,y) over simple closed polygons.

For the special case of a rectangular domain along the axes, the cubature package is more appropriate (cf. CRAN Task View: Numerical Mathematics).

Installation

You can install polyCub from CRAN via:

R install.packages("polyCub")

To install the development version from the GitHub repository, use:

```R

install.packages("remotes")

remotes::install_github("bastistician/polyCub") ```

Usage

The basic usage is:

r library("polyCub") polyCub(polyregion, f)

  • polyregion represents the integration domain as an object of class "owin" (from spatstat.geom), "gpc.poly" (from gpclib), "SpatialPolygons" (from sp), or "(MULTI)POLYGON" (from sf), or even as a plain list of lists of vertex coordinates ("xylist").

  • f is the integrand and needs to take a two-column coordinate matrix as its first argument.

The polyCub() function wraps the implemented cubature methods and by default calls polyCub.SV(), a C-implementation of product Gauss cubature. Directly calling the desired cubature function is preferable, see the list below.

Implemented cubature methods

  1. polyCub.SV(): General-purpose product Gauss cubature (Sommariva and Vianello, 2007, BIT Numerical Mathematics, https://doi.org/10.1007/s10543-007-0131-2)

  2. polyCub.midpoint(): Simple two-dimensional midpoint rule based on spatstat.geom::as.im.function()

  3. polyCub.iso(): Adaptive cubature for radially symmetric functions via line integrate() along the polygon boundary (Meyer and Held, 2014, The Annals of Applied Statistics, https://doi.org/10.1214/14-AOAS743, Supplement B, Section 2.4)

For details and illustrations see the vignette("polyCub") in the installed package or on CRAN.

Applications

The polyCub package evolved from the need to integrate so-called spatial interaction functions (Gaussian or power-law kernels) over the observation region of a spatio-temporal point process. Such epidemic models are implemented in surveillance.

Feedback

Contributions are welcome! Please submit suggestions or report bugs at https://github.com/bastistician/polyCub/issues or via e-mail to maintainer("polyCub").

License

The polyCub package is free and open source software, licensed under the GPLv2.

Owner

  • Name: Sebastian Meyer
  • Login: bastistician
  • Kind: user
  • Location: Erlangen, Germany
  • Company: Friedrich-Alexander-Universität Erlangen-Nürnberg

statistician and postdoc @ FAU Erlangen, R-core contributor

JOSS Publication

polyCub: An R package for Integration over Polygons
Published
February 12, 2019
Volume 4, Issue 34, Page 1056
Authors
Sebastian Meyer ORCID
Friedrich-Alexander-Universität Erlangen-Nürnberg (FAU), Erlangen, Germany
Editor
Karthik Ram ORCID
Tags
numerical integration cubature polygons

GitHub Events

Total
  • Release event: 1
  • Watch event: 1
  • Push event: 3
  • Create event: 1
Last Year
  • Release event: 1
  • Watch event: 1
  • Push event: 3
  • Create event: 1

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 341
  • Total Committers: 1
  • Avg Commits per committer: 341.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 3
  • Committers: 1
  • Avg Commits per committer: 3.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Sebastian Meyer s****r@f****e 341
Committer Domains (Top 20 + Academic)
fau.de: 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 4
  • Total pull requests: 0
  • Average time to close issues: 5 months
  • Average time to close pull requests: N/A
  • Total issue authors: 4
  • Total pull request authors: 0
  • Average comments per issue: 1.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • dwachsmuth (1)
  • bastistician (1)
  • rsbivand (1)
  • wrathematics (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • cran 1,019 last-month
  • Total docker downloads: 21,934
  • Total dependent packages: 4
    (may contain duplicates)
  • Total dependent repositories: 6
    (may contain duplicates)
  • Total versions: 21
  • Total maintainers: 1
cran.r-project.org: polyCub

Cubature over Polygonal Domains

  • Versions: 19
  • Dependent Packages: 3
  • Dependent Repositories: 6
  • Downloads: 1,019 Last month
  • Docker Downloads: 21,934
Rankings
Dependent packages count: 10.9%
Dependent repos count: 11.9%
Downloads: 12.3%
Docker downloads count: 12.5%
Average: 15.5%
Stargazers count: 17.4%
Forks count: 27.8%
Maintainers (1)
Last synced: 6 months ago
conda-forge.org: r-polycub
  • Versions: 2
  • Dependent Packages: 1
  • Dependent Repositories: 0
Rankings
Dependent packages count: 28.8%
Dependent repos count: 34.0%
Average: 43.9%
Stargazers count: 51.9%
Forks count: 61.1%
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • R >= 2.15.0 depends
  • methods * depends
  • grDevices * imports
  • graphics * imports
  • sp >= 1.0 imports
  • stats * imports
  • cubature * suggests
  • gpclib * suggests
  • knitr * suggests
  • lattice * suggests
  • microbenchmark * suggests
  • mvtnorm * suggests
  • rgeos * suggests
  • rmarkdown * suggests
  • sf * suggests
  • spatstat.geom * suggests
  • statmod * suggests