You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you put an NA into an image, antsImage classes automatically turn this into a NaN output. I don't know if it is possible to put NA into the image, but this seems like an issue we should at least have a warning about. This is an issue if people use is.na. Should not really affect new stats as na.rm for @jeffduda really applies to NaN:
library(ANTsRCore)
#> #> Attaching package: 'ANTsRCore'#> The following objects are masked from 'package:stats':#> #> sd, var#> The following objects are masked from 'package:base':#> #> all, any, apply, max, min, prod, range, sumimg<- makeImage(c(10, 100, 3), rpois(n=1000*3, lambda=5))
img[1,1,1] =NA_real_img[1,1,2] =Infimg[1,1,3] =NaNimg[1,2,3] =-Inf
as.array(img)[1,1,]
#> [1] NaN Inf NaN
If you put an
NA
into an image,antsImage
classes automatically turn this into aNaN
output. I don't know if it is possible to putNA
into the image, but this seems like an issue we should at least have a warning about. This is an issue if people useis.na
. Should not really affect new stats asna.rm
for @jeffduda really applies toNaN
:Created on 2019-06-19 by the reprex package (v0.3.0)
The text was updated successfully, but these errors were encountered: