der_SG: der_SG Applying derivatives with smoothing

Description Usage Arguments Examples

View source: R/der_SG.R

Description

funcao para pre-processamento com a aplicacao de derivadas com a suavizacao de Savitzky-Golay

Usage

1
der_SG( )

Arguments

df

data frame

m

the differentiation order.

p

the polynomial order.

w

a window size (must be odd).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data(nir_seed)
a<-plotmean_df(nir_seed)

#Applying 1st derivative with Savitzky-Golay smoothing
df<-der_SG(nir_seed,1,2,11)
b<-plotmean_df(df)

#Applying 2nd derivative with Savitzky-Golay smoothing
df<-der_SG(nir_seed,2,2,11)
c<-plotmean_df(df)
library(ggpubr)
ggarrange(a, b, c, 
labels = c("A", "B", "C"),
ncol = 2, nrow = 2)

admedeiros/nira documentation built on Oct. 13, 2020, 8:35 p.m.