IntrusiveIndex | R Documentation |
Returns a number
IntrusiveIndex(dfa, dfr, BW)
dfa |
is a dataframe Lfa (enviromental sound levels) 1/3 octave specta data |
dfr |
is a dataframe Lfr (residual sound levels) 1/3 octave specta data |
BW |
a vector of 1/3 octave bandwidth data |
string of intrusive index
Pasquale Scordino p.scordino@arpa.piemonte.it
Simone Sperotto s.sperotto@arpa.piemonte.it
# Calculation of the intrusiveness index
library(OpeNoise)
library(lubridate)
data("dataset_impulsive1")
data("dfBW")
# dataset handling
df_Imp_sec <- dfImpulsiveTrasform(dataset_impulsive1,
statistic = energetic.mean)
df_Imp_sec$date <- ymd_hms(df_Imp_sec$date, tz = "Europe/Rome")
# extraction of frequency bands from the dataset
freqDF <- df_Imp_sec[, grep("LZeq\\.", names(df_Imp_sec))]
################################################################################
# INTRUSIVENESS INDEX CALCULATION FUNCTION
################################################################################
dfa <- freqDF # Environmental dataset simulation
dfr <- freqDF
# Residual dataset simulation by subtracting 4 from dfa
dfr[c(5,8,12,15), ] <- dfr[c(5,8,12,15), ] - 4
BW <- dfBW$BW # bandwidth
# application of the function
IntrusiveIndex(dfa, dfr, BW)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.