subscripting a table changed behavior in R devel

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

subscripting a table changed behavior in R devel

Hervé Pagès-2
Hi,

With R 3.2.3:

   > t <- table(sample(6, 50, replace=TRUE), sample(4, 50, replace=TRUE))
   > class(t[1:3, ])
   [1] "matrix"

With R devel:

   > t <- table(sample(6, 50, replace=TRUE), sample(4, 50, replace=TRUE))
   > class(t[1:3, ])
   [1] "table"

This breaks some Bioconductor packages that are calling as.data.frame()
on the result of this subscripting (as.data.frame.table and
as.data.frame.matrix behave very differently).

Could this change be mentioned in the NEWS file?

Thanks,
H.

--
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: [hidden email]
Phone:  (206) 667-5791
Fax:    (206) 667-1319

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel