one.sided {bspec} | R Documentation |
Functions to convert between one- and two-sided
bspec
objects.
one.sided(x, ...) two.sided(x, ...) ## S3 method for class 'bspec': one.sided(x, ...) ## S3 method for class 'bspec': two.sided(x, ...)
x |
a bspec object. |
... |
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.
A bspec
object
(see the help for the bspec
function).
Christian Roever, bspec@web.de
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)))