Back to Multiple platform build/check report for BioC 3.12
ABCDEFGHIJKLMNO[P]QRSTUVWXYZ

CHECK report for preprocessCore on tokay1

This page was generated on 2021-05-06 12:32:49 -0400 (Thu, 06 May 2021).

To the developers/maintainers of the preprocessCore package:
Please make sure to use the following settings in order to reproduce any error or warning you see on this page.
Package 1382/1974HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
preprocessCore 1.52.1  (landing page)
Ben Bolstad
Snapshot Date: 2021-05-05 14:51:38 -0400 (Wed, 05 May 2021)
URL: https://git.bioconductor.org/packages/preprocessCore
Branch: RELEASE_3_12
Last Commit: 91de4ab
Last Changed Date: 2020-11-24 11:02:23 -0400 (Tue, 24 Nov 2020)
malbec1Linux (Ubuntu 18.04.5 LTS) / x86_64  OK    OK    WARNINGS  UNNEEDED, same version exists in internal repository
tokay1Windows Server 2012 R2 Standard / x64  OK    OK    OK    OK  UNNEEDED, same version exists in internal repository
merida1macOS 10.14.6 Mojave / x86_64  OK    OK    WARNINGS    OK  UNNEEDED, same version exists in internal repository

Summary

Package: preprocessCore
Version: 1.52.1
Command: C:\Users\biocbuild\bbs-3.12-bioc\R\bin\R.exe CMD check --force-multiarch --install=check:preprocessCore.install-out.txt --library=C:\Users\biocbuild\bbs-3.12-bioc\R\library --no-vignettes --timings preprocessCore_1.52.1.tar.gz
StartedAt: 2021-05-06 05:41:50 -0400 (Thu, 06 May 2021)
EndedAt: 2021-05-06 05:42:25 -0400 (Thu, 06 May 2021)
EllapsedTime: 34.4 seconds
RetCode: 0
Status:   OK   
CheckDir: preprocessCore.Rcheck
Warnings: 0

Command output

##############################################################################
##############################################################################
###
### Running command:
###
###   C:\Users\biocbuild\bbs-3.12-bioc\R\bin\R.exe CMD check --force-multiarch --install=check:preprocessCore.install-out.txt --library=C:\Users\biocbuild\bbs-3.12-bioc\R\library --no-vignettes --timings preprocessCore_1.52.1.tar.gz
###
##############################################################################
##############################################################################


* using log directory 'C:/Users/biocbuild/bbs-3.12-bioc/meat/preprocessCore.Rcheck'
* using R version 4.0.5 (2021-03-31)
* using platform: x86_64-w64-mingw32 (64-bit)
* using session charset: ISO8859-1
* using option '--no-vignettes'
* checking for file 'preprocessCore/DESCRIPTION' ... OK
* this is package 'preprocessCore' version '1.52.1'
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking whether package 'preprocessCore' can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... NOTE
Found a 'configure.in' file: 'configure.ac' has long been preferred.
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* loading checks for arch 'i386'
** checking whether the package can be loaded ... OK
** checking whether the package can be loaded with stated dependencies ... OK
** checking whether the package can be unloaded cleanly ... OK
** checking whether the namespace can be loaded with stated dependencies ... OK
** checking whether the namespace can be unloaded cleanly ... OK
* loading checks for arch 'x64'
** checking whether the package can be loaded ... OK
** checking whether the package can be loaded with stated dependencies ... OK
** checking whether the package can be unloaded cleanly ... OK
** checking whether the namespace can be loaded with stated dependencies ... OK
** checking whether the namespace can be unloaded cleanly ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking line endings in shell scripts ... OK
* checking line endings in C/C++/Fortran sources/headers ... OK
* checking line endings in Makefiles ... OK
* checking compilation flags in Makevars ... OK
* checking for GNU extensions in Makefiles ... OK
* checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
* checking use of PKG_*FLAGS in Makefiles ... OK
* checking compiled code ... NOTE
Note: information on .o files for i386 is not available
Note: information on .o files for x64 is not available
File 'C:/Users/biocbuild/bbs-3.12-bioc/R/library/preprocessCore/libs/i386/preprocessCore.dll':
  Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran)
File 'C:/Users/biocbuild/bbs-3.12-bioc/R/library/preprocessCore/libs/x64/preprocessCore.dll':
  Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran)

Compiled code should not call entry points which might terminate R nor
write to stdout/stderr instead of to the console, nor use Fortran I/O
nor system RNGs. The detected symbols are linked into the code but
might come from libraries and not actually be called.

See 'Writing portable packages' in the 'Writing R Extensions' manual.
* checking examples ...
** running examples for arch 'i386' ... OK
** running examples for arch 'x64' ... OK
* checking for unstated dependencies in 'tests' ... OK
* checking tests ...
** running tests for arch 'i386' ...
  Running 'PLMdtest.R'
  Running 'qnormtest.R'
 OK
** running tests for arch 'x64' ...
  Running 'PLMdtest.R'
  Running 'qnormtest.R'
 OK
* checking PDF version of manual ... OK
* DONE

Status: 2 NOTEs
See
  'C:/Users/biocbuild/bbs-3.12-bioc/meat/preprocessCore.Rcheck/00check.log'
for details.



Installation output

preprocessCore.Rcheck/00install.out

##############################################################################
##############################################################################
###
### Running command:
###
###   C:\cygwin\bin\curl.exe -O http://172.29.0.3/BBS/3.12/bioc/src/contrib/preprocessCore_1.52.1.tar.gz && rm -rf preprocessCore.buildbin-libdir && mkdir preprocessCore.buildbin-libdir && C:\Users\biocbuild\bbs-3.12-bioc\R\bin\R.exe CMD INSTALL --merge-multiarch --build --library=preprocessCore.buildbin-libdir preprocessCore_1.52.1.tar.gz && C:\Users\biocbuild\bbs-3.12-bioc\R\bin\R.exe CMD INSTALL preprocessCore_1.52.1.zip && rm preprocessCore_1.52.1.tar.gz preprocessCore_1.52.1.zip
###
##############################################################################
##############################################################################


  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  129k  100  129k    0     0  5992k      0 --:--:-- --:--:-- --:--:-- 6149k

install for i386

* installing *source* package 'preprocessCore' ...
** using staged installation

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


** libs
"C:/rtools40/mingw32/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c R_colSummarize.c -o R_colSummarize.o
"C:/rtools40/mingw32/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c R_plmd_interfaces.c -o R_plmd_interfaces.o
"C:/rtools40/mingw32/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c R_plmr_interfaces.c -o R_plmr_interfaces.o
"C:/rtools40/mingw32/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c R_rlm_interfaces.c -o R_rlm_interfaces.o
"C:/rtools40/mingw32/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c R_subColSummarize.c -o R_subColSummarize.o
"C:/rtools40/mingw32/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c R_subrcModel_interfaces.c -o R_subrcModel_interfaces.o
R_subrcModel_interfaces.c: In function 'R_sub_rcModelSummarize_medianpolish':
R_subrcModel_interfaces.c:207:11: warning: unused variable 'se' [-Wunused-variable]
   double *se;
           ^~
R_subrcModel_interfaces.c:206:11: warning: unused variable 'weights' [-Wunused-variable]
   double *weights;
           ^~~~~~~
R_subrcModel_interfaces.c:165:30: warning: unused variable 'buffer2' [-Wunused-variable]
   double *results, *buffer, *buffer2;
                              ^~~~~~~
R_subrcModel_interfaces.c:165:21: warning: unused variable 'buffer' [-Wunused-variable]
   double *results, *buffer, *buffer2;
                     ^~~~~~
R_subrcModel_interfaces.c:165:11: warning: unused variable 'results' [-Wunused-variable]
   double *results, *buffer, *buffer2;
           ^~~~~~~
R_subrcModel_interfaces.c: In function 'R_sub_rcModelSummarize_plm':
R_subrcModel_interfaces.c:532:10: warning: unused variable 'scale' [-Wunused-variable]
   double scale=-1.0;
          ^~~~~
R_subrcModel_interfaces.c:485:30: warning: unused variable 'buffer2' [-Wunused-variable]
   double *results, *buffer, *buffer2;
                              ^~~~~~~
R_subrcModel_interfaces.c:485:21: warning: unused variable 'buffer' [-Wunused-variable]
   double *results, *buffer, *buffer2;
                     ^~~~~~
R_subrcModel_interfaces.c:485:11: warning: unused variable 'results' [-Wunused-variable]
   double *results, *buffer, *buffer2;
           ^~~~~~~
"C:/rtools40/mingw32/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c avg.c -o avg.o
"C:/rtools40/mingw32/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c avg_log.c -o avg_log.o
"C:/rtools40/mingw32/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c biweight.c -o biweight.o
"C:/rtools40/mingw32/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c init_package.c -o init_package.o
"C:/rtools40/mingw32/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c lm.c -o lm.o
"C:/rtools40/mingw32/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c log_avg.c -o log_avg.o
"C:/rtools40/mingw32/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c log_median.c -o log_median.o
"C:/rtools40/mingw32/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c matrix_functions.c -o matrix_functions.o
"C:/rtools40/mingw32/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c median.c -o median.o
"C:/rtools40/mingw32/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c median_log.c -o median_log.o
"C:/rtools40/mingw32/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c medianpolish.c -o medianpolish.o
"C:/rtools40/mingw32/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c plmd.c -o plmd.o
"C:/rtools40/mingw32/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c plmr.c -o plmr.o
plmr.c:279:13: warning: 'XTWX_R_inv' defined but not used [-Wunused-function]
 static void XTWX_R_inv(int *rows, int *cols, double *xtwx){
             ^~~~~~~~~~
plmr.c:152:13: warning: 'XTWX_R' defined but not used [-Wunused-function]
 static void XTWX_R(int *rows, int *cols, double *out_weights, double *xtwx){
             ^~~~~~
plmr.c:82:13: warning: 'XTWY_R' defined but not used [-Wunused-function]
 static void XTWY_R(int *rows, int *cols, double *out_weights, double *y,double *xtwy){
             ^~~~~~
"C:/rtools40/mingw32/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c psi_fns.c -o psi_fns.o
"C:/rtools40/mingw32/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c qnorm.c -o qnorm.o
qnorm.c: In function 'qnorm_c_determine_target_l':
qnorm.c:1908:7: warning: unused variable 'non_na' [-Wunused-variable]
   int non_na;
       ^~~~~~
qnorm.c:1903:12: warning: unused variable 'j' [-Wunused-variable]
   size_t i,j,row_mean_ind;
            ^
qnorm.c: In function 'qnorm_c_determine_target_via_subset_l':
qnorm.c:2507:7: warning: unused variable 'non_na' [-Wunused-variable]
   int non_na;
       ^~~~~~
qnorm.c:2502:12: warning: unused variable 'j' [-Wunused-variable]
   size_t i,j,row_mean_ind;
            ^
qnorm.c: In function 'using_target_via_subset_part1':
qnorm.c:2723:14: warning: variable 'ind' set but not used [-Wunused-but-set-variable]
   size_t i,j,ind,target_ind;
              ^~~
qnorm.c: In function 'using_target_via_subset_part2':
qnorm.c:2822:11: warning: unused variable 'datvec' [-Wunused-variable]
   double *datvec;
           ^~~~~~
qnorm.c:2821:11: warning: unused variable 'sample_percentiles' [-Wunused-variable]
   double *sample_percentiles;
           ^~~~~~~~~~~~~~~~~~
qnorm.c: In function 'using_target_via_subset':
qnorm.c:2971:11: warning: unused variable 'datvec' [-Wunused-variable]
   double *datvec;
           ^~~~~~
qnorm.c:2970:11: warning: unused variable 'sample_percentiles' [-Wunused-variable]
   double *sample_percentiles;
           ^~~~~~~~~~~~~~~~~~
qnorm.c:2966:7: warning: unused variable 'non_na' [-Wunused-variable]
   int non_na = 0;
       ^~~~~~
qnorm.c:2965:7: warning: unused variable 'targetnon_na' [-Wunused-variable]
   int targetnon_na = targetrows;
       ^~~~~~~~~~~~
qnorm.c:2963:28: warning: unused variable 'target_ind_double_floor' [-Wunused-variable]
   double target_ind_double,target_ind_double_floor;
                            ^~~~~~~~~~~~~~~~~~~~~~~
qnorm.c:2963:10: warning: unused variable 'target_ind_double' [-Wunused-variable]
   double target_ind_double,target_ind_double_floor;
          ^~~~~~~~~~~~~~~~~
qnorm.c:2962:10: warning: unused variable 'samplepercentile' [-Wunused-variable]
   double samplepercentile;
          ^~~~~~~~~~~~~~~~
qnorm.c:2961:11: warning: unused variable 'ranks' [-Wunused-variable]
   double *ranks = (double *)Calloc((rows),double);
           ^~~~~
qnorm.c:2959:11: warning: unused variable 'row_mean' [-Wunused-variable]
   double *row_mean = target;
           ^~~~~~~~
qnorm.c:2957:14: warning: unused variable 'dimat' [-Wunused-variable]
   dataitem **dimat;
              ^~~~~
qnorm.c:2955:18: warning: unused variable 'target_ind' [-Wunused-variable]
   size_t i,j,ind,target_ind;
                  ^~~~~~~~~~
qnorm.c:2955:14: warning: unused variable 'ind' [-Wunused-variable]
   size_t i,j,ind,target_ind;
              ^~~
qnorm.c:2955:12: warning: unused variable 'j' [-Wunused-variable]
   size_t i,j,ind,target_ind;
            ^
qnorm.c: In function 'R_qnorm_using_target':
qnorm.c:2113:3: warning: 'target_rows' may be used uninitialized in this function [-Wmaybe-uninitialized]
   qnorm_c_using_target_l(Xptr, rows, cols ,targetptr, target_rows);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
qnorm.c: In function 'R_qnorm_using_target_via_subset':
qnorm.c:3240:3: warning: 'target_rows' may be used uninitialized in this function [-Wmaybe-uninitialized]
   qnorm_c_using_target_via_subset_l(Xptr, rows, cols, subsetptr, targetptr, target_rows);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"C:/rtools40/mingw32/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c rlm.c -o rlm.o
"C:/rtools40/mingw32/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c rlm_anova.c -o rlm_anova.o
rlm_anova.c: In function 'rlm_fit_anova_given_probe_effects_engine':
rlm_anova.c:1235:10: warning: unused variable 'endprobe' [-Wunused-variable]
   double endprobe;
          ^~~~~~~~
rlm_anova.c: In function 'rlm_compute_se_anova_given_probe_effects':
rlm_anova.c:1426:19: warning: unused variable 'varderivpsi' [-Wunused-variable]
   double vs=0.0,m,varderivpsi=0.0;
                   ^~~~~~~~~~~
rlm_anova.c:1426:17: warning: unused variable 'm' [-Wunused-variable]
   double vs=0.0,m,varderivpsi=0.0;
                 ^
rlm_anova.c:1426:10: warning: unused variable 'vs' [-Wunused-variable]
   double vs=0.0,m,varderivpsi=0.0;
          ^~
rlm_anova.c:1419:10: warning: unused variable 'scale' [-Wunused-variable]
   double scale=0.0;
          ^~~~~
rlm_anova.c:1418:10: warning: unused variable 'Kappa' [-Wunused-variable]
   double Kappa=0.0;      /* A correction factor */
          ^~~~~
rlm_anova.c:1417:10: warning: unused variable 'sumderivpsi' [-Wunused-variable]
   double sumderivpsi=0.0; /* sum of psi'(r_i) */
          ^~~~~~~~~~~
rlm_anova.c:1415:10: warning: unused variable 'sumpsi2' [-Wunused-variable]
   double sumpsi2=0.0;  /* sum of psi(r_i)^2 */
          ^~~~~~~
rlm_anova.c:1414:10: warning: unused variable 'k1' [-Wunused-variable]
   double k1 = psi_k;   /*  was 1.345; */
          ^~
rlm_anova.c: In function 'rlm_wfit_anova_given_probe_effects_engine':
rlm_anova.c:1505:10: warning: unused variable 'endprobe' [-Wunused-variable]
   double endprobe;
          ^~~~~~~~
"C:/rtools40/mingw32/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c rlm_se.c -o rlm_se.o
"C:/rtools40/mingw32/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c rma_background4.c -o rma_background4.o
rma_background4.c: In function 'R_rma_bg_correct':
rma_background4.c:509:12: warning: 'PMcopy' may be used uninitialized in this function [-Wmaybe-uninitialized]
     return PMcopy;
            ^~~~~~
"C:/rtools40/mingw32/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c rma_common.c -o rma_common.o
"C:/rtools40/mingw32/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c weightedkerneldensity.c -o weightedkerneldensity.o
C:/rtools40/mingw32/bin/gcc -shared -s -static-libgcc -o preprocessCore.dll tmp.def R_colSummarize.o R_plmd_interfaces.o R_plmr_interfaces.o R_rlm_interfaces.o R_subColSummarize.o R_subrcModel_interfaces.o avg.o avg_log.o biweight.o init_package.o lm.o log_avg.o log_median.o matrix_functions.o median.o median_log.o medianpolish.o plmd.o plmr.o psi_fns.o qnorm.o rlm.o rlm_anova.o rlm_se.o rma_background4.o rma_common.o weightedkerneldensity.o -LC:/Users/BIOCBU~1/BBS-3~1.12-/R/bin/i386 -lRlapack -LC:/Users/BIOCBU~1/BBS-3~1.12-/R/bin/i386 -lRblas -lgfortran -lm -lquadmath -LC:/extsoft/lib/i386 -LC:/extsoft/lib -LC:/Users/BIOCBU~1/BBS-3~1.12-/R/bin/i386 -lR
installing to C:/Users/biocbuild/bbs-3.12-bioc/meat/preprocessCore.buildbin-libdir/00LOCK-preprocessCore/00new/preprocessCore/libs/i386
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
  converting help for package 'preprocessCore'
    finding HTML links ... done
    colSummarize                            html  
    normalize.quantiles                     html  
    normalize.quantiles.in.blocks           html  
    normalize.quantiles.robust              html  
    normalize.quantiles.target              html  
    rcModelPLMd                             html  
    rcModelPLMr                             html  
    rcModels                                html  
    rma.background.correct                  html  
    subColSummarize                         html  
    subrcModels                             html  
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path

install for x64

* installing *source* package 'preprocessCore' ...

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


** libs
"C:/rtools40/mingw64/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c R_colSummarize.c -o R_colSummarize.o
"C:/rtools40/mingw64/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c R_plmd_interfaces.c -o R_plmd_interfaces.o
"C:/rtools40/mingw64/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c R_plmr_interfaces.c -o R_plmr_interfaces.o
"C:/rtools40/mingw64/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c R_rlm_interfaces.c -o R_rlm_interfaces.o
"C:/rtools40/mingw64/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c R_subColSummarize.c -o R_subColSummarize.o
"C:/rtools40/mingw64/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c R_subrcModel_interfaces.c -o R_subrcModel_interfaces.o
R_subrcModel_interfaces.c: In function 'R_sub_rcModelSummarize_medianpolish':
R_subrcModel_interfaces.c:207:11: warning: unused variable 'se' [-Wunused-variable]
   double *se;
           ^~
R_subrcModel_interfaces.c:206:11: warning: unused variable 'weights' [-Wunused-variable]
   double *weights;
           ^~~~~~~
R_subrcModel_interfaces.c:165:30: warning: unused variable 'buffer2' [-Wunused-variable]
   double *results, *buffer, *buffer2;
                              ^~~~~~~
R_subrcModel_interfaces.c:165:21: warning: unused variable 'buffer' [-Wunused-variable]
   double *results, *buffer, *buffer2;
                     ^~~~~~
R_subrcModel_interfaces.c:165:11: warning: unused variable 'results' [-Wunused-variable]
   double *results, *buffer, *buffer2;
           ^~~~~~~
R_subrcModel_interfaces.c: In function 'R_sub_rcModelSummarize_plm':
R_subrcModel_interfaces.c:532:10: warning: unused variable 'scale' [-Wunused-variable]
   double scale=-1.0;
          ^~~~~
R_subrcModel_interfaces.c:485:30: warning: unused variable 'buffer2' [-Wunused-variable]
   double *results, *buffer, *buffer2;
                              ^~~~~~~
R_subrcModel_interfaces.c:485:21: warning: unused variable 'buffer' [-Wunused-variable]
   double *results, *buffer, *buffer2;
                     ^~~~~~
R_subrcModel_interfaces.c:485:11: warning: unused variable 'results' [-Wunused-variable]
   double *results, *buffer, *buffer2;
           ^~~~~~~
"C:/rtools40/mingw64/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c avg.c -o avg.o
"C:/rtools40/mingw64/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c avg_log.c -o avg_log.o
"C:/rtools40/mingw64/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c biweight.c -o biweight.o
"C:/rtools40/mingw64/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c init_package.c -o init_package.o
"C:/rtools40/mingw64/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c lm.c -o lm.o
"C:/rtools40/mingw64/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c log_avg.c -o log_avg.o
"C:/rtools40/mingw64/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c log_median.c -o log_median.o
"C:/rtools40/mingw64/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c matrix_functions.c -o matrix_functions.o
"C:/rtools40/mingw64/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c median.c -o median.o
"C:/rtools40/mingw64/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c median_log.c -o median_log.o
"C:/rtools40/mingw64/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c medianpolish.c -o medianpolish.o
"C:/rtools40/mingw64/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c plmd.c -o plmd.o
"C:/rtools40/mingw64/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c plmr.c -o plmr.o
plmr.c:279:13: warning: 'XTWX_R_inv' defined but not used [-Wunused-function]
 static void XTWX_R_inv(int *rows, int *cols, double *xtwx){
             ^~~~~~~~~~
plmr.c:152:13: warning: 'XTWX_R' defined but not used [-Wunused-function]
 static void XTWX_R(int *rows, int *cols, double *out_weights, double *xtwx){
             ^~~~~~
plmr.c:82:13: warning: 'XTWY_R' defined but not used [-Wunused-function]
 static void XTWY_R(int *rows, int *cols, double *out_weights, double *y,double *xtwy){
             ^~~~~~
"C:/rtools40/mingw64/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c psi_fns.c -o psi_fns.o
"C:/rtools40/mingw64/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c qnorm.c -o qnorm.o
qnorm.c: In function 'qnorm_c_determine_target_l':
qnorm.c:1908:7: warning: unused variable 'non_na' [-Wunused-variable]
   int non_na;
       ^~~~~~
qnorm.c:1903:12: warning: unused variable 'j' [-Wunused-variable]
   size_t i,j,row_mean_ind;
            ^
qnorm.c: In function 'qnorm_c_determine_target_via_subset_l':
qnorm.c:2507:7: warning: unused variable 'non_na' [-Wunused-variable]
   int non_na;
       ^~~~~~
qnorm.c:2502:12: warning: unused variable 'j' [-Wunused-variable]
   size_t i,j,row_mean_ind;
            ^
qnorm.c: In function 'using_target_via_subset_part1':
qnorm.c:2723:14: warning: variable 'ind' set but not used [-Wunused-but-set-variable]
   size_t i,j,ind,target_ind;
              ^~~
qnorm.c: In function 'using_target_via_subset_part2':
qnorm.c:2822:11: warning: unused variable 'datvec' [-Wunused-variable]
   double *datvec;
           ^~~~~~
qnorm.c:2821:11: warning: unused variable 'sample_percentiles' [-Wunused-variable]
   double *sample_percentiles;
           ^~~~~~~~~~~~~~~~~~
qnorm.c: In function 'using_target_via_subset':
qnorm.c:2971:11: warning: unused variable 'datvec' [-Wunused-variable]
   double *datvec;
           ^~~~~~
qnorm.c:2970:11: warning: unused variable 'sample_percentiles' [-Wunused-variable]
   double *sample_percentiles;
           ^~~~~~~~~~~~~~~~~~
qnorm.c:2966:7: warning: unused variable 'non_na' [-Wunused-variable]
   int non_na = 0;
       ^~~~~~
qnorm.c:2965:7: warning: unused variable 'targetnon_na' [-Wunused-variable]
   int targetnon_na = targetrows;
       ^~~~~~~~~~~~
qnorm.c:2963:28: warning: unused variable 'target_ind_double_floor' [-Wunused-variable]
   double target_ind_double,target_ind_double_floor;
                            ^~~~~~~~~~~~~~~~~~~~~~~
qnorm.c:2963:10: warning: unused variable 'target_ind_double' [-Wunused-variable]
   double target_ind_double,target_ind_double_floor;
          ^~~~~~~~~~~~~~~~~
qnorm.c:2962:10: warning: unused variable 'samplepercentile' [-Wunused-variable]
   double samplepercentile;
          ^~~~~~~~~~~~~~~~
qnorm.c:2961:11: warning: unused variable 'ranks' [-Wunused-variable]
   double *ranks = (double *)Calloc((rows),double);
           ^~~~~
qnorm.c:2959:11: warning: unused variable 'row_mean' [-Wunused-variable]
   double *row_mean = target;
           ^~~~~~~~
qnorm.c:2957:14: warning: unused variable 'dimat' [-Wunused-variable]
   dataitem **dimat;
              ^~~~~
qnorm.c:2955:18: warning: unused variable 'target_ind' [-Wunused-variable]
   size_t i,j,ind,target_ind;
                  ^~~~~~~~~~
qnorm.c:2955:14: warning: unused variable 'ind' [-Wunused-variable]
   size_t i,j,ind,target_ind;
              ^~~
qnorm.c:2955:12: warning: unused variable 'j' [-Wunused-variable]
   size_t i,j,ind,target_ind;
            ^
qnorm.c: In function 'R_qnorm_using_target':
qnorm.c:2113:3: warning: 'target_rows' may be used uninitialized in this function [-Wmaybe-uninitialized]
   qnorm_c_using_target_l(Xptr, rows, cols ,targetptr, target_rows);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
qnorm.c: In function 'R_qnorm_using_target_via_subset':
qnorm.c:3240:3: warning: 'target_rows' may be used uninitialized in this function [-Wmaybe-uninitialized]
   qnorm_c_using_target_via_subset_l(Xptr, rows, cols, subsetptr, targetptr, target_rows);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"C:/rtools40/mingw64/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c rlm.c -o rlm.o
"C:/rtools40/mingw64/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c rlm_anova.c -o rlm_anova.o
rlm_anova.c: In function 'rlm_fit_anova_given_probe_effects_engine':
rlm_anova.c:1235:10: warning: unused variable 'endprobe' [-Wunused-variable]
   double endprobe;
          ^~~~~~~~
rlm_anova.c: In function 'rlm_compute_se_anova_given_probe_effects':
rlm_anova.c:1426:19: warning: unused variable 'varderivpsi' [-Wunused-variable]
   double vs=0.0,m,varderivpsi=0.0;
                   ^~~~~~~~~~~
rlm_anova.c:1426:17: warning: unused variable 'm' [-Wunused-variable]
   double vs=0.0,m,varderivpsi=0.0;
                 ^
rlm_anova.c:1426:10: warning: unused variable 'vs' [-Wunused-variable]
   double vs=0.0,m,varderivpsi=0.0;
          ^~
rlm_anova.c:1419:10: warning: unused variable 'scale' [-Wunused-variable]
   double scale=0.0;
          ^~~~~
rlm_anova.c:1418:10: warning: unused variable 'Kappa' [-Wunused-variable]
   double Kappa=0.0;      /* A correction factor */
          ^~~~~
rlm_anova.c:1417:10: warning: unused variable 'sumderivpsi' [-Wunused-variable]
   double sumderivpsi=0.0; /* sum of psi'(r_i) */
          ^~~~~~~~~~~
rlm_anova.c:1415:10: warning: unused variable 'sumpsi2' [-Wunused-variable]
   double sumpsi2=0.0;  /* sum of psi(r_i)^2 */
          ^~~~~~~
rlm_anova.c:1414:10: warning: unused variable 'k1' [-Wunused-variable]
   double k1 = psi_k;   /*  was 1.345; */
          ^~
rlm_anova.c: In function 'rlm_wfit_anova_given_probe_effects_engine':
rlm_anova.c:1505:10: warning: unused variable 'endprobe' [-Wunused-variable]
   double endprobe;
          ^~~~~~~~
"C:/rtools40/mingw64/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c rlm_se.c -o rlm_se.o
"C:/rtools40/mingw64/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c rma_background4.c -o rma_background4.o
rma_background4.c: In function 'R_rma_bg_correct':
rma_background4.c:509:12: warning: 'PMcopy' may be used uninitialized in this function [-Wmaybe-uninitialized]
     return PMcopy;
            ^~~~~~
"C:/rtools40/mingw64/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c rma_common.c -o rma_common.o
"C:/rtools40/mingw64/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.12-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c weightedkerneldensity.c -o weightedkerneldensity.o
C:/rtools40/mingw64/bin/gcc -shared -s -static-libgcc -o preprocessCore.dll tmp.def R_colSummarize.o R_plmd_interfaces.o R_plmr_interfaces.o R_rlm_interfaces.o R_subColSummarize.o R_subrcModel_interfaces.o avg.o avg_log.o biweight.o init_package.o lm.o log_avg.o log_median.o matrix_functions.o median.o median_log.o medianpolish.o plmd.o plmr.o psi_fns.o qnorm.o rlm.o rlm_anova.o rlm_se.o rma_background4.o rma_common.o weightedkerneldensity.o -LC:/Users/BIOCBU~1/BBS-3~1.12-/R/bin/x64 -lRlapack -LC:/Users/BIOCBU~1/BBS-3~1.12-/R/bin/x64 -lRblas -lgfortran -lm -lquadmath -LC:/extsoft/lib/x64 -LC:/extsoft/lib -LC:/Users/BIOCBU~1/BBS-3~1.12-/R/bin/x64 -lR
installing to C:/Users/biocbuild/bbs-3.12-bioc/meat/preprocessCore.buildbin-libdir/preprocessCore/libs/x64
** testing if installed package can be loaded
* MD5 sums
packaged installation of 'preprocessCore' as preprocessCore_1.52.1.zip
* DONE (preprocessCore)
* installing to library 'C:/Users/biocbuild/bbs-3.12-bioc/R/library'
package 'preprocessCore' successfully unpacked and MD5 sums checked

Tests output

preprocessCore.Rcheck/tests_i386/PLMdtest.Rout


R version 4.0.5 (2021-03-31) -- "Shake and Throw"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: i386-w64-mingw32/i386 (32-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> 
> 
> library(preprocessCore)
> 
> 
> values <- rnorm(100)
> group.labels <- sample(0:4,replace=TRUE, 100)
> 
> results <- double(10000)
> ngroups <- 2
> 
> 
> for (i in 1:10000){
+        values <- rnorm(100,sd=1)
+        values <- values/sd(values)
+        group.labels <- sample(0:(ngroups-1),replace=TRUE, 100)
+        blah <- .C("R_split_test",as.double(values), as.integer(100), as.integer(ngroups), as.integer(group.labels),double(1))
+        results[i] <- blah[[5]]
+ }
> 
> plot(sort(results),qchisq(0:9999/10000,ngroups-1))
> lm(qchisq(0:9999/10000,ngroups-1) ~ sort(results))

Call:
lm(formula = qchisq(0:9999/10000, ngroups - 1) ~ sort(results))

Coefficients:
  (Intercept)  sort(results)  
     -0.01008        0.99451  

> 
> 
> 
> boxplot(values ~ group.labels,ylim=c(-2,2))
> 
> 
> 
> sc <- median(abs(resid(lm(values ~ 1))))/0.6745
> sum((resid(lm(values ~ 1))/sc)^2)/2
[1] 58.80563
> sum((resid(lm(values ~ as.factor(group.labels)))/sc)^2)/2
[1] 58.74577
> 
> 
> values <- rnorm(100)
> group.labels <- sample(0:4,replace=TRUE, 100)
> values[group.labels == 1] <- values[group.labels == 1] + 0.4
> 
> 
> blah <- .C("R_split_test",as.double(values), as.integer(100), as.integer(5), as.integer(group.labels),double(1))
> 
> boxplot(values ~ group.labels,ylim=c(-2,2))
> 
> 
> 
> library(preprocessCore)
> 
> .C("R_test_get_design_matrix",as.integer(4),as.integer(5))
1.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 
1.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 
1.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 
1.00 0.00 0.00 0.00 0.00 -1.00 -1.00 -1.00 
0.00 1.00 0.00 0.00 0.00 1.00 0.00 0.00 
0.00 1.00 0.00 0.00 0.00 0.00 1.00 0.00 
0.00 1.00 0.00 0.00 0.00 0.00 0.00 1.00 
0.00 1.00 0.00 0.00 0.00 -1.00 -1.00 -1.00 
0.00 0.00 1.00 0.00 0.00 1.00 0.00 0.00 
0.00 0.00 1.00 0.00 0.00 0.00 1.00 0.00 
0.00 0.00 1.00 0.00 0.00 0.00 0.00 1.00 
0.00 0.00 1.00 0.00 0.00 -1.00 -1.00 -1.00 
0.00 0.00 0.00 1.00 0.00 1.00 0.00 0.00 
0.00 0.00 0.00 1.00 0.00 0.00 1.00 0.00 
0.00 0.00 0.00 1.00 0.00 0.00 0.00 1.00 
0.00 0.00 0.00 1.00 0.00 -1.00 -1.00 -1.00 
0.00 0.00 0.00 0.00 1.00 1.00 0.00 0.00 
0.00 0.00 0.00 0.00 1.00 0.00 1.00 0.00 
0.00 0.00 0.00 0.00 1.00 0.00 0.00 1.00 
0.00 0.00 0.00 0.00 1.00 -1.00 -1.00 -1.00 

1.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 
1.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 
1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 
1.00 0.00 0.00 0.00 0.00 -1.00 -1.00 -1.00 -1.00 
0.00 1.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 
0.00 1.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 
0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 
0.00 1.00 0.00 0.00 0.00 -1.00 -1.00 -1.00 -1.00 
0.00 0.00 1.00 0.00 0.00 1.00 0.00 0.00 0.00 
0.00 0.00 1.00 0.00 0.00 0.00 0.00 1.00 0.00 
0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 1.00 
0.00 0.00 1.00 0.00 0.00 -1.00 -1.00 -1.00 -1.00 
0.00 0.00 0.00 1.00 0.00 1.00 0.00 0.00 0.00 
0.00 0.00 0.00 1.00 0.00 0.00 0.00 1.00 0.00 
0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 1.00 
0.00 0.00 0.00 1.00 0.00 -1.00 -1.00 -1.00 -1.00 
0.00 0.00 0.00 0.00 1.00 1.00 0.00 0.00 0.00 
0.00 0.00 0.00 0.00 1.00 0.00 0.00 1.00 0.00 
0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 1.00 
0.00 0.00 0.00 0.00 1.00 -1.00 -1.00 -1.00 -1.00 

1.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 
1.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 
1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 
1.00 0.00 0.00 0.00 0.00 -1.00 -1.00 -1.00 -1.00 -1.00 
0.00 1.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 
0.00 1.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 
0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 
0.00 1.00 0.00 0.00 0.00 -1.00 -1.00 -1.00 -1.00 -1.00 
0.00 0.00 1.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 
0.00 0.00 1.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 
0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 
0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 
0.00 0.00 0.00 1.00 0.00 1.00 0.00 0.00 0.00 0.00 
0.00 0.00 0.00 1.00 0.00 0.00 0.00 1.00 0.00 0.00 
0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 1.00 0.00 
0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 1.00 
0.00 0.00 0.00 0.00 1.00 1.00 0.00 0.00 0.00 0.00 
0.00 0.00 0.00 0.00 1.00 0.00 0.00 1.00 0.00 0.00 
0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 1.00 0.00 
0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 1.00 
[[1]]
[1] 4

[[2]]
[1] 5

> 
> 
> 
> chips <- as.factor(rep(c(1,2,3,4,5,6),c(5,5,5,5,5,5)))
> probes <- rep(c(1,3,4,5,6),6)
>        
> probes[c(1,6,11)] <- 2
> ##probes[24 + c(8,16,24)] <- 10
> probes <- as.factor(probes)
> 
> 
> model.matrix(~ -1 + probes)%*%contr.sum(6)
   [,1] [,2] [,3] [,4] [,5]
1     0    1    0    0    0
2     0    0    1    0    0
3     0    0    0    1    0
4     0    0    0    0    1
5    -1   -1   -1   -1   -1
6     0    1    0    0    0
7     0    0    1    0    0
8     0    0    0    1    0
9     0    0    0    0    1
10   -1   -1   -1   -1   -1
11    0    1    0    0    0
12    0    0    1    0    0
13    0    0    0    1    0
14    0    0    0    0    1
15   -1   -1   -1   -1   -1
16    1    0    0    0    0
17    0    0    1    0    0
18    0    0    0    1    0
19    0    0    0    0    1
20   -1   -1   -1   -1   -1
21    1    0    0    0    0
22    0    0    1    0    0
23    0    0    0    1    0
24    0    0    0    0    1
25   -1   -1   -1   -1   -1
26    1    0    0    0    0
27    0    0    1    0    0
28    0    0    0    1    0
29    0    0    0    0    1
30   -1   -1   -1   -1   -1
> 
> 
> probes <- rep(c(1,3,4,5,6),6)
>        
> probes[c(1,6,11)] <- 2
> probes[c(20,25,30)] <- 7
> probes <- as.factor(probes)
> model.matrix(~ -1 + probes)%*%contr.sum(7)
   [,1] [,2] [,3] [,4] [,5] [,6]
1     0    1    0    0    0    0
2     0    0    1    0    0    0
3     0    0    0    1    0    0
4     0    0    0    0    1    0
5     0    0    0    0    0    1
6     0    1    0    0    0    0
7     0    0    1    0    0    0
8     0    0    0    1    0    0
9     0    0    0    0    1    0
10    0    0    0    0    0    1
11    0    1    0    0    0    0
12    0    0    1    0    0    0
13    0    0    0    1    0    0
14    0    0    0    0    1    0
15    0    0    0    0    0    1
16    1    0    0    0    0    0
17    0    0    1    0    0    0
18    0    0    0    1    0    0
19    0    0    0    0    1    0
20   -1   -1   -1   -1   -1   -1
21    1    0    0    0    0    0
22    0    0    1    0    0    0
23    0    0    0    1    0    0
24    0    0    0    0    1    0
25   -1   -1   -1   -1   -1   -1
26    1    0    0    0    0    0
27    0    0    1    0    0    0
28    0    0    0    1    0    0
29    0    0    0    0    1    0
30   -1   -1   -1   -1   -1   -1
> 
> 
> 
> 
> probes <- rep(c(1,3,4,5,6),6)
>        
> probes[c(1,6,11)] <- 2
> probes[c(5,10,15)] <- 7
> probes <- as.factor(probes)
> model.matrix(~ -1 + probes)%*%contr.sum(7)
   [,1] [,2] [,3] [,4] [,5] [,6]
1     0    1    0    0    0    0
2     0    0    1    0    0    0
3     0    0    0    1    0    0
4     0    0    0    0    1    0
5    -1   -1   -1   -1   -1   -1
6     0    1    0    0    0    0
7     0    0    1    0    0    0
8     0    0    0    1    0    0
9     0    0    0    0    1    0
10   -1   -1   -1   -1   -1   -1
11    0    1    0    0    0    0
12    0    0    1    0    0    0
13    0    0    0    1    0    0
14    0    0    0    0    1    0
15   -1   -1   -1   -1   -1   -1
16    1    0    0    0    0    0
17    0    0    1    0    0    0
18    0    0    0    1    0    0
19    0    0    0    0    1    0
20    0    0    0    0    0    1
21    1    0    0    0    0    0
22    0    0    1    0    0    0
23    0    0    0    1    0    0
24    0    0    0    0    1    0
25    0    0    0    0    0    1
26    1    0    0    0    0    0
27    0    0    1    0    0    0
28    0    0    0    1    0    0
29    0    0    0    0    1    0
30    0    0    0    0    0    1
> 
> 
> 
> probes <- rep(c(1,3,4,5,6),6)
>        
> probes[c(1,6,11)] <- 2
> probes[1+c(1,6,11)] <- 8
> probes[2+c(1,6,11)] <- 9
> probes[3+c(1,6,11)] <- 10
> probes[c(5,10,15)] <- 7
> probes <- as.factor(probes)
> model.matrix(~ -1 + probes)%*%contr.sum(10)
   [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9]
1     0    1    0    0    0    0    0    0    0
2     0    0    0    0    0    0    0    1    0
3     0    0    0    0    0    0    0    0    1
4    -1   -1   -1   -1   -1   -1   -1   -1   -1
5     0    0    0    0    0    0    1    0    0
6     0    1    0    0    0    0    0    0    0
7     0    0    0    0    0    0    0    1    0
8     0    0    0    0    0    0    0    0    1
9    -1   -1   -1   -1   -1   -1   -1   -1   -1
10    0    0    0    0    0    0    1    0    0
11    0    1    0    0    0    0    0    0    0
12    0    0    0    0    0    0    0    1    0
13    0    0    0    0    0    0    0    0    1
14   -1   -1   -1   -1   -1   -1   -1   -1   -1
15    0    0    0    0    0    0    1    0    0
16    1    0    0    0    0    0    0    0    0
17    0    0    1    0    0    0    0    0    0
18    0    0    0    1    0    0    0    0    0
19    0    0    0    0    1    0    0    0    0
20    0    0    0    0    0    1    0    0    0
21    1    0    0    0    0    0    0    0    0
22    0    0    1    0    0    0    0    0    0
23    0    0    0    1    0    0    0    0    0
24    0    0    0    0    1    0    0    0    0
25    0    0    0    0    0    1    0    0    0
26    1    0    0    0    0    0    0    0    0
27    0    0    1    0    0    0    0    0    0
28    0    0    0    1    0    0    0    0    0
29    0    0    0    0    1    0    0    0    0
30    0    0    0    0    0    1    0    0    0
> 
> 
> 
> 
> 
> 
> 
> 
> 
> true.probes <- c(4,3,2,1,-1,-2,-3,-4)
> 
> true.chips  <- c(8,9,10,11,12,13)
> 
> 
> y <- outer(true.probes,true.chips,"+")
> 
> 
> 
> estimate.coefficients <- function(y){
+ 
+ 
+ colmean <- apply(y,2,mean)
+ 
+ y <- sweep(y,2,FUN="-",colmean)
+ 
+ rowmean <- apply(y,1,mean)
+ y <- sweep(y,1,FUN="-",rowmean)
+ 
+ 
+ list(y,colmean,rowmean)
+ }
> estimate.coefficients(y)
[[1]]
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    0    0    0    0    0    0
[2,]    0    0    0    0    0    0
[3,]    0    0    0    0    0    0
[4,]    0    0    0    0    0    0
[5,]    0    0    0    0    0    0
[6,]    0    0    0    0    0    0
[7,]    0    0    0    0    0    0
[8,]    0    0    0    0    0    0

[[2]]
[1]  8  9 10 11 12 13

[[3]]
[1]  4  3  2  1 -1 -2 -3 -4

> 
> 
> 
> y <- outer(true.probes,true.chips,"+")
> 
> 
> estimate.coefficients(y)
[[1]]
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    0    0    0    0    0    0
[2,]    0    0    0    0    0    0
[3,]    0    0    0    0    0    0
[4,]    0    0    0    0    0    0
[5,]    0    0    0    0    0    0
[6,]    0    0    0    0    0    0
[7,]    0    0    0    0    0    0
[8,]    0    0    0    0    0    0

[[2]]
[1]  8  9 10 11 12 13

[[3]]
[1]  4  3  2  1 -1 -2 -3 -4

> 
> 
> 
> 
> y2 <- sweep(y,2,FUN="-",apply(y,2,mean))
> 
> 
> 
> c(3.875, 2.875,  1.875,  0.875,
+  -1.125, -2.125, -3.125, -4, -2.25)
[1]  3.875  2.875  1.875  0.875 -1.125 -2.125 -3.125 -4.000 -2.250
> 
> 
> 
> 
> cp <- rep(c(1,2,3,4,5,6),rep(8,6))
> pr <- rep(c(1,2,3,4,5,6,7,8),6)
> 
> 
> pr[c(32,40,48)] <- 9
> 
> 
> 
> 
> true.probes <- c(4,3,2,1,-1,-2,-3,-4)
> 
> true.chips  <- c(8,9,10,11,12,10)
> 
> 
> y <- outer(true.probes,true.chips,"+") + rnorm(48,0,0.1)
> 
> y[8,4:6] <- c(11,12,10)+2 + rnorm(3,0,0.1)
> 
> 
> lm(as.vector(y) ~  -1 + as.factor(cp) + C(as.factor(pr),"contr.sum"))

Call:
lm(formula = as.vector(y) ~ -1 + as.factor(cp) + C(as.factor(pr), 
    "contr.sum"))

Coefficients:
                as.factor(cp)1                  as.factor(cp)2  
                        8.2382                          9.2159  
                as.factor(cp)3                  as.factor(cp)4  
                       10.2545                         11.1715  
                as.factor(cp)5                  as.factor(cp)6  
                       12.2515                         10.2210  
C(as.factor(pr), "contr.sum")1  C(as.factor(pr), "contr.sum")2  
                        3.7546                          2.7787  
C(as.factor(pr), "contr.sum")3  C(as.factor(pr), "contr.sum")4  
                        1.8114                          0.7783  
C(as.factor(pr), "contr.sum")5  C(as.factor(pr), "contr.sum")6  
                       -1.2690                         -2.2596  
C(as.factor(pr), "contr.sum")7  C(as.factor(pr), "contr.sum")8  
                       -3.2214                         -4.2617  

> 
> 
> matplot(y,type="l")
> matplot(matrix(fitted( lm(as.vector(y) ~  -1 + as.factor(cp) +
+ C(as.factor(pr),"contr.sum"))),ncol=6),type="l")
> 
> 
> library(preprocessCore)
> true.probes <- c(4,3,2,1,-1,-2,-3,-4)
> 
> true.chips  <- c(8,9,10,11,12,10)
> 
> y <- outer(true.probes,true.chips,"+") + rnorm(48,0,0.25)
> 
> y[8,4:6] <- c(11,12,10)+ 2.5 + rnorm(3,0,0.25)
> y[5,4:6] <- c(11,12,10)+-2.5 + rnorm(3,0,0.25)
> 
> 
> 
> ###.C("plmd_fit_R", as.double(y), as.integer(8), as.integer(6),
> ###		as.integer(2), as.integer(c(1,1,1,2,2,2) - 1),
> ###		double(6 +2*8),
> ###		double(48),
> ###		double(48))
> 
> ###matplot(matrix(.C("plmd_fit_R", as.double(y), as.integer(8), as.integer(6),
> ###		as.integer(2), as.integer(c(1,1,1,2,2,2) - 1),
> ###		double(6 +2*8),
> ###		double(48),
> ###		double(48))[[7]],ncol=6))
> ###		
> 
> 
> ##.Call("R_plmd_model",y,0,1.3345,as.integer(c(1,1,1,2,2,2) - 1),as.integer(2))
> rcModelPLM(y)
$Estimates
 [1]  8.2819412  9.4477509 10.4777294 11.4923290 12.2502594 10.4090504
 [7]  3.7269081  2.6637744  1.4492467  0.5651016 -1.8403136 -2.2703682
[13] -3.3069234 -0.9874257

$Weights
          [,1]      [,2]      [,3]      [,4]      [,5]      [,6]
[1,] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
[2,] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
[3,] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
[4,] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
[5,] 0.8023871 1.0000000 0.7224635 0.3868699 1.0000000 0.4255972
[6,] 0.7441400 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
[7,] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
[8,] 0.1442695 0.1539221 0.1473763 0.1578369 0.1291737 0.1621687

$Residuals
            [,1]       [,2]         [,3]        [,4]         [,5]        [,6]
[1,]  0.02849379 -0.2259202 -0.044739647  0.27980330  0.003574175 -0.04121139
[2,]  0.20745006 -0.2358739 -0.028750307 -0.20541347  0.336862455 -0.07427480
[3,] -0.04633630  0.3535887  0.048861171 -0.23139234 -0.392664479  0.26794322
[4,]  0.31256526  0.2440252  0.003998863 -0.17236708 -0.295696966 -0.09252525
[5,]  0.59595860  0.2828228  0.661946862 -1.23711211 -0.282028684 -1.12457185
[6,] -0.64305201  0.3171805 -0.169347640  0.29845901  0.149784236 -0.11755545
[7,] -0.02335910 -0.2573544  0.190224763  0.03103762  0.001686924  0.05776419
[8,] -3.31658781 -3.1085124 -3.246652900  3.03144907  3.704176920  2.95047138

$StdErrors
 [1] 0.2444134 0.2368022 0.2414594 0.2474146 0.2378142 0.2464230 0.2443262
 [8] 0.2443262 0.2443262 0.2443262 0.2796659 0.2486489 0.2443262 0.5681926

$Scale
[1] 0.3557443

> rcModelPLMd(y,c(1,1,1,2,2,2))
$Estimates
 [1]  7.9805620  9.1180981 10.1622295 11.0788346 12.0467254 10.0215699
 [7]  4.0338719  2.9889479  1.8087707  0.9183288 -1.0112268 -2.4821180
[13] -1.9215695 -2.9817499 -3.8958327  2.5425776

$Weights
          [,1]      [,2] [,3]      [,4]      [,5]      [,6]
[1,] 1.0000000 1.0000000    1 0.7171925 1.0000000 1.0000000
[2,] 1.0000000 1.0000000    1 1.0000000 1.0000000 1.0000000
[3,] 1.0000000 0.8558964    1 1.0000000 0.5050134 0.9363818
[4,] 1.0000000 1.0000000    1 1.0000000 0.6220791 1.0000000
[5,] 1.0000000 1.0000000    1 1.0000000 0.4919145 1.0000000
[6,] 0.4013166 0.9295739    1 0.7629065 1.0000000 1.0000000
[7,] 1.0000000 1.0000000    1 1.0000000 1.0000000 1.0000000
[8,] 1.0000000 1.0000000    1 1.0000000 0.7336657 1.0000000

$Residuals
            [,1]       [,2]         [,3]        [,4]         [,5]        [,6]
[1,]  0.02290926 -0.2032312 -0.036203541  0.38633392 -0.099855601  0.03930533
[2,]  0.18365583 -0.2313946 -0.038423891 -0.11709254  0.215222989 -0.01196777
[3,] -0.10448105  0.3237175  0.004837066 -0.17742193 -0.548654466  0.29589973
[4,]  0.26071732  0.2204508 -0.033728432 -0.11209986 -0.445390143 -0.05827192
[5,]  0.06825111 -0.2166111  0.148360021 -0.18181329  0.563309736 -0.09528693
[6,] -0.69047148  0.2980346 -0.202646466  0.36315470  0.004519527 -0.07887366
[7,] -0.04715333 -0.2528751  0.180551179  0.11935855 -0.119952542  0.12007122
[8,] -0.10680149  0.1295474 -0.022745937 -0.08505978  0.377707669 -0.19205138

$StdErrors
 [1] 0.10203679 0.11134602 0.09411441 0.11038913 0.13747988 0.10074911
 [7] 0.11329479 0.10256288 0.14229687 0.11063947 0.14526337 0.17652022
[13] 0.14586111 0.10256288 0.14526337 0.00000000

$WasSplit
[1] 0 0 0 0 1 0 0 1

> 
> ###R_plmd_model(SEXP Y, SEXP PsiCode, SEXP PsiK, SEXP Groups, SEXP Ngroups)
> 
> 
> 
> 
> 
> pr[seq(3,48,8)][1:3] <- 10
> 
> y[seq(3,48,8)][1:3] <- c(8,9,10) -3 + rnorm(3,0,0.1)
> lm(as.vector(y) ~  -1 + as.factor(cp) + C(as.factor(pr),"contr.sum"))

Call:
lm(formula = as.vector(y) ~ -1 + as.factor(cp) + C(as.factor(pr), 
    "contr.sum"))

Coefficients:
                as.factor(cp)1                  as.factor(cp)2  
                         7.929                           9.050  
                as.factor(cp)3                  as.factor(cp)4  
                        10.130                          10.859  
                as.factor(cp)5                  as.factor(cp)6  
                        11.796                           9.780  
C(as.factor(pr), "contr.sum")1  C(as.factor(pr), "contr.sum")2  
                         4.196                           3.133  
C(as.factor(pr), "contr.sum")3  C(as.factor(pr), "contr.sum")4  
                         1.902                           1.034  
C(as.factor(pr), "contr.sum")5  C(as.factor(pr), "contr.sum")6  
                        -1.555                          -1.829  
C(as.factor(pr), "contr.sum")7  C(as.factor(pr), "contr.sum")8  
                        -2.838                          -3.845  
C(as.factor(pr), "contr.sum")9  
                         2.813  

> 
> 
> proc.time()
   user  system elapsed 
   2.32    0.06    2.37 

preprocessCore.Rcheck/tests_x64/PLMdtest.Rout


R version 4.0.5 (2021-03-31) -- "Shake and Throw"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> 
> 
> library(preprocessCore)
> 
> 
> values <- rnorm(100)
> group.labels <- sample(0:4,replace=TRUE, 100)
> 
> results <- double(10000)
> ngroups <- 2
> 
> 
> for (i in 1:10000){
+        values <- rnorm(100,sd=1)
+        values <- values/sd(values)
+        group.labels <- sample(0:(ngroups-1),replace=TRUE, 100)
+        blah <- .C("R_split_test",as.double(values), as.integer(100), as.integer(ngroups), as.integer(group.labels),double(1))
+        results[i] <- blah[[5]]
+ }
> 
> plot(sort(results),qchisq(0:9999/10000,ngroups-1))
> lm(qchisq(0:9999/10000,ngroups-1) ~ sort(results))

Call:
lm(formula = qchisq(0:9999/10000, ngroups - 1) ~ sort(results))

Coefficients:
  (Intercept)  sort(results)  
     -0.01356        0.97810  

> 
> 
> 
> boxplot(values ~ group.labels,ylim=c(-2,2))
> 
> 
> 
> sc <- median(abs(resid(lm(values ~ 1))))/0.6745
> sum((resid(lm(values ~ 1))/sc)^2)/2
[1] 45.24676
> sum((resid(lm(values ~ as.factor(group.labels)))/sc)^2)/2
[1] 44.89459
> 
> 
> values <- rnorm(100)
> group.labels <- sample(0:4,replace=TRUE, 100)
> values[group.labels == 1] <- values[group.labels == 1] + 0.4
> 
> 
> blah <- .C("R_split_test",as.double(values), as.integer(100), as.integer(5), as.integer(group.labels),double(1))
> 
> boxplot(values ~ group.labels,ylim=c(-2,2))
> 
> 
> 
> library(preprocessCore)
> 
> .C("R_test_get_design_matrix",as.integer(4),as.integer(5))
1.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 
1.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 
1.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 
1.00 0.00 0.00 0.00 0.00 -1.00 -1.00 -1.00 
0.00 1.00 0.00 0.00 0.00 1.00 0.00 0.00 
0.00 1.00 0.00 0.00 0.00 0.00 1.00 0.00 
0.00 1.00 0.00 0.00 0.00 0.00 0.00 1.00 
0.00 1.00 0.00 0.00 0.00 -1.00 -1.00 -1.00 
0.00 0.00 1.00 0.00 0.00 1.00 0.00 0.00 
0.00 0.00 1.00 0.00 0.00 0.00 1.00 0.00 
0.00 0.00 1.00 0.00 0.00 0.00 0.00 1.00 
0.00 0.00 1.00 0.00 0.00 -1.00 -1.00 -1.00 
0.00 0.00 0.00 1.00 0.00 1.00 0.00 0.00 
0.00 0.00 0.00 1.00 0.00 0.00 1.00 0.00 
0.00 0.00 0.00 1.00 0.00 0.00 0.00 1.00 
0.00 0.00 0.00 1.00 0.00 -1.00 -1.00 -1.00 
0.00 0.00 0.00 0.00 1.00 1.00 0.00 0.00 
0.00 0.00 0.00 0.00 1.00 0.00 1.00 0.00 
0.00 0.00 0.00 0.00 1.00 0.00 0.00 1.00 
0.00 0.00 0.00 0.00 1.00 -1.00 -1.00 -1.00 

1.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 
1.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 
1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 
1.00 0.00 0.00 0.00 0.00 -1.00 -1.00 -1.00 -1.00 
0.00 1.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 
0.00 1.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 
0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 
0.00 1.00 0.00 0.00 0.00 -1.00 -1.00 -1.00 -1.00 
0.00 0.00 1.00 0.00 0.00 1.00 0.00 0.00 0.00 
0.00 0.00 1.00 0.00 0.00 0.00 0.00 1.00 0.00 
0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 1.00 
0.00 0.00 1.00 0.00 0.00 -1.00 -1.00 -1.00 -1.00 
0.00 0.00 0.00 1.00 0.00 1.00 0.00 0.00 0.00 
0.00 0.00 0.00 1.00 0.00 0.00 0.00 1.00 0.00 
0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 1.00 
0.00 0.00 0.00 1.00 0.00 -1.00 -1.00 -1.00 -1.00 
0.00 0.00 0.00 0.00 1.00 1.00 0.00 0.00 0.00 
0.00 0.00 0.00 0.00 1.00 0.00 0.00 1.00 0.00 
0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 1.00 
0.00 0.00 0.00 0.00 1.00 -1.00 -1.00 -1.00 -1.00 

1.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 
1.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 
1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 
1.00 0.00 0.00 0.00 0.00 -1.00 -1.00 -1.00 -1.00 -1.00 
0.00 1.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 
0.00 1.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 
0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 
0.00 1.00 0.00 0.00 0.00 -1.00 -1.00 -1.00 -1.00 -1.00 
0.00 0.00 1.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 
0.00 0.00 1.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 
0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 
0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 
0.00 0.00 0.00 1.00 0.00 1.00 0.00 0.00 0.00 0.00 
0.00 0.00 0.00 1.00 0.00 0.00 0.00 1.00 0.00 0.00 
0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 1.00 0.00 
0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 1.00 
0.00 0.00 0.00 0.00 1.00 1.00 0.00 0.00 0.00 0.00 
0.00 0.00 0.00 0.00 1.00 0.00 0.00 1.00 0.00 0.00 
0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 1.00 0.00 
0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 1.00 
[[1]]
[1] 4

[[2]]
[1] 5

> 
> 
> 
> chips <- as.factor(rep(c(1,2,3,4,5,6),c(5,5,5,5,5,5)))
> probes <- rep(c(1,3,4,5,6),6)
>        
> probes[c(1,6,11)] <- 2
> ##probes[24 + c(8,16,24)] <- 10
> probes <- as.factor(probes)
> 
> 
> model.matrix(~ -1 + probes)%*%contr.sum(6)
   [,1] [,2] [,3] [,4] [,5]
1     0    1    0    0    0
2     0    0    1    0    0
3     0    0    0    1    0
4     0    0    0    0    1
5    -1   -1   -1   -1   -1
6     0    1    0    0    0
7     0    0    1    0    0
8     0    0    0    1    0
9     0    0    0    0    1
10   -1   -1   -1   -1   -1
11    0    1    0    0    0
12    0    0    1    0    0
13    0    0    0    1    0
14    0    0    0    0    1
15   -1   -1   -1   -1   -1
16    1    0    0    0    0
17    0    0    1    0    0
18    0    0    0    1    0
19    0    0    0    0    1
20   -1   -1   -1   -1   -1
21    1    0    0    0    0
22    0    0    1    0    0
23    0    0    0    1    0
24    0    0    0    0    1
25   -1   -1   -1   -1   -1
26    1    0    0    0    0
27    0    0    1    0    0
28    0    0    0    1    0
29    0    0    0    0    1
30   -1   -1   -1   -1   -1
> 
> 
> probes <- rep(c(1,3,4,5,6),6)
>        
> probes[c(1,6,11)] <- 2
> probes[c(20,25,30)] <- 7
> probes <- as.factor(probes)
> model.matrix(~ -1 + probes)%*%contr.sum(7)
   [,1] [,2] [,3] [,4] [,5] [,6]
1     0    1    0    0    0    0
2     0    0    1    0    0    0
3     0    0    0    1    0    0
4     0    0    0    0    1    0
5     0    0    0    0    0    1
6     0    1    0    0    0    0
7     0    0    1    0    0    0
8     0    0    0    1    0    0
9     0    0    0    0    1    0
10    0    0    0    0    0    1
11    0    1    0    0    0    0
12    0    0    1    0    0    0
13    0    0    0    1    0    0
14    0    0    0    0    1    0
15    0    0    0    0    0    1
16    1    0    0    0    0    0
17    0    0    1    0    0    0
18    0    0    0    1    0    0
19    0    0    0    0    1    0
20   -1   -1   -1   -1   -1   -1
21    1    0    0    0    0    0
22    0    0    1    0    0    0
23    0    0    0    1    0    0
24    0    0    0    0    1    0
25   -1   -1   -1   -1   -1   -1
26    1    0    0    0    0    0
27    0    0    1    0    0    0
28    0    0    0    1    0    0
29    0    0    0    0    1    0
30   -1   -1   -1   -1   -1   -1
> 
> 
> 
> 
> probes <- rep(c(1,3,4,5,6),6)
>        
> probes[c(1,6,11)] <- 2
> probes[c(5,10,15)] <- 7
> probes <- as.factor(probes)
> model.matrix(~ -1 + probes)%*%contr.sum(7)
   [,1] [,2] [,3] [,4] [,5] [,6]
1     0    1    0    0    0    0
2     0    0    1    0    0    0
3     0    0    0    1    0    0
4     0    0    0    0    1    0
5    -1   -1   -1   -1   -1   -1
6     0    1    0    0    0    0
7     0    0    1    0    0    0
8     0    0    0    1    0    0
9     0    0    0    0    1    0
10   -1   -1   -1   -1   -1   -1
11    0    1    0    0    0    0
12    0    0    1    0    0    0
13    0    0    0    1    0    0
14    0    0    0    0    1    0
15   -1   -1   -1   -1   -1   -1
16    1    0    0    0    0    0
17    0    0    1    0    0    0
18    0    0    0    1    0    0
19    0    0    0    0    1    0
20    0    0    0    0    0    1
21    1    0    0    0    0    0
22    0    0    1    0    0    0
23    0    0    0    1    0    0
24    0    0    0    0    1    0
25    0    0    0    0    0    1
26    1    0    0    0    0    0
27    0    0    1    0    0    0
28    0    0    0    1    0    0
29    0    0    0    0    1    0
30    0    0    0    0    0    1
> 
> 
> 
> probes <- rep(c(1,3,4,5,6),6)
>        
> probes[c(1,6,11)] <- 2
> probes[1+c(1,6,11)] <- 8
> probes[2+c(1,6,11)] <- 9
> probes[3+c(1,6,11)] <- 10
> probes[c(5,10,15)] <- 7
> probes <- as.factor(probes)
> model.matrix(~ -1 + probes)%*%contr.sum(10)
   [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9]
1     0    1    0    0    0    0    0    0    0
2     0    0    0    0    0    0    0    1    0
3     0    0    0    0    0    0    0    0    1
4    -1   -1   -1   -1   -1   -1   -1   -1   -1
5     0    0    0    0    0    0    1    0    0
6     0    1    0    0    0    0    0    0    0
7     0    0    0    0    0    0    0    1    0
8     0    0    0    0    0    0    0    0    1
9    -1   -1   -1   -1   -1   -1   -1   -1   -1
10    0    0    0    0    0    0    1    0    0
11    0    1    0    0    0    0    0    0    0
12    0    0    0    0    0    0    0    1    0
13    0    0    0    0    0    0    0    0    1
14   -1   -1   -1   -1   -1   -1   -1   -1   -1
15    0    0    0    0    0    0    1    0    0
16    1    0    0    0    0    0    0    0    0
17    0    0    1    0    0    0    0    0    0
18    0    0    0    1    0    0    0    0    0
19    0    0    0    0    1    0    0    0    0
20    0    0    0    0    0    1    0    0    0
21    1    0    0    0    0    0    0    0    0
22    0    0    1    0    0    0    0    0    0
23    0    0    0    1    0    0    0    0    0
24    0    0    0    0    1    0    0    0    0
25    0    0    0    0    0    1    0    0    0
26    1    0    0    0    0    0    0    0    0
27    0    0    1    0    0    0    0    0    0
28    0    0    0    1    0    0    0    0    0
29    0    0    0    0    1    0    0    0    0
30    0    0    0    0    0    1    0    0    0
> 
> 
> 
> 
> 
> 
> 
> 
> 
> true.probes <- c(4,3,2,1,-1,-2,-3,-4)
> 
> true.chips  <- c(8,9,10,11,12,13)
> 
> 
> y <- outer(true.probes,true.chips,"+")
> 
> 
> 
> estimate.coefficients <- function(y){
+ 
+ 
+ colmean <- apply(y,2,mean)
+ 
+ y <- sweep(y,2,FUN="-",colmean)
+ 
+ rowmean <- apply(y,1,mean)
+ y <- sweep(y,1,FUN="-",rowmean)
+ 
+ 
+ list(y,colmean,rowmean)
+ }
> estimate.coefficients(y)
[[1]]
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    0    0    0    0    0    0
[2,]    0    0    0    0    0    0
[3,]    0    0    0    0    0    0
[4,]    0    0    0    0    0    0
[5,]    0    0    0    0    0    0
[6,]    0    0    0    0    0    0
[7,]    0    0    0    0    0    0
[8,]    0    0    0    0    0    0

[[2]]
[1]  8  9 10 11 12 13

[[3]]
[1]  4  3  2  1 -1 -2 -3 -4

> 
> 
> 
> y <- outer(true.probes,true.chips,"+")
> 
> 
> estimate.coefficients(y)
[[1]]
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    0    0    0    0    0    0
[2,]    0    0    0    0    0    0
[3,]    0    0    0    0    0    0
[4,]    0    0    0    0    0    0
[5,]    0    0    0    0    0    0
[6,]    0    0    0    0    0    0
[7,]    0    0    0    0    0    0
[8,]    0    0    0    0    0    0

[[2]]
[1]  8  9 10 11 12 13

[[3]]
[1]  4  3  2  1 -1 -2 -3 -4

> 
> 
> 
> 
> y2 <- sweep(y,2,FUN="-",apply(y,2,mean))
> 
> 
> 
> c(3.875, 2.875,  1.875,  0.875,
+  -1.125, -2.125, -3.125, -4, -2.25)
[1]  3.875  2.875  1.875  0.875 -1.125 -2.125 -3.125 -4.000 -2.250
> 
> 
> 
> 
> cp <- rep(c(1,2,3,4,5,6),rep(8,6))
> pr <- rep(c(1,2,3,4,5,6,7,8),6)
> 
> 
> pr[c(32,40,48)] <- 9
> 
> 
> 
> 
> true.probes <- c(4,3,2,1,-1,-2,-3,-4)
> 
> true.chips  <- c(8,9,10,11,12,10)
> 
> 
> y <- outer(true.probes,true.chips,"+") + rnorm(48,0,0.1)
> 
> y[8,4:6] <- c(11,12,10)+2 + rnorm(3,0,0.1)
> 
> 
> lm(as.vector(y) ~  -1 + as.factor(cp) + C(as.factor(pr),"contr.sum"))

Call:
lm(formula = as.vector(y) ~ -1 + as.factor(cp) + C(as.factor(pr), 
    "contr.sum"))

Coefficients:
                as.factor(cp)1                  as.factor(cp)2  
                        8.2148                          9.2393  
                as.factor(cp)3                  as.factor(cp)4  
                       10.1974                         11.2772  
                as.factor(cp)5                  as.factor(cp)6  
                       12.2380                         10.2590  
C(as.factor(pr), "contr.sum")1  C(as.factor(pr), "contr.sum")2  
                        3.7750                          2.7208  
C(as.factor(pr), "contr.sum")3  C(as.factor(pr), "contr.sum")4  
                        1.7337                          0.8088  
C(as.factor(pr), "contr.sum")5  C(as.factor(pr), "contr.sum")6  
                       -1.2397                         -2.1793  
C(as.factor(pr), "contr.sum")7  C(as.factor(pr), "contr.sum")8  
                       -3.2674                         -4.1281  

> 
> 
> matplot(y,type="l")
> matplot(matrix(fitted( lm(as.vector(y) ~  -1 + as.factor(cp) +
+ C(as.factor(pr),"contr.sum"))),ncol=6),type="l")
> 
> 
> library(preprocessCore)
> true.probes <- c(4,3,2,1,-1,-2,-3,-4)
> 
> true.chips  <- c(8,9,10,11,12,10)
> 
> y <- outer(true.probes,true.chips,"+") + rnorm(48,0,0.25)
> 
> y[8,4:6] <- c(11,12,10)+ 2.5 + rnorm(3,0,0.25)
> y[5,4:6] <- c(11,12,10)+-2.5 + rnorm(3,0,0.25)
> 
> 
> 
> ###.C("plmd_fit_R", as.double(y), as.integer(8), as.integer(6),
> ###		as.integer(2), as.integer(c(1,1,1,2,2,2) - 1),
> ###		double(6 +2*8),
> ###		double(48),
> ###		double(48))
> 
> ###matplot(matrix(.C("plmd_fit_R", as.double(y), as.integer(8), as.integer(6),
> ###		as.integer(2), as.integer(c(1,1,1,2,2,2) - 1),
> ###		double(6 +2*8),
> ###		double(48),
> ###		double(48))[[7]],ncol=6))
> ###		
> 
> 
> ##.Call("R_plmd_model",y,0,1.3345,as.integer(c(1,1,1,2,2,2) - 1),as.integer(2))
> rcModelPLM(y)
$Estimates
 [1]  8.1687964  9.2298981 10.1464929 11.3348490 12.2518391 10.5055354
 [7]  3.6744910  2.5874066  1.8235978  0.8677364 -2.0284107 -2.4561176
[13] -3.3138428 -1.1548606

$Weights
          [,1]      [,2]      [,3]      [,4]      [,5]      [,6]
[1,] 0.7396212 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
[2,] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
[3,] 0.7558630 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
[4,] 1.0000000 1.0000000 1.0000000 0.6126187 1.0000000 1.0000000
[5,] 0.4819235 0.6217974 0.7254994 0.6986429 0.6609271 0.4726408
[6,] 1.0000000 1.0000000 1.0000000 1.0000000 0.6481949 1.0000000
[7,] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
[8,] 0.1480626 0.1267130 0.1287553 0.1297123 0.1304207 0.1422637

$Residuals
            [,1]        [,2]          [,3]        [,4]       [,5]         [,6]
[1,]  0.54645577  0.07378725 -0.0911250283 -0.09143215 -0.2942291 -0.001171311
[2,] -0.04472089 -0.26078319 -0.0594430378  0.18485559  0.2317358 -0.051644314
[3,] -0.53487103  0.08230178  0.1632634986 -0.08598930  0.1167596  0.127953643
[4,] -0.03951815  0.37025731 -0.0036030944 -0.65966454 -0.1263458  0.203332596
[5,]  0.83883953  0.65018971  0.5572527971 -0.57853156 -0.6118064 -0.855370470
[6,]  0.10556722 -0.39039510 -0.0099304687  0.20231883  0.6234926 -0.311705205
[7,] -0.02117358  0.12482906  0.0008348859  0.19425370 -0.3319761  0.033232048
[8,] -2.73054865 -3.19054304 -3.1399367128  3.11692214  3.0997395  2.841803168

$StdErrors
 [1] 0.2355424 0.2257619 0.2239633 0.2304818 0.2304918 0.2277775 0.2310061
 [8] 0.2270324 0.2307384 0.2332880 0.2768991 0.2326440 0.2270324 0.5508568

$Scale
[1] 0.3007053

> rcModelPLMd(y,c(1,1,1,2,2,2))
$Estimates
 [1]  7.926041  8.876086  9.795040 11.067591 11.955652 10.143860  3.980561
 [8]  2.899597  2.181496  1.189218 -1.030310 -2.401940 -2.151338 -2.981089
[15] -3.859197  2.173001

$Weights
          [,1]      [,2] [,3]      [,4]      [,5]      [,6]
[1,] 0.5074667 1.0000000    1 1.0000000 0.8061416 1.0000000
[2,] 1.0000000 1.0000000    1 1.0000000 1.0000000 1.0000000
[3,] 0.3771967 1.0000000    1 1.0000000 1.0000000 1.0000000
[4,] 1.0000000 0.6089971    1 0.3434466 1.0000000 1.0000000
[5,] 1.0000000 1.0000000    1 1.0000000 1.0000000 1.0000000
[6,] 1.0000000 0.7181609    1 1.0000000 0.3987678 0.9620296
[7,] 1.0000000 1.0000000    1 1.0000000 0.6652132 1.0000000
[8,] 1.0000000 1.0000000    1 1.0000000 1.0000000 1.0000000

$Residuals
            [,1]         [,2]        [,3]        [,4]        [,5]         [,6]
[1,]  0.48314112  0.121529879 -0.04574150 -0.13024336 -0.30411176  0.054434102
[2,] -0.11415604 -0.219161058 -0.02018001  0.13992388  0.21573263 -0.002159402
[3,] -0.65001440  0.078215691  0.15681831 -0.17662924  0.05504817  0.131730333
[4,] -0.11824514  0.402587601  0.02636810 -0.71388809 -0.15164086  0.243525671
[5,]  0.08349370  0.005901157 -0.08939486  0.06225620  0.05790988 -0.120166086
[6,]  0.04354301 -0.341362034  0.03674350  0.16479806  0.61490030 -0.254809353
[7,] -0.11117263  0.145887290  0.01953401  0.12875809 -0.36854322  0.062153060
[8,]  0.21654233 -0.132394778 -0.08414755  0.05631881  0.06806472 -0.124383538

$StdErrors
 [1] 0.09187369 0.09153295 0.07728548 0.08352357 0.10237868 0.08405427
 [7] 0.10269393 0.08427182 0.09259446 0.10331837 0.12074987 0.12189196
[13] 0.11850470 0.09202858 0.12074987 0.00000000

$WasSplit
[1] 0 0 0 0 1 0 0 1

> 
> ###R_plmd_model(SEXP Y, SEXP PsiCode, SEXP PsiK, SEXP Groups, SEXP Ngroups)
> 
> 
> 
> 
> 
> pr[seq(3,48,8)][1:3] <- 10
> 
> y[seq(3,48,8)][1:3] <- c(8,9,10) -3 + rnorm(3,0,0.1)
> lm(as.vector(y) ~  -1 + as.factor(cp) + C(as.factor(pr),"contr.sum"))

Call:
lm(formula = as.vector(y) ~ -1 + as.factor(cp) + C(as.factor(pr), 
    "contr.sum"))

Coefficients:
                as.factor(cp)1                  as.factor(cp)2  
                         7.979                           8.869  
                as.factor(cp)3                  as.factor(cp)4  
                         9.786                          10.771  
                as.factor(cp)5                  as.factor(cp)6  
                        11.741                           9.905  
C(as.factor(pr), "contr.sum")1  C(as.factor(pr), "contr.sum")2  
                         4.129                           3.019  
C(as.factor(pr), "contr.sum")3  C(as.factor(pr), "contr.sum")4  
                         2.435                           1.256  
C(as.factor(pr), "contr.sum")5  C(as.factor(pr), "contr.sum")6  
                        -1.597                          -1.988  
C(as.factor(pr), "contr.sum")7  C(as.factor(pr), "contr.sum")8  
                        -2.883                          -3.872  
C(as.factor(pr), "contr.sum")9  
                         2.423  

> 
> 
> proc.time()
   user  system elapsed 
   1.92    0.07    1.98 

preprocessCore.Rcheck/tests_i386/qnormtest.Rout


R version 4.0.5 (2021-03-31) -- "Shake and Throw"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: i386-w64-mingw32/i386 (32-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(preprocessCore)
> 
> err.tol <- 10^-8
> 
> x <- matrix(c(100,15,200,250,110,16.5,220,275,120,18,240,300),ncol=3)
> x
     [,1]  [,2] [,3]
[1,]  100 110.0  120
[2,]   15  16.5   18
[3,]  200 220.0  240
[4,]  250 275.0  300
> normalize.quantiles(x)
      [,1]  [,2]  [,3]
[1,] 110.0 110.0 110.0
[2,]  16.5  16.5  16.5
[3,] 220.0 220.0 220.0
[4,] 275.0 275.0 275.0
> 
> x.norm.truth <- matrix(rep(c(110.0,16.5,220,275.0),3),ncol=3)
> 
> if (all(abs(x.norm.truth - normalize.quantiles(x)) < err.tol) != TRUE){
+ 	stop("Disagreement in normalize.quantiles(x)")
+ }
> 
> normalize.quantiles.determine.target(x)
[1]  16.5 110.0 220.0 275.0
> 
> x.norm.target.truth <- c(16.5,110.0,220.0,275.0)
> 
> if (all(abs(x.norm.target.truth - normalize.quantiles.determine.target(x)) < err.tol) != TRUE){
+ 	stop("Disagreement in normalize.quantiles.determine.target(x)")
+ }
> 
> 
> y <- x
> y[2,2] <- NA
> y
     [,1] [,2] [,3]
[1,]  100  110  120
[2,]   15   NA   18
[3,]  200  220  240
[4,]  250  275  300
> normalize.quantiles(y)
          [,1]      [,2]      [,3]
[1,] 134.44444  47.66667 134.44444
[2,]  47.66667        NA  47.66667
[3,] 226.11111 180.27778 226.11111
[4,] 275.00000 275.00000 275.00000
> 
> y.norm.target.truth <- c(47.6666666666667,134.4444444444444,226.1111111111111,275.0000000000000)
> 
> y.norm.truth <- matrix(c(134.4444444444444,  47.6666666666667, 134.4444444444444,
+                          47.6666666666667,                NA,  47.6666666666667,
+                         226.1111111111111, 180.2777777777778, 226.1111111111111,
+                         275.0000000000000, 275.0000000000000, 275.0000000000000),byrow=TRUE,ncol=3)
> 
> 
> if (all(abs(y.norm.truth - normalize.quantiles(y)) < err.tol,na.rm=TRUE) != TRUE){
+ 	stop("Disagreement in normalize.quantiles(y)")
+ }
> 
> 
> 
> if (all(abs(y.norm.target.truth - normalize.quantiles.determine.target(y)) < err.tol) != TRUE){
+ 	stop("Disagreement in normalize.quantiles.determine.target(y)")
+ }
> 
> 
> 
> if (all(abs(normalize.quantiles.use.target(y,y.norm.target.truth) - y.norm.truth) < err.tol,na.rm=TRUE) != TRUE){
+ 		stop("Disagreement in normalize.quantiles.use.target(y)")
+ }
> 
> 
> 
> 
> proc.time()
   user  system elapsed 
   0.23    0.01    0.25 

preprocessCore.Rcheck/tests_x64/qnormtest.Rout


R version 4.0.5 (2021-03-31) -- "Shake and Throw"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(preprocessCore)
> 
> err.tol <- 10^-8
> 
> x <- matrix(c(100,15,200,250,110,16.5,220,275,120,18,240,300),ncol=3)
> x
     [,1]  [,2] [,3]
[1,]  100 110.0  120
[2,]   15  16.5   18
[3,]  200 220.0  240
[4,]  250 275.0  300
> normalize.quantiles(x)
      [,1]  [,2]  [,3]
[1,] 110.0 110.0 110.0
[2,]  16.5  16.5  16.5
[3,] 220.0 220.0 220.0
[4,] 275.0 275.0 275.0
> 
> x.norm.truth <- matrix(rep(c(110.0,16.5,220,275.0),3),ncol=3)
> 
> if (all(abs(x.norm.truth - normalize.quantiles(x)) < err.tol) != TRUE){
+ 	stop("Disagreement in normalize.quantiles(x)")
+ }
> 
> normalize.quantiles.determine.target(x)
[1]  16.5 110.0 220.0 275.0
> 
> x.norm.target.truth <- c(16.5,110.0,220.0,275.0)
> 
> if (all(abs(x.norm.target.truth - normalize.quantiles.determine.target(x)) < err.tol) != TRUE){
+ 	stop("Disagreement in normalize.quantiles.determine.target(x)")
+ }
> 
> 
> y <- x
> y[2,2] <- NA
> y
     [,1] [,2] [,3]
[1,]  100  110  120
[2,]   15   NA   18
[3,]  200  220  240
[4,]  250  275  300
> normalize.quantiles(y)
          [,1]      [,2]      [,3]
[1,] 134.44444  47.66667 134.44444
[2,]  47.66667        NA  47.66667
[3,] 226.11111 180.27778 226.11111
[4,] 275.00000 275.00000 275.00000
> 
> y.norm.target.truth <- c(47.6666666666667,134.4444444444444,226.1111111111111,275.0000000000000)
> 
> y.norm.truth <- matrix(c(134.4444444444444,  47.6666666666667, 134.4444444444444,
+                          47.6666666666667,                NA,  47.6666666666667,
+                         226.1111111111111, 180.2777777777778, 226.1111111111111,
+                         275.0000000000000, 275.0000000000000, 275.0000000000000),byrow=TRUE,ncol=3)
> 
> 
> if (all(abs(y.norm.truth - normalize.quantiles(y)) < err.tol,na.rm=TRUE) != TRUE){
+ 	stop("Disagreement in normalize.quantiles(y)")
+ }
> 
> 
> 
> if (all(abs(y.norm.target.truth - normalize.quantiles.determine.target(y)) < err.tol) != TRUE){
+ 	stop("Disagreement in normalize.quantiles.determine.target(y)")
+ }
> 
> 
> 
> if (all(abs(normalize.quantiles.use.target(y,y.norm.target.truth) - y.norm.truth) < err.tol,na.rm=TRUE) != TRUE){
+ 		stop("Disagreement in normalize.quantiles.use.target(y)")
+ }
> 
> 
> 
> 
> proc.time()
   user  system elapsed 
   0.17    0.04    0.20 

Example timings

preprocessCore.Rcheck/examples_i386/preprocessCore-Ex.timings

nameusersystemelapsed
colSummarize000
normalize.quantiles.in.blocks0.030.000.03
rcModelPLMd0.000.010.01
rcModelPLMr0.040.020.07
rcModels0.000.020.01
subColSummarize000
subrcModels0.020.000.02

preprocessCore.Rcheck/examples_x64/preprocessCore-Ex.timings

nameusersystemelapsed
colSummarize000
normalize.quantiles.in.blocks0.060.000.06
rcModelPLMd0.030.000.03
rcModelPLMr0.060.000.06
rcModels000
subColSummarize0.020.000.02
subrcModels0.000.020.01