one.sided {bspec} | R Documentation |
Conversion between one- and two-sided spectra
Description
Functions to convert between one- and two-sided
bspec
objects.
Usage
one.sided(x, ...)
two.sided(x, ...)
## S3 method for class 'bspec'
one.sided(x, ...)
## S3 method for class 'bspec'
two.sided(x, ...)
Arguments
x |
a |
... |
currently unused. |
Details
The conversion only means that the $two.sided
element of the
returned bspec
object is set correspondingly, as internally always
the same (one-sided) spectrum is used.
Value
A bspec
object
(see the help for the bspec
function).
Author(s)
Christian Roever, christian.roever@med.uni-goettingen.de
See Also
Examples
lhspec <- bspec(lh)
# compare distributions visually:
par(mfrow=c(2,1))
plot(lhspec)
plot(two.sided(lhspec))
par(mfrow=c(1,1))
# ...and numerically:
print(cbind("frequency"=lhspec$freq,
"median-1sided"=quantile(lhspec,0.5),
"median-2sided"=quantile(two.sided(lhspec),0.5)))
[Package bspec version 1.6 Index]