https://github.com/landscitech/pfocal
Fast parallel convolution in R.
https://github.com/landscitech/pfocal
convolution image-processing landscape-ecology r raster-data
Last synced: 8 months ago
JSON representation
Fast parallel convolution in R.
- Host: GitHub
- URL: https://github.com/landscitech/pfocal
- Owner: LandSciTech
- License: other
- Created: 2020-12-11T14:43:43.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-08-24T17:35:43.000Z (almost 4 years ago)
- Last Synced: 2024-06-20T18:21:51.263Z (about 2 years ago)
- Topics: convolution, image-processing, landscape-ecology, r, raster-data
- Language: R
- Homepage: https://landscitech.github.io/pfocal/
- Size: 23.1 MB
- Stars: 2
- Watchers: 4
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE.md
Awesome Lists containing this project
README
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
set.seed(77)
```
# pfocal 
[](http://www.gnu.org/licenses/gpl-3.0)
[](https://www.repostatus.org/#active)
[](https://github.com/LandSciTech/pfocal/actions)
[](https://app.codecov.io/gh/LandSciTech/pfocal?branch=master)
The goal of `pfocal` is to implement fast parallel convolution. R version >= 4.0.0 is required.
## Installation
You can install the package as such:
```{r, eval=FALSE}
# From CRAN
install.packages("devtools")
# Dev version from GitHub
devtools::install_github("LandSciTech/pfocal")
```
## Example
```{r}
library(pfocal)
data <- matrix(nrow = 100, ncol = 100,
data = runif(n = 100*100, min = 0, max = 10))
image(data, asp = 1)
```
```{r}
kernel <- exponential_kernel()
convoluted <- pfocal(data = data, kernel = kernel, edge_value = 0)
image(convoluted, asp = 1)
```