[MINC-users] mni.cortical.statistics patch

Mishkin Derakhshan mishkind at gmail.com
Tue Sep 27 23:46:29 EDT 2011


Hi,
I'm not sure if something has changed in the latest R versions, but
version 2.12.1, combined with the mni.cortical.statistics (0.9.0) that
is on the cvs, spits out an error when you try to use the
mni.compute.FDR function:
"multi-argument returns are not permitted".

Indeed, looking at line 860 of vertex_glim.R, the return statement is
return(fdr.threshold,q)

I am no expert in R, but here is a solution I found through the
infinite wisdom of google:
return(list(fdr.threshold,q))

This will of course change the way people interfaced with mni.compute.FDR
ie, to get the threshold, instead of:
q<-mni.compute.FDR(...)
q$fdr.threshold

you need to use
q<-mni.compute.FDR(...)
q[1]

Jason, this is really your project so I'll let you make the appropriate changes.

mishkin

p.s. once this is sorted. can I suggest putting a version in
packages.bic.mni.mcgill.ca/tgz/, and maybe including this as an
INSTALL:
R CMD INSTALL --library=/path/to/useful/extra/libraries/for/R/
mni.cortical.statistics
export R_LIBS=/path/to/useful/extra/libraries/for/R/


More information about the MINC-users mailing list