knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)
library(oXim)

oXim

Oxycline Index from Matrix Echograms

This package is built to take echogram data from Echopen software outputs and calculate oxycline depth limits using image-filtering algoriths.

Installation

Get the development version from github:

# install.packages("devtools")
devtools::install_github("LuisLauM/oXim")

Examples

Read data from Echopen outputs

For reading data, it is necesary to specify Echopen outputs files (.m extension). ´readEchograms´ function returns an object of class ´echoData´, so some methods may be applied: print, summary and plot.

# Set directories where the Echopen's outputs are located
fileMode <- list(fish38_file   = system.file("extdata", "fish38.mat", package = "oXim"),
                 fluid120_file = system.file("extdata", "fluid120.mat", package = "oXim"),
                 blue38_file   = system.file("extdata", "blue38.mat", package = "oXim"))


# Read echograms (echoData object)
echoData <- readEchograms(fileMode = fileMode)

# Print method
print(echoData)

# Summary method
summaryEchodata <- summary(echoData)

# Print summary
print(summaryEchodata)

# Plot method
plot(echoData)

Calculate oxycline depth limits

For oxycline depth calculation, getOxyrange function provides an easy-to-use way for applying median-filter and 2D convolution-based filters.

For calculate oxycline depth limits from echoData objects, getOxyrange should be applied as follows:

# Set directories where the Echopen's outputs are located
fileMode <- list(fish38_file   = system.file("extdata", "fish38.mat", package = "oXim"),
                 fluid120_file = system.file("extdata", "fluid120.mat", package = "oXim"),
                 blue38_file   = system.file("extdata", "blue38.mat", package = "oXim"))


# Read echograms (echoData object)
echoData <- readEchograms(fileMode = fileMode)

# Calculate oxycline limits (oxyclineData object)
oxyLimits <- getOxyrange(fluidMatrix = echoData)

# Print method
print(oxyLimits)

# Summary method
summary(oxyLimits)

# Plot method
plot(oxyLimits)


LuisLauM/oXim documentation built on May 7, 2019, 2:03 p.m.