calc_RMS: Calculate Root Mean Square Height after Davidson et al. 2003

Description Usage Arguments Value Examples

View source: R/calc_RMS.R

Description

This function calculates the Root Mean Square (RMS) Height after Davidson et al. 2003.

Usage

1

Arguments

data

data.frame (required): A log file imported with import_Data.

...

Currently not used.

Value

A data.frame containing the RMS value.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Load example data
file <- system.file("extdata/raw.log", package = "roughness")
data <- import_Data(file)

# find and remove outliers
data_cleaned <- find_Outliers(data = data,
                              prefilter = TRUE,
                              method = c("iqr", "sd", "mad"),
                              remove = "mad",
                              window = FALSE,
                              width = 20,
                              step = 10, 
                              hist = TRUE,
                              plot = TRUE)
                              
# de-trend the data set
data_detrend <- detrend_Data(data_cleaned, plot = TRUE)

# calculate RMS
RMS <- calc_RMS(data_detrend)
print(RMS)

# note that the function returns a data frame
str(RMS)

tzerk/roughness documentation built on May 3, 2019, 2:05 p.m.