Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I couldn't install the "niftir" package. #10

Open
ericchenjiu opened this issue Jun 25, 2019 · 2 comments
Open

I couldn't install the "niftir" package. #10

ericchenjiu opened this issue Jun 25, 2019 · 2 comments

Comments

@ericchenjiu
Copy link

Dear,
Do you can tell me the version of R software. It took me about a week to install it, but I still couldn't install the "niftir" package in Win and Ubuntu. Thank you.

devtools::install_github("czarrar/niftir") # https://github.com/czarrar/niftir
Downloading GitHub repo czarrar/niftir@master
√ checking for file 'C:\Users\SJYX-CJ\AppData\Local\Temp\RtmpEF1YAP\remotes23e42706519b\czarrar-niftir-afd7905/DESCRIPTION' (759ms)

  • preparing 'niftir':
    √ checking DESCRIPTION meta-information ...
  • cleaning src
  • running 'cleanup.win'
    Warning: C:/Users/SJYX-CJ/AppData/Local/Temp/RtmpyaMctM/Rbuild535026a614e0/niftir/man/nifti.Rd:7: unknown macro '\n'
    Warning: C:/Users/SJYX-CJ/AppData/Local/Temp/RtmpyaMctM/Rbuild535026a614e0/niftir/man/nifti.Rd:8: unknown macro '\n'
    Warning: C:/Users/SJYX-CJ/AppData/Local/Temp/RtmpyaMctM/Rbuild535026a614e0/niftir/man/nifti.Rd:35: unknown macro '\n'
    Warning: C:/Users/SJYX-CJ/AppData/Local/Temp/RtmpyaMctM/Rbuild535026a614e0/niftir/man/nifti.Rd:49: unexpected '}'
  • checking for LF line-endings in source and make files and shell scripts
  • checking for empty or unneeded directories
  • looking to see if a 'data/datalist' file should be added
  • building 'niftir_0.2.tar.gz'
    Warning: file 'niftir/cleanup' did not have execute permissions: corrected
    Warning: file 'niftir/configure' did not have execute permissions: corrected

Installing package into ‘C:/Users/SJYX-CJ/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)

  • installing source package 'niftir' ...


    WARNING: this package has a configure script
    It probably needs manual configuration


** libs
C:/RBuildTools/3.5/mingw_64/bin/gcc -m64 -I"C:/PROGRA1/MICROS2/ROPEN1/R-351.3/include" -DNDEBUG -I"C:/Users/SJYX-CJ/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/SJYX-CJ/Documents/R/win-library/3.5/BH/include" -I"C:/Users/SJYX-CJ/Documents/R/win-library/3.5/bigmemory/include" -I"C:/a/w/1/s/vendor/extsoft/include" -O2 -Wall -std=gnu99 -mtune=core2 -c nifti1_io.c -o nifti1_io.o
nifti1_io.c:3:73: fatal error: niftir/nifti1_io.h: No such file or directory
#include "niftir/nifti1_io.h" /* typedefs, prototypes, macros, etc. */
^
compilation terminated.
make: *** [C:/PROGRA1/MICROS2/ROPEN1/R-351.3/etc/x64/Makeconf:208: nifti1_io.o] Error 1
ERROR: compilation failed for package 'niftir'

  • removing 'C:/Users/SJYX-CJ/Documents/R/win-library/3.5/niftir'
    In R CMD INSTALL
    Error in i.p(...) :
    (converted from warning) installation of package ‘C:/Users/SJYX-CJ/AppData/Local/Temp/RtmpEF1YAP/file23e438556d64/niftir_0.2.tar.gz’ had non-zero exit status

run("git clone https://github.com/czarrar/connectir.git") # https://github.com/czarrar/connectir
Error in run("git clone https://github.com/czarrar/connectir.git") :
could not find function "run"
run("R CMD INSTALL connectir")
Error in run("R CMD INSTALL connectir") : could not find function "run"
cat("\nCopying scripts for connectir\n")

Copying scripts for connectir

bindir <- dirname(system("which R", intern=TRUE))
Error in system("which R", intern = TRUE) : 'which' not found
system(sprintf("cp connectir/inst/scripts/.R %s/", bindir))
Error in sprintf("cp connectir/inst/scripts/
.R %s/", bindir) :
object 'bindir' not found
system(sprintf("rm -f %s/_worker.R", bindir))
Error in sprintf("rm -f %s/
_worker.R", bindir) :
object 'bindir' not found
system(sprintf("chmod +x %s/.R", bindir))
Error in sprintf("chmod +x %s/
.R", bindir) : object 'bindir' not found
setwd(basedir)
Error in setwd(basedir) : object 'basedir' not found
run("rm -rf connectir")
Error in run("rm -rf connectir") : could not find function "run"

TODO: add copying of scripts to some bin location

install.packages("niftir", repos="http://R-Forge.R-project.org")
Installing package into ‘C:/Users/SJYX-CJ/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘niftir’ is not available (for R version 3.5.3)
devtools::install_github("E:\mysoftware\myCWAS_paper_Code\niftir_0.2.tar.gz")
Error in parse_repo_spec(repo) :
Invalid git repo specification: 'E:\mysoftware\myCWAS_paper_Code\niftir_0.2.tar.gz'
install.packages("E:\mysoftware\myCWAS_paper_Code\niftir_0.2.tar.gz")
Installing package into ‘C:/Users/SJYX-CJ/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘E:\mysoftware\myCWAS_paper_Code\niftir_0.2.tar.gz’ is not available (for R version 3.5.3)

@czarrar
Copy link
Owner

czarrar commented Jun 25, 2019

Sorry I am no longer actively maintaining this package hence the issues. People have been able to get it working with older versions of R and some other packages. (I don't think this will work on Windows but should work on Ubuntu). You can try with Rcpp version 0.12.8 and bigmemory 4.4.6. After that you might need to set dep=F so that newer versions of those tools don't install.

You can also find a python version of the package in CPAC: https://fcp-indi.github.io/docs/user/install.html and that is actively maintained.

If you are not doing any intense computation (e.g., using parcellations instead of voxels), then I've attached a pure R version of MDMR. See Rmdmr/242_parcellate_sm/20_mdmr.R for sample usage. Let me know if you have any questions on that.
Rmdmr.zip

@ericchenjiu
Copy link
Author

ericchenjiu commented Jun 26, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants