@@ -1269,11 +1269,20 @@ expect_equal(cx_col_sums(x), colSums(x), info = "complex / colSums / keep NA / m
1269
1269
expect_equal(cx_col_sums(x , TRUE ), colSums(x , TRUE ), info = " complex / colSums / rm NA / mixed input" )
1270
1270
1271
1271
expect_equal(cx_row_means(x ), rowMeans(x ), info = " complex / rowMeans / keep NA / mixed input" )
1272
- if (getRversion() < " 4.6.0" ) expect_equal(cx_row_means(x , TRUE ), rowMeans(x , TRUE ), info = " complex / rowMeans / rm NA / mixed input" ) # # TODO FIXME R-devel
1272
+ if (getRversion() < " 4.6.0" ) {
1273
+ expect_equal(cx_row_means(x , TRUE ), rowMeans(x , TRUE ), info = " complex / rowMeans / rm NA / mixed input" )
1274
+ } else {
1275
+ # # TODO FIXME R-devel has borked rowMeans / colMeans for complex matrices with NA values
1276
+ expect_equal(cx_row_means(x , TRUE ), apply(x , 1 , mean , na.rm = TRUE ), info = " complex / rowMeans / rm NA / mixed input" )
1277
+ }
1273
1278
1274
1279
expect_equal(cx_col_means(x ), colMeans(x ), info = " complex / colMeans / keep NA / mixed input" )
1275
- if (getRversion() < " 4.6.0" ) expect_equal(cx_col_means(x , TRUE ), colMeans(x , TRUE ), info = " complex / colMeans / rm NA / mixed input" ) # # TODO FIXME R-devel
1276
-
1280
+ if (getRversion() < " 4.6.0" ) {
1281
+ expect_equal(cx_col_means(x , TRUE ), colMeans(x , TRUE ), info = " complex / colMeans / rm NA / mixed input" )
1282
+ } else {
1283
+ # # TODO FIXME R-devel has borked rowMeans / colMeans for complex matrices with NA values
1284
+ expect_equal(cx_row_means(x , TRUE ), apply(x , 2 , mean , na.rm = TRUE ), info = " complex / rowMeans / rm NA / mixed input" )
1285
+ }
1277
1286
1278
1287
x [] <- NA_complex_
1279
1288
0 commit comments