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

CHECK report for preprocessCore on tokay2

This page was generated on 2020-10-17 11:57:27 -0400 (Sat, 17 Oct 2020).

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 1347/1905HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
preprocessCore 1.50.0
Ben Bolstad
Snapshot Date: 2020-10-16 14:40:19 -0400 (Fri, 16 Oct 2020)
URL: https://git.bioconductor.org/packages/preprocessCore
Branch: RELEASE_3_11
Last Commit: 9230366
Last Changed Date: 2020-04-27 14:08:06 -0400 (Mon, 27 Apr 2020)
malbec2 Linux (Ubuntu 18.04.4 LTS) / x86_64  OK  OK  WARNINGS UNNEEDED, same version exists in internal repository
tokay2 Windows Server 2012 R2 Standard / x64  OK  OK [ OK ] OK UNNEEDED, same version exists in internal repository
machv2 macOS 10.14.6 Mojave / x86_64  OK  OK  WARNINGS  OK UNNEEDED, same version exists in internal repository

Summary

Package: preprocessCore
Version: 1.50.0
Command: C:\Users\biocbuild\bbs-3.11-bioc\R\bin\R.exe CMD check --force-multiarch --install=check:preprocessCore.install-out.txt --library=C:\Users\biocbuild\bbs-3.11-bioc\R\library --no-vignettes --timings preprocessCore_1.50.0.tar.gz
StartedAt: 2020-10-17 07:02:59 -0400 (Sat, 17 Oct 2020)
EndedAt: 2020-10-17 07:03:40 -0400 (Sat, 17 Oct 2020)
EllapsedTime: 41.2 seconds
RetCode: 0
Status:  OK  
CheckDir: preprocessCore.Rcheck
Warnings: 0

Command output

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


* using log directory 'C:/Users/biocbuild/bbs-3.11-bioc/meat/preprocessCore.Rcheck'
* using R version 4.0.3 (2020-10-10)
* 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.50.0'
* 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.11-bioc/R/library/preprocessCore/libs/i386/preprocessCore.dll':
  Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran)
File 'C:/Users/biocbuild/bbs-3.11-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.11-bioc/meat/preprocessCore.Rcheck/00check.log'
for details.



Installation output

preprocessCore.Rcheck/00install.out

##############################################################################
##############################################################################
###
### Running command:
###
###   C:\cygwin\bin\curl.exe -O https://malbec2.bioconductor.org/BBS/3.11/bioc/src/contrib/preprocessCore_1.50.0.tar.gz && rm -rf preprocessCore.buildbin-libdir && mkdir preprocessCore.buildbin-libdir && C:\Users\biocbuild\bbs-3.11-bioc\R\bin\R.exe CMD INSTALL --merge-multiarch --build --library=preprocessCore.buildbin-libdir preprocessCore_1.50.0.tar.gz && C:\Users\biocbuild\bbs-3.11-bioc\R\bin\R.exe CMD INSTALL preprocessCore_1.50.0.zip && rm preprocessCore_1.50.0.tar.gz preprocessCore_1.50.0.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  128k  100  128k    0     0   521k      0 --:--:-- --:--:-- --:--:--  536k

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.11-/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.11-/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.11-/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.11-/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.11-/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.11-/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:205:11: warning: unused variable 'se' [-Wunused-variable]
   double *se;
           ^~
R_subrcModel_interfaces.c:204:11: warning: unused variable 'weights' [-Wunused-variable]
   double *weights;
           ^~~~~~~
R_subrcModel_interfaces.c:163:30: warning: unused variable 'buffer2' [-Wunused-variable]
   double *results, *buffer, *buffer2;
                              ^~~~~~~
R_subrcModel_interfaces.c:163:21: warning: unused variable 'buffer' [-Wunused-variable]
   double *results, *buffer, *buffer2;
                     ^~~~~~
R_subrcModel_interfaces.c:163: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:530:10: warning: unused variable 'scale' [-Wunused-variable]
   double scale=-1.0;
          ^~~~~
R_subrcModel_interfaces.c:483:30: warning: unused variable 'buffer2' [-Wunused-variable]
   double *results, *buffer, *buffer2;
                              ^~~~~~~
R_subrcModel_interfaces.c:483:21: warning: unused variable 'buffer' [-Wunused-variable]
   double *results, *buffer, *buffer2;
                     ^~~~~~
R_subrcModel_interfaces.c:483:11: warning: unused variable 'results' [-Wunused-variable]
   double *results, *buffer, *buffer2;
           ^~~~~~~
"C:/rtools40/mingw32/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.11-/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.11-/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.11-/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.11-/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.11-/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.11-/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.11-/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.11-/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.11-/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.11-/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.11-/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.11-/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.11-/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.11-/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.11-/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:1906:7: warning: unused variable 'non_na' [-Wunused-variable]
   int non_na;
       ^~~~~~
qnorm.c:1901: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:2505:7: warning: unused variable 'non_na' [-Wunused-variable]
   int non_na;
       ^~~~~~
qnorm.c:2500: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:2721: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:2820:11: warning: unused variable 'datvec' [-Wunused-variable]
   double *datvec;
           ^~~~~~
qnorm.c:2819:11: warning: unused variable 'sample_percentiles' [-Wunused-variable]
   double *sample_percentiles;
           ^~~~~~~~~~~~~~~~~~
qnorm.c: In function 'using_target_via_subset':
qnorm.c:2969:11: warning: unused variable 'datvec' [-Wunused-variable]
   double *datvec;
           ^~~~~~
qnorm.c:2968:11: warning: unused variable 'sample_percentiles' [-Wunused-variable]
   double *sample_percentiles;
           ^~~~~~~~~~~~~~~~~~
qnorm.c:2964:7: warning: unused variable 'non_na' [-Wunused-variable]
   int non_na = 0;
       ^~~~~~
qnorm.c:2963:7: warning: unused variable 'targetnon_na' [-Wunused-variable]
   int targetnon_na = targetrows;
       ^~~~~~~~~~~~
qnorm.c:2961:28: warning: unused variable 'target_ind_double_floor' [-Wunused-variable]
   double target_ind_double,target_ind_double_floor;
                            ^~~~~~~~~~~~~~~~~~~~~~~
qnorm.c:2961:10: warning: unused variable 'target_ind_double' [-Wunused-variable]
   double target_ind_double,target_ind_double_floor;
          ^~~~~~~~~~~~~~~~~
qnorm.c:2960:10: warning: unused variable 'samplepercentile' [-Wunused-variable]
   double samplepercentile;
          ^~~~~~~~~~~~~~~~
qnorm.c:2959:11: warning: unused variable 'ranks' [-Wunused-variable]
   double *ranks = (double *)Calloc((rows),double);
           ^~~~~
qnorm.c:2957:11: warning: unused variable 'row_mean' [-Wunused-variable]
   double *row_mean = target;
           ^~~~~~~~
qnorm.c:2955:14: warning: unused variable 'dimat' [-Wunused-variable]
   dataitem **dimat;
              ^~~~~
qnorm.c:2953:18: warning: unused variable 'target_ind' [-Wunused-variable]
   size_t i,j,ind,target_ind;
                  ^~~~~~~~~~
qnorm.c:2953:14: warning: unused variable 'ind' [-Wunused-variable]
   size_t i,j,ind,target_ind;
              ^~~
qnorm.c:2953:12: warning: unused variable 'j' [-Wunused-variable]
   size_t i,j,ind,target_ind;
            ^
qnorm.c: In function 'R_qnorm_using_target':
qnorm.c:2111: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:3238: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.11-/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.11-/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.11-/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.11-/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:507: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.11-/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.11-/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.11-/R/bin/i386 -lRlapack -LC:/Users/BIOCBU~1/BBS-3~1.11-/R/bin/i386 -lRblas -lgfortran -lm -lquadmath -LC:/extsoft/lib/i386 -LC:/extsoft/lib -LC:/Users/BIOCBU~1/BBS-3~1.11-/R/bin/i386 -lR
installing to C:/Users/biocbuild/bbs-3.11-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.11-/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.11-/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.11-/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.11-/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.11-/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.11-/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:205:11: warning: unused variable 'se' [-Wunused-variable]
   double *se;
           ^~
R_subrcModel_interfaces.c:204:11: warning: unused variable 'weights' [-Wunused-variable]
   double *weights;
           ^~~~~~~
R_subrcModel_interfaces.c:163:30: warning: unused variable 'buffer2' [-Wunused-variable]
   double *results, *buffer, *buffer2;
                              ^~~~~~~
R_subrcModel_interfaces.c:163:21: warning: unused variable 'buffer' [-Wunused-variable]
   double *results, *buffer, *buffer2;
                     ^~~~~~
R_subrcModel_interfaces.c:163: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:530:10: warning: unused variable 'scale' [-Wunused-variable]
   double scale=-1.0;
          ^~~~~
R_subrcModel_interfaces.c:483:30: warning: unused variable 'buffer2' [-Wunused-variable]
   double *results, *buffer, *buffer2;
                              ^~~~~~~
R_subrcModel_interfaces.c:483:21: warning: unused variable 'buffer' [-Wunused-variable]
   double *results, *buffer, *buffer2;
                     ^~~~~~
R_subrcModel_interfaces.c:483:11: warning: unused variable 'results' [-Wunused-variable]
   double *results, *buffer, *buffer2;
           ^~~~~~~
"C:/rtools40/mingw64/bin/"gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.11-/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.11-/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.11-/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.11-/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.11-/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.11-/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.11-/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.11-/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.11-/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.11-/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.11-/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.11-/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.11-/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.11-/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.11-/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:1906:7: warning: unused variable 'non_na' [-Wunused-variable]
   int non_na;
       ^~~~~~
qnorm.c:1901: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:2505:7: warning: unused variable 'non_na' [-Wunused-variable]
   int non_na;
       ^~~~~~
qnorm.c:2500: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:2721: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:2820:11: warning: unused variable 'datvec' [-Wunused-variable]
   double *datvec;
           ^~~~~~
qnorm.c:2819:11: warning: unused variable 'sample_percentiles' [-Wunused-variable]
   double *sample_percentiles;
           ^~~~~~~~~~~~~~~~~~
qnorm.c: In function 'using_target_via_subset':
qnorm.c:2969:11: warning: unused variable 'datvec' [-Wunused-variable]
   double *datvec;
           ^~~~~~
qnorm.c:2968:11: warning: unused variable 'sample_percentiles' [-Wunused-variable]
   double *sample_percentiles;
           ^~~~~~~~~~~~~~~~~~
qnorm.c:2964:7: warning: unused variable 'non_na' [-Wunused-variable]
   int non_na = 0;
       ^~~~~~
qnorm.c:2963:7: warning: unused variable 'targetnon_na' [-Wunused-variable]
   int targetnon_na = targetrows;
       ^~~~~~~~~~~~
qnorm.c:2961:28: warning: unused variable 'target_ind_double_floor' [-Wunused-variable]
   double target_ind_double,target_ind_double_floor;
                            ^~~~~~~~~~~~~~~~~~~~~~~
qnorm.c:2961:10: warning: unused variable 'target_ind_double' [-Wunused-variable]
   double target_ind_double,target_ind_double_floor;
          ^~~~~~~~~~~~~~~~~
qnorm.c:2960:10: warning: unused variable 'samplepercentile' [-Wunused-variable]
   double samplepercentile;
          ^~~~~~~~~~~~~~~~
qnorm.c:2959:11: warning: unused variable 'ranks' [-Wunused-variable]
   double *ranks = (double *)Calloc((rows),double);
           ^~~~~
qnorm.c:2957:11: warning: unused variable 'row_mean' [-Wunused-variable]
   double *row_mean = target;
           ^~~~~~~~
qnorm.c:2955:14: warning: unused variable 'dimat' [-Wunused-variable]
   dataitem **dimat;
              ^~~~~
qnorm.c:2953:18: warning: unused variable 'target_ind' [-Wunused-variable]
   size_t i,j,ind,target_ind;
                  ^~~~~~~~~~
qnorm.c:2953:14: warning: unused variable 'ind' [-Wunused-variable]
   size_t i,j,ind,target_ind;
              ^~~
qnorm.c:2953:12: warning: unused variable 'j' [-Wunused-variable]
   size_t i,j,ind,target_ind;
            ^
qnorm.c: In function 'R_qnorm_using_target':
qnorm.c:2111: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:3238: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.11-/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.11-/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.11-/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.11-/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:507: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.11-/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.11-/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.11-/R/bin/x64 -lRlapack -LC:/Users/BIOCBU~1/BBS-3~1.11-/R/bin/x64 -lRblas -lgfortran -lm -lquadmath -LC:/extsoft/lib/x64 -LC:/extsoft/lib -LC:/Users/BIOCBU~1/BBS-3~1.11-/R/bin/x64 -lR
installing to C:/Users/biocbuild/bbs-3.11-bioc/meat/preprocessCore.buildbin-libdir/preprocessCore/libs/x64
** testing if installed package can be loaded
* MD5 sums
packaged installation of 'preprocessCore' as preprocessCore_1.50.0.zip
* DONE (preprocessCore)
* installing to library 'C:/Users/biocbuild/bbs-3.11-bioc/R/library'
package 'preprocessCore' successfully unpacked and MD5 sums checked

Tests output

preprocessCore.Rcheck/tests_i386/PLMdtest.Rout


R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out"
Copyright (C) 2020 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.003554       0.974480  

> 
> 
> 
> 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] 42.15666
> sum((resid(lm(values ~ as.factor(group.labels)))/sc)^2)/2
[1] 41.86245
> 
> 
> 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.2203                          9.1974  
                as.factor(cp)3                  as.factor(cp)4  
                       10.2391                         11.2060  
                as.factor(cp)5                  as.factor(cp)6  
                       12.1756                         10.2153  
C(as.factor(pr), "contr.sum")1  C(as.factor(pr), "contr.sum")2  
                        3.7934                          2.7578  
C(as.factor(pr), "contr.sum")3  C(as.factor(pr), "contr.sum")4  
                        1.8208                          0.7508  
C(as.factor(pr), "contr.sum")5  C(as.factor(pr), "contr.sum")6  
                       -1.1940                         -2.1901  
C(as.factor(pr), "contr.sum")7  C(as.factor(pr), "contr.sum")8  
                       -3.2604                         -4.2886  

> 
> 
> 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.1894584  9.3036449 10.3344188 11.2430548 12.1893291 10.3362496
 [7]  3.6728422  2.5904158  1.6779289  0.6103666 -2.1316546 -2.0976002
[13] -3.1471753 -1.1751234

$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.8432723 0.6391813 0.3456766 0.7589569 0.4517534 0.5123474
[6,] 1.0000000 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.1331622 0.1305031 0.1498823 0.1468917 0.1252699 0.1422038

$Residuals
            [,1]        [,2]        [,3]        [,4]        [,5]         [,6]
[1,] -0.01924796 -0.30532430  0.42825191 -0.05129133  0.15056416 -0.202952476
[2,]  0.28913879  0.28502400 -0.13461703 -0.07835537 -0.14502309 -0.216167298
[3,] -0.34918826 -0.01405949 -0.20270089  0.13765168  0.04045991  0.387837056
[4,] -0.10896394 -0.23410426  0.23735155  0.35898041  0.06431146 -0.317575220
[5,]  0.55222632  0.72866292  1.34745455 -0.61358643 -1.03101744 -0.909064945
[6,]  0.02827732  0.03544396 -0.08530052 -0.22121965 -0.10027866  0.343077561
[7,]  0.16010913  0.23306515 -0.24298274 -0.14588209 -0.01005642  0.005746974
[8,] -3.49800642 -3.56920748 -3.10767694  3.17105646  3.71827673  3.275513424

$StdErrors
 [1] 0.2464971 0.2502074 0.2554044 0.2473015 0.2542183 0.2521594 0.2516935
 [8] 0.2516935 0.2516935 0.2516935 0.3119065 0.2516935 0.2516935 0.6042833

$Scale
[1] 0.3463079

> rcModelPLMd(y,c(1,1,1,2,2,2))
$Estimates
 [1]  7.8082220  8.9355529 10.0984281 10.9160693 11.8785790  9.9757611
 [7]  4.0034327  2.9210063  1.9976191  0.9409572 -0.9349236 -2.6501362
[13] -1.7689569 -2.8165848 -4.2383140  2.5459002

$Weights
     [,1] [,2]      [,3] [,4] [,5]      [,6]
[1,]    1    1 1.0000000    1    1 1.0000000
[2,]    1    1 1.0000000    1    1 1.0000000
[3,]    1    1 1.0000000    1    1 0.8474178
[4,]    1    1 1.0000000    1    1 1.0000000
[5,]    1    1 0.9393097    1    1 1.0000000
[6,]    1    1 1.0000000    1    1 0.9688374
[7,]    1    1 1.0000000    1    1 1.0000000
[8,]    1    1 1.0000000    1    1 1.0000000

$Residuals
            [,1]        [,2]       [,3]        [,4]        [,5]        [,6]
[1,]  0.03139788 -0.26782290  0.3336521 -0.05489637  0.13072375 -0.17305448
[2,]  0.33978464  0.32252540 -0.2292168 -0.08196041 -0.16486350 -0.18626930
[3,] -0.28764206  0.03434227 -0.2864003  0.14494700  0.03151985  0.42863541
[4,] -0.05831809 -0.19660286  0.1427518  0.35537536  0.04447105 -0.28767722
[5,] -0.26326831 -0.09997615  0.3867143  0.23188062 -0.20178576 -0.03009486
[6,]  0.08087042  0.07489263 -0.1779531 -0.22287743 -0.11817181  0.37492282
[7,]  0.21075497  0.27056655 -0.3375825 -0.14948713 -0.02989684  0.03564497
[8,] -0.05357945 -0.13792495  0.1915044 -0.22298164  0.30800327 -0.08502163

$StdErrors
 [1] 0.09854009 0.09854009 0.10667842 0.09905236 0.09905236 0.11684969
 [7] 0.10711545 0.10711545 0.11684969 0.10711545 0.18436746 0.15318107
[13] 0.11684969 0.10711545 0.15175116 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.914                           8.996  
                as.factor(cp)3                  as.factor(cp)4  
                        10.182                          10.649  
                as.factor(cp)5                  as.factor(cp)6  
                        11.612                           9.719  
C(as.factor(pr), "contr.sum")1  C(as.factor(pr), "contr.sum")2  
                         4.094                           3.011  
C(as.factor(pr), "contr.sum")3  C(as.factor(pr), "contr.sum")4  
                         2.463                           1.031  
C(as.factor(pr), "contr.sum")5  C(as.factor(pr), "contr.sum")6  
                        -1.698                          -1.677  
C(as.factor(pr), "contr.sum")7  C(as.factor(pr), "contr.sum")8  
                        -2.726                          -4.321  
C(as.factor(pr), "contr.sum")9  
                         2.809  

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

preprocessCore.Rcheck/tests_x64/PLMdtest.Rout


R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out"
Copyright (C) 2020 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.01369        0.95447  

> 
> 
> 
> 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] 65.98967
> sum((resid(lm(values ~ as.factor(group.labels)))/sc)^2)/2
[1] 65.40322
> 
> 
> 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.2768                          9.2910  
                as.factor(cp)3                  as.factor(cp)4  
                       10.2531                         11.2155  
                as.factor(cp)5                  as.factor(cp)6  
                       12.2456                         10.1919  
C(as.factor(pr), "contr.sum")1  C(as.factor(pr), "contr.sum")2  
                        3.8091                          2.7821  
C(as.factor(pr), "contr.sum")3  C(as.factor(pr), "contr.sum")4  
                        1.7343                          0.7381  
C(as.factor(pr), "contr.sum")5  C(as.factor(pr), "contr.sum")6  
                       -1.1878                         -2.2732  
C(as.factor(pr), "contr.sum")7  C(as.factor(pr), "contr.sum")8  
                       -3.1986                         -4.2846  

> 
> 
> 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.395556  9.113274 10.433003 11.410359 12.433445 10.417046  3.699473
 [8]  2.702632  1.831944  0.767423 -2.275585 -2.201680 -3.335742 -1.188465

$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 0.7205837
[5,] 0.4036881 0.3808899 1.0000000 0.7835046 0.3261281 1.0000000
[6,] 1.0000000 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.1278705 0.1428079 0.1332845 0.1408447 0.1260254 0.1375124

$Residuals
           [,1]       [,2]          [,3]        [,4]        [,5]        [,6]
[1,] -0.2929036 -0.3955821  0.2979649695  0.31284044  0.13911462 -0.06143434
[2,] -0.2572961  0.1306331 -0.0033294403  0.19277406 -0.05766957 -0.00511210
[3,] -0.1757100  0.3304993 -0.0009323932 -0.17386346 -0.09782653  0.11783307
[4,]  0.2122608  0.2998515  0.1464026697 -0.21517954 -0.01324619 -0.59686229
[5,]  1.0655310  1.1292939  0.3025296813 -0.54862939 -1.31841519 -0.30298254
[6,]  0.2974041 -0.1074397 -0.2145165595 -0.10025204  0.17247856 -0.04767437
[7,]  0.2161483 -0.2580531 -0.0980673245 -0.01651758 -0.14292799  0.29941768
[8,] -3.3631345 -3.0113582 -3.2265691426  3.05337641  3.41240103  3.12729559

$StdErrors
 [1] 0.2388406 0.2386385 0.2285413 0.2314257 0.2405428 0.2325887 0.2356064
 [8] 0.2356064 0.2356064 0.2402258 0.2822649 0.2356064 0.2356064 0.5718231

$Scale
[1] 0.319739

> rcModelPLMd(y,c(1,1,1,2,2,2))
$Estimates
 [1]  8.079678  8.869520 10.084060 11.079910 12.098587 10.129473  4.036624
 [8]  3.012875  2.142186  1.102716 -1.062176 -2.556180 -1.891438 -3.025500
[15] -4.085960  2.326853

$Weights
     [,1]      [,2]     [,3] [,4]      [,5]      [,6]
[1,]    1 0.6698189 1.000000    1 1.0000000 1.0000000
[2,]    1 1.0000000 1.000000    1 1.0000000 1.0000000
[3,]    1 1.0000000 1.000000    1 1.0000000 1.0000000
[4,]    1 1.0000000 1.000000    1 1.0000000 0.5080925
[5,]    1 1.0000000 0.583055    1 0.4660253 1.0000000
[6,]    1 1.0000000 1.000000    1 1.0000000 1.0000000
[7,]    1 1.0000000 1.000000    1 1.0000000 1.0000000
[8,]    1 1.0000000 1.000000    1 1.0000000 1.0000000

$Residuals
           [,1]        [,2]        [,3]         [,4]        [,5]        [,6]
[1,] -0.3141763 -0.48897932  0.30975745  0.306137793  0.13682146 -0.11101283
[2,] -0.2516601  0.06414451  0.03537166  0.212980033 -0.03305411 -0.02778197
[3,] -0.1700741  0.26401069  0.03776871 -0.153657486 -0.07321107  0.09516321
[4,]  0.1928464  0.20831258  0.16005346 -0.220023878 -0.01368103 -0.64458246
[5,]  0.1680005  0.15963885 -0.56193561  0.062413685 -0.70296262  0.26518470
[6,]  0.3030400 -0.17392831 -0.17581546 -0.080046061  0.19709403 -0.07034424
[7,]  0.2217843 -0.32454172 -0.05936622  0.003688392 -0.11831252  0.27674781
[8,] -0.1497607  0.12989097  0.01986975 -0.131492478  0.23194162 -0.10044914

$StdErrors
 [1] 0.09290801 0.10045325 0.10048980 0.09290801 0.10048980 0.10045325
 [7] 0.11047069 0.10081957 0.10081957 0.11047069 0.17413440 0.17413440
[13] 0.10081957 0.10081957 0.14309312 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  
                         8.107                           8.834  
                as.factor(cp)3                  as.factor(cp)4  
                        10.055                          10.846  
                as.factor(cp)5                  as.factor(cp)6  
                        11.817                           9.856  
C(as.factor(pr), "contr.sum")1  C(as.factor(pr), "contr.sum")2  
                         4.147                           3.151  
C(as.factor(pr), "contr.sum")3  C(as.factor(pr), "contr.sum")4  
                         2.361                           1.188  
C(as.factor(pr), "contr.sum")5  C(as.factor(pr), "contr.sum")6  
                        -1.773                          -1.754  
C(as.factor(pr), "contr.sum")7  C(as.factor(pr), "contr.sum")8  
                        -2.888                          -4.074  
C(as.factor(pr), "contr.sum")9  
                         2.590  

> 
> 
> proc.time()
   user  system elapsed 
   2.04    0.07    2.10 

preprocessCore.Rcheck/tests_i386/qnormtest.Rout


R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out"
Copyright (C) 2020 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.29    0.00    0.28 

preprocessCore.Rcheck/tests_x64/qnormtest.Rout


R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out"
Copyright (C) 2020 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.25    0.04    0.29 

Example timings

preprocessCore.Rcheck/examples_i386/preprocessCore-Ex.timings

nameusersystemelapsed
colSummarize0.010.000.01
normalize.quantiles.in.blocks0.050.000.05
rcModelPLMd0.010.000.01
rcModelPLMr0.050.000.05
rcModels0.010.000.01
subColSummarize0.020.000.02
subrcModels0.010.000.02

preprocessCore.Rcheck/examples_x64/preprocessCore-Ex.timings

nameusersystemelapsed
colSummarize0.020.000.01
normalize.quantiles.in.blocks0.060.000.06
rcModelPLMd0.030.000.03
rcModelPLMr0.050.020.06
rcModels0.000.010.02
subColSummarize0.020.000.01
subrcModels0.010.000.02