grec

[G]radient-based [REC]ognition of Spatial Patterns in Environmental Data

Provides algorithms for detection of spatial patterns from oceanographic data using image processing methods based on Gradient Recognition.

Installation

Get the development version from github:

# install.packages("devtools")
# devtools::install_github("LuisLauM/grec")
install.packages("grec", repos = c('https://luislaum.r-universe.dev', 'https://cloud.r-project.org'))

Or install the CRAN version

install.packages("grec")

Examples

Next, we show an example of the use of getGradients function:

require(grec)

data(sst)
exampleSSTData <- list(x = sst$longitude,
                       y = sst$latitude,
                       z = sst$sst[,,1])

data(chl)
exampleChlData <- list(x = chl$longitude,
                       y = chl$latitude,
                       z = chl$chlorophyll[,,1])

# Simple application (over a XYZ list)
out_sst <- getGradients(x = exampleSSTData)
out_chl <- getGradients(x = exampleChlData)

# External transformation for chl data
out_chl$z <- log10(out_chl$z)

par(mfrow = c(2, 2), mar = rep(0, 4), oma = rep(0, 4))

image(exampleSSTData, col = colPalette, axes = FALSE)
mtext(text = "Original SST", side = 3, line = -2, adj = 0.99, cex = 1.2)

image(out_sst, col = colPalette, axes = FALSE)
mtext(text = "SST gradient", side = 3, line = -2, adj = 0.99, cex = 1.2)

image(exampleChlData, col = colPalette, axes = FALSE)
mtext(text = "Original Chlorophyll", side = 3, line = -2, adj = 0.99, cex = 1.2)

image(out_chl, col = colPalette, axes = FALSE)
mtext(text = "Chlorophyll gradient\n(log scale)", side = 3, line = -4, adj = 0.99,
      cex = 1.2)

Versions

1.6.4

1.6.2

1.6.1

1.6.0

1.5.0

1.3.5

1.3.4

1.2.2

1.2.1

1.2.0

1.1.2

1.1.1

1.1.0

1.0.0