Description Slots Details Methods Examples
The RS class contains 3 equal length vector inputs: σb, εb and εp.
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.
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.
Available methods for this class are:
show
: the class display is simplyfied, each slot is limited to 25;
print
: displays the whole class;
get
('['): returns the value of a slot;
plot
: plots 3 slots as "timeseries" objects in the same graphic;
plotCor
: plots the correlation between
εb
and σb;
buildClass
: builds classes SM.dlm
and SM.HL
;
buildRNN
: training a RNN model in order to build clase SM.rnn
.
Check the example below for more details.
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.