RS-class: Class RS - An S4 class to represent a raw signal inputs

Description Slots Details Methods Examples

Description

The RS class contains 3 equal length vector inputs: σb, εb and εp.

Slots

sigb

A n-dimensional numeric vector represents the electrical conductivity of bulk soil, σb.

epsb

A n-dimensional numeric vector represents the electrical permitivity of bulk soil, εb.

epsp

A n-dimensional numeric vector represents the electrical conductivity of pore water, εp.

Details

Before the class is created, setValidity will be launched to check the length of 3 input vectors. It will return "Error" if the lengths are not equal.

Methods

Available methods for this class are:

Check the example below for more details.

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
25
26
27
28
29
n <- 50
# An example to create the RS class.
my_first_class <- RS(sigb = rnorm(n, mean = 0, sd = 1),
                     epsb = rnorm(n, mean = 0, sd = 2),
                     epsp = rnorm(n, mean = 1, sd = 1))

# Show the class
my_first_class
# print the class
print(my_first_class)
# Extract the slot "sigb"
sigb <- my_first_class["sigb"]
### o  sigb <- `[`(my_first_class, "sigb)

# plot the class as timeseries object
plot(my_first_class)
# plot the correlation
plotCor(my_first_class, 7)

# build class
## build dlm model
dlm_class <- buildClass(object = my_first_class,
                        method = "dlm", freq = 1,
                        ind = list(), lagMax = 3,
                        verify = TRUE, parallel = TRUE)
## build HL model
mp_class <- buildClass(object = my_first_class,
                       method = "HL", ind = 9.5)
### ind in this case is offset

4301350/sm4sd documentation built on June 14, 2020, 4:22 p.m.