[Rd] (PR#7152) Ops.ts returns non-ts object for univariate operations
Gabor Grothendieck
ggrothendieck at myway.com
Tue Aug 3 20:10:34 CEST 2004
<jpalmucci <at> machineinsight.com> writes:
: However, I was expecting !x to return a time series, just like the
: binary logical operators do.
:
: For example:
:
: > b <- ts(1:10) > 5
:
: > b | !lag(b)
: Time Series:
: Start = 1
: End = 10
: Frequency = 1
: [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
As a workaround you could use the fact that xor(b, TRUE) negates b yet
remains a ts object.
More information about the R-devel
mailing list