Running ‘testthat.R’ [52s/203s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(radtools)
  > 
  > test_check("radtools")
  trying URL 'http://barre.nom.fr/medical/samples/files/CT-MONO2-16-ort.gz'
  Content type 'application/x-gzip' length 246877 bytes (241 KB)
  ==================================================
  downloaded 241 KB
  
  trying URL 'http://barre.nom.fr/medical/samples/files/CT-MONO2-16-brain.gz'
  Content type 'application/x-gzip' length 261311 bytes (255 KB)
  ==================================================
  downloaded 255 KB
  
  trying URL 'http://barre.nom.fr/medical/samples/files/MR-MONO2-16-head.gz'
  Content type 'application/x-gzip' length 70273 bytes (68 KB)
  ==================================================
  downloaded 68 KB
  
  trying URL 'http://barre.nom.fr/medical/samples/files/MR-MONO2-16-knee.gz'
  Content type 'application/x-gzip' length 69484 bytes (67 KB)
  ==================================================
  downloaded 67 KB
  
  trying URL 'http://barre.nom.fr/medical/samples/files/MR-MONO2-8-16x-heart.gz'
  Content type 'application/x-gzip' length 337207 bytes (329 KB)
  ==================================================
  downloaded 329 KB
  
  trying URL 'http://barre.nom.fr/medical/samples/files/NM-MONO2-16-13x-heart.gz'
  Content type 'application/x-gzip' length 24002 bytes (23 KB)
  ==================================================
  downloaded 23 KB
  
  trying URL 'http://barre.nom.fr/medical/samples/files/US-MONO2-8-8x-execho.gz'
  Content type 'application/x-gzip' length 86068 bytes (84 KB)
  ==================================================
  downloaded 84 KB
  
  trying URL 'http://www.dclunie.com/images/charset/charsettests.20070405.tar.bz2'
  Content type 'binary/octet-stream' length 6110 bytes
  ==================================================
  downloaded 6110 bytes
  
  trying URL 'http://www.dclunie.com/images/compressed/deflate_tests_release.tar.gz'
  Content type 'application/x-gzip' length 65476 bytes (63 KB)
  ==================================================
  downloaded 63 KB
  
  trying URL 'http://www.dclunie.com/images/signedrange/signedrangeimages.tar.bz2'
  Content type 'application/x-bzip2' length 278192 bytes (271 KB)
  ==================================================
  downloaded 271 KB
  
  trying URL 'https://nifti.nimh.nih.gov/nifti-1/data/avg152T1_LR_nifti.hdr.gz'
  Content type 'application/x-gzip' length 129 bytes
  ==================================================
  downloaded 129 bytes
  
  trying URL 'https://nifti.nimh.nih.gov/nifti-1/data/avg152T1_LR_nifti.img.gz'
  Content type 'application/x-gzip' length 531538 bytes (519 KB)
  ==================================================
  downloaded 519 KB
  
  trying URL 'https://nifti.nimh.nih.gov/nifti-1/data/avg152T1_LR_nifti.nii.gz'
  Content type 'application/x-gzip' length 531671 bytes (519 KB)
  ==================================================
  downloaded 519 KB
  
  trying URL 'https://nifti.nimh.nih.gov/nifti-1/data/avg152T1_RL_nifti.hdr.gz'
  Content type 'application/x-gzip' length 125 bytes
  ==================================================
  downloaded 125 bytes
  
  trying URL 'https://nifti.nimh.nih.gov/nifti-1/data/avg152T1_RL_nifti.img.gz'
  Content type 'application/x-gzip' length 531007 bytes (518 KB)
  ==================================================
  downloaded 518 KB
  
  trying URL 'https://nifti.nimh.nih.gov/nifti-1/data/avg152T1_RL_nifti.nii.gz'
  Content type 'application/x-gzip' length 531119 bytes (518 KB)
  ==================================================
  downloaded 518 KB
  
  trying URL 'https://nifti.nimh.nih.gov/nifti-1/data/filtered_func_data.nii.gz'
  Content type 'application/x-gzip' length 6783574 bytes (6.5 MB)
  ==================================================
  downloaded 6.5 MB
  
  trying URL 'https://nifti.nimh.nih.gov/nifti-1/data/minimal.hdr.gz'
  Content type 'application/x-tar' length 61 bytes
  ==================================================
  downloaded 61 bytes
  
  trying URL 'https://nifti.nimh.nih.gov/nifti-1/data/minimal.img.gz'
  Content type 'application/x-tar' length 389 bytes
  ==================================================
  downloaded 389 bytes
  
  trying URL 'https://nifti.nimh.nih.gov/nifti-1/data/sirp_fmri_study_ver4.tar.gz'
  Content type 'application/x-gzip' length 27125790 bytes (25.9 MB)
  ==================================================
  downloaded 25.9 MB
  
  trying URL 'https://nifti.nimh.nih.gov/nifti-1/data/zstat1.nii.gz'
  Content type 'application/x-gzip' length 72939 bytes (71 KB)
  ==================================================
  downloaded 71 KB
  
  trying URL 'http://www.neuromorphometrics.com/1103_3.tgz'
  Content type 'application/x-tar' length 7286064 bytes (6.9 MB)
  ==================================================
  downloaded 6.9 MB
  
  trying URL 'https://github.com/muschellij2/Neurohacking_data/raw/master/BRAINIX/NIfTI/FLAIR.nii.gz'
  Content type 'application/octet-stream' length 1351404 bytes (1.3 MB)
  ==================================================
  downloaded 1.3 MB
  
  trying URL 'https://github.com/muschellij2/Neurohacking_data/raw/master/BRAINIX/NIfTI/FLAIR_regToT1.nii.gz'
  Content type 'application/octet-stream' length 13690259 bytes (13.1 MB)
  ==================================================
  downloaded 13.1 MB
  
  trying URL 'https://github.com/muschellij2/Neurohacking_data/raw/master/BRAINIX/NIfTI/ROI.nii.gz'
  Content type 'application/octet-stream' length 5279 bytes
  ==================================================
  downloaded 5279 bytes
  
  trying URL 'https://github.com/muschellij2/Neurohacking_data/raw/master/BRAINIX/NIfTI/ROI_regToT1_SyNtoMNI.nii.gz'
  Content type 'application/octet-stream' length 302833 bytes (295 KB)
  ==================================================
  downloaded 295 KB
  
  trying URL 'https://github.com/muschellij2/Neurohacking_data/raw/master/BRAINIX/NIfTI/T1.nii.gz'
  Content type 'application/octet-stream' length 3763118 bytes (3.6 MB)
  ==================================================
  downloaded 3.6 MB
  
  trying URL 'https://github.com/muschellij2/Neurohacking_data/raw/master/BRAINIX/NIfTI/T1_SyNtoMNI.nii.gz'
  Content type 'application/octet-stream' length 6603933 bytes (6.3 MB)
  ==================================================
  downloaded 6.3 MB
  
  trying URL 'https://github.com/muschellij2/Neurohacking_data/raw/master/Template/JHU_MNI_SS_T1_brain.nii.gz'
  Content type 'application/octet-stream' length 3086068 bytes (2.9 MB)
  ==================================================
  downloaded 2.9 MB
  
  trying URL 'https://github.com/muschellij2/Neurohacking_data/raw/master/Template/JHU_MNI_SS_T1_mask.nii.gz'
  Content type 'application/octet-stream' length 68732 bytes (67 KB)
  ==================================================
  downloaded 67 KB
  
  trying URL 'https://github.com/muschellij2/Neurohacking_data/raw/master/Template/MNI152_T1_1mm_brain.nii.gz'
  Could not download file from url https://github.com/muschellij2/Neurohacking_data/raw/master/Template/MNI152_T1_1mm_brain.nii.gz
  Error raised by oro.nifti::readNIfTI
  Message from oro.nifti: File(s) not found!
  On expression: oro.nifti::readNIfTI(file, ...)
  With file(s) = "/home/hornik/tmp/scratch/RtmpZa72PH/MNI152_T1_1mm_brain.nii.gz"
  Could not read NIfTI-1 object from path /home/hornik/tmp/scratch/RtmpZa72PH/MNI152_T1_1mm_brain.nii.gz
  trying URL 'https://github.com/muschellij2/Neurohacking_data/raw/master/kirby21/visit_1/113/113-01-MPRAGE.nii.gz'
  Content type 'application/octet-stream' length 7744679 bytes (7.4 MB)
  ==================================================
  downloaded 7.4 MB
  
  trying URL 'https://github.com/muschellij2/Neurohacking_data/raw/master/kirby21/visit_1/113/113-01-MPRAGE_mask.nii.gz'
  Content type 'application/octet-stream' length 58905 bytes (57 KB)
  ==================================================
  downloaded 57 KB
  
  trying URL 'https://github.com/muschellij2/Neurohacking_data/raw/master/kirby21/visit_1/113/FLIRT_113-01-T2w_regToT1.nii.gz'
  Content type 'application/octet-stream' length 29975529 bytes (28.6 MB)
  ==================================================
  downloaded 28.6 MB
  
  ── 1. Error: NIfTI import (@test_image_import_nifti.R#45)  ─────────────────────
  no applicable method for 'img_data_to_3D_mat' applied to an object of class "NULL"
  1: expression_try(nifti_data_MNI152_T1_1mm_brain, expect_equal(dim(img_data_to_3D_mat(nifti_data_MNI152_T1_1mm_brain)), 
         c(182, 218, 182))) at testthat/test_image_import_nifti.R:45
  2: expect_equal(dim(img_data_to_3D_mat(nifti_data_MNI152_T1_1mm_brain)), c(182, 218, 
         182)) at /home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/radtools.Rcheck/tests/testthat/helper.R:39
  3: quasi_label(enquo(object), label, arg = "object")
  4: eval_bare(get_expr(quo), get_env(quo))
  5: img_data_to_3D_mat(nifti_data_MNI152_T1_1mm_brain)
  
  ── 2. Error: NIfTI metadata (@test_metadata_nifti.R#136)  ──────────────────────
  no applicable method for 'num_slices' applied to an object of class "NULL"
  1: expression_try(nifti_data_MNI152_T1_1mm_brain, expect_equal(num_slices(nifti_data_MNI152_T1_1mm_brain), 
         182)) at testthat/test_metadata_nifti.R:136
  2: expect_equal(num_slices(nifti_data_MNI152_T1_1mm_brain), 182) at /home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/radtools.Rcheck/tests/testthat/helper.R:39
  3: quasi_label(enquo(object), label, arg = "object")
  4: eval_bare(get_expr(quo), get_env(quo))
  5: num_slices(nifti_data_MNI152_T1_1mm_brain)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 245 SKIPPED: 3 WARNINGS: 15 FAILED: 2
  1. Error: NIfTI import (@test_image_import_nifti.R#45) 
  2. Error: NIfTI metadata (@test_metadata_nifti.R#136) 
  
  Error: testthat unit tests failed
  In addition: Warning message:
  In dir.create(outdir_nifti, recursive = TRUE) :
    '/home/hornik/tmp/scratch/RtmpZa72PH' already exists
  Execution halted