Hi Achim,
That was a very quick reply/fix that got posted in between my reading and my
response.
I have downloaded your fix from:
svn checkout svn://r-forge.r-project.org/svnroot/zoo
for the HEAD revision and confirmed that it works as expected - I tested
using the code I posted in the first m
Thank you for your reply, but I am still confused.
Let me clarify... ...my problem isn't with zoo-ness per se.
With zoo objects, there appears to be zoo-matrices and zoo-vectors.
My problem is this - I start with a zoo-matrix:
> x <- m[1,,drop=FALSE]
> x
inp
2003-02-01 5
> is.matr
On Sat, 21 Mar 2009, Ken-JP wrote:
require( zoo )
inp <- c( 5, 9, 4, 2, 1 );
m <- zoo( cbind( inp ), as.Date("2003-02-01") + (0:(length(inp)-1)));
dim( m ) # [1] 5 1
dim( m[1,,drop=FALSE] ) # [1] 1 1 - ok
dim( lag( m, -1 )) # [1] 4 1 - ok
dim( rbind( m[1,,drop=FALSE], lag(m,-1) )) # NULL - c
On Mar 21, 2009, at 2:31 PM, Ken-JP wrote:
require( zoo )
inp <- c( 5, 9, 4, 2, 1 );
m <- zoo( cbind( inp ), as.Date("2003-02-01") + (0:(length(inp)-1)));
dim( m ) # [1] 5 1
dim( m[1,,drop=FALSE] ) # [1] 1 1 - ok
dim( lag( m, -1 )) # [1] 4 1 - ok
dim( rbind( m[1,,drop=FALSE], lag(m,-1) )) # NU
require( zoo )
inp <- c( 5, 9, 4, 2, 1 );
m <- zoo( cbind( inp ), as.Date("2003-02-01") + (0:(length(inp)-1)));
dim( m ) # [1] 5 1
dim( m[1,,drop=FALSE] ) # [1] 1 1 - ok
dim( lag( m, -1 )) # [1] 4 1 - ok
dim( rbind( m[1,,drop=FALSE], lag(m,-1) )) # NULL - converted from zoo
matrix to zoo vector
5 matches
Mail list logo