pma {shelltrace}R Documentation

Function to do an n-point moving average

Description

Performs a moving average smoothing on a data series. de Winter, N. J. (2017) <doi:10.5194/gmd-2017-137>

Usage

pma(x, i, n)

Arguments

x

A numeric data frame containing the data set to be smoothed, X-values should be in the first column

i

The index of the column that contains the Y-values

n

Integer N-value determining the window size of the moving average smoothing

Value

A numeric data frame containing three columns: One with X-values, one with Y-values and one with smoothed Y-values

Note

Please cite Geoscientific Model Development paper dealing with the ShellTrace model

Author(s)

Niels J. de Winter

Source

GitHub
Manuscript
Supplementary data
Author website

References

de Winter, N. J.: ShellTrace v1.0 ? A new approach for modelling growth and trace element uptake in marine bivalve shells: Model verification on pacific oyster shells (Crassostrea gigas), Geosci. Model Dev. Discuss., https://doi.org/10.5194/gmd-2017-137, in review, 2017.

Examples

Nile<-as.data.frame(Nile)
Nile<-cbind(rownames(Nile),Nile)
Nile_5pma<-pma(Nile,2,5)

[Package shelltrace version 3.5.1 Index]