From w.huber at dkfz-heidelberg.de  Tue Oct 21 20:48:28 2003
From: w.huber at dkfz-heidelberg.de (w.huber@dkfz-heidelberg.de)
Date: Tue Oct 21 20:48:35 2003
Subject: [Rd] round behaves differently from ceiling,
	floor for matrices with 0 rows (PR#4710)
Message-ID: <200310211848.h9LImS0P002266@pubhealth.ku.dk>

Full_Name: Wolfgang Huber
Version: 1.8.0
OS: Linux
Submission from: (NULL) (193.174.58.146)


base::round converts a matrix with 0 rows into numeric(0),
while floor and ceiling return a matrix of the same size:

> round(matrix(0, nrow=0, ncol=3))
numeric(0)

> ceiling(matrix(0, nrow=0, ncol=3))
     [,1] [,2] [,3]
> floor(matrix(0, nrow=0, ncol=3))
     [,1] [,2] [,3]
> round(matrix(0, nrow=1, ncol=3))
     [,1] [,2] [,3]
[1,]    0    0    0

> version
         _
platform i686-pc-linux-gnu
arch     i686
os       linux-gnu
system   i686, linux-gnu
status
major    1
minor    8.0
year     2003
month    10
day      08
language R


[Rd] round behaves differently from ceiling, floor for matrices with 0 rows (PR#4710)
w.huber@dkfz-heidelberg.de