3dMSS not working


I've been having trouble getting 3dMSS to work. When run directly from the command line i get:

colmconn@med51hp9t2:/data/colmconn/pain_supplement/code$ 3dMSS
Error: object 'Stat' not found
Execution halted

so I sourced the file directly in R to get a more meaningful error message and get:

> source("~/Applications/afni/3dMSS.R")
Error in source("~/Applications/afni/3dMSS.R") : 
  ~/Applications/afni/3dMSS.R:764:1: unexpected '}'
763:    return(Stat)
764: }
> sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.2 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0

 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] colorout_1.2-2

loaded via a namespace (and not attached):
[1] compiler_4.1.2 tools_4.1.2   

Looking through the commit history, it seems that the source of the problem may be this commit at line 726 where the { is commented out. Putting the { before the # character lets 3dMSS work again

1 Like

Thanks for reporting the bug and for providing the fix, Colm! The correction will be in the next AFNI official release.