Re: [Rd] (PR#7152) Ops.ts returns non-ts object for univariate operations

From: Gabor Grothendieck <ggrothendieck_at_myway.com>
Date: Wed 04 Aug 2004 - 04:10:34 EST

 <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.



R-devel@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-devel Received on Wed Aug 04 04:23:42 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:45:04 EST