search for: tp22638959p22642095

Displaying 1 result from an estimated 1 matches for "tp22638959p22642095".

2009 Mar 21
4
Problem with zoo and rbind() converting matrix to vector
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!?!? # any way to keep the last line as a zoo matrix??? -- View this message in