w.huber@dkfz-heidelberg.de
2003-Oct-21 20:48 UTC
[Rd] round behaves differently from ceiling, floor for matrices with 0 rows (PR#4710)
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