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

CHECK report for preprocessCore on tokay1

This page was generated on 2020-04-15 12:16:39 -0400 (Wed, 15 Apr 2020).

Package 1299/1823HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
preprocessCore 1.48.0
Ben Bolstad
Snapshot Date: 2020-04-14 16:46:13 -0400 (Tue, 14 Apr 2020)
URL: https://git.bioconductor.org/packages/preprocessCore
Branch: RELEASE_3_10
Last Commit: 84da519
Last Changed Date: 2019-10-29 13:07:22 -0400 (Tue, 29 Oct 2019)
malbec1 Linux (Ubuntu 18.04.4 LTS) / x86_64  OK  OK  OK UNNEEDED, same version exists in internal repository
tokay1 Windows Server 2012 R2 Standard / x64  OK  OK [ OK ] OK UNNEEDED, same version exists in internal repository
merida1 OS X 10.11.6 El Capitan / x86_64  OK  OK  OK  OK UNNEEDED, same version exists in internal repository

Summary

Package: preprocessCore
Version: 1.48.0
Command: C:\Users\biocbuild\bbs-3.10-bioc\R\bin\R.exe CMD check --force-multiarch --install=check:preprocessCore.install-out.txt --library=C:\Users\biocbuild\bbs-3.10-bioc\R\library --no-vignettes --timings preprocessCore_1.48.0.tar.gz
StartedAt: 2020-04-15 05:38:46 -0400 (Wed, 15 Apr 2020)
EndedAt: 2020-04-15 05:39:19 -0400 (Wed, 15 Apr 2020)
EllapsedTime: 32.2 seconds
RetCode: 0
Status:  OK  
CheckDir: preprocessCore.Rcheck
Warnings: 0

Command output

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


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



Installation output

preprocessCore.Rcheck/00install.out

##############################################################################
##############################################################################
###
### Running command:
###
###   C:\cygwin\bin\curl.exe -O https://malbec1.bioconductor.org/BBS/3.10/bioc/src/contrib/preprocessCore_1.48.0.tar.gz && rm -rf preprocessCore.buildbin-libdir && mkdir preprocessCore.buildbin-libdir && C:\Users\biocbuild\bbs-3.10-bioc\R\bin\R.exe CMD INSTALL --merge-multiarch --build --library=preprocessCore.buildbin-libdir preprocessCore_1.48.0.tar.gz && C:\Users\biocbuild\bbs-3.10-bioc\R\bin\R.exe CMD INSTALL preprocessCore_1.48.0.zip && rm preprocessCore_1.48.0.tar.gz preprocessCore_1.48.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
 12  128k   12 16384    0     0  13958      0  0:00:09  0:00:01  0:00:08 14003
100  128k  100  128k    0     0   109k      0  0:00:01  0:00:01 --:--:--  109k

install for i386

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

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


** libs
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c R_colSummarize.c -o R_colSummarize.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c R_plmd_interfaces.c -o R_plmd_interfaces.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c R_plmr_interfaces.c -o R_plmr_interfaces.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c R_rlm_interfaces.c -o R_rlm_interfaces.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c R_subColSummarize.c -o R_subColSummarize.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c R_subrcModel_interfaces.c -o R_subrcModel_interfaces.o
R_subrcModel_interfaces.c: In function 'R_sub_rcModelSummarize_medianpolish':
R_subrcModel_interfaces.c:190:11: warning: unused variable 'se' [-Wunused-variable]
   double *se;
           ^
R_subrcModel_interfaces.c:189:11: warning: unused variable 'weights' [-Wunused-variable]
   double *weights;
           ^
R_subrcModel_interfaces.c:154:30: warning: unused variable 'buffer2' [-Wunused-variable]
   double *results, *buffer, *buffer2;
                              ^
R_subrcModel_interfaces.c:154:21: warning: unused variable 'buffer' [-Wunused-variable]
   double *results, *buffer, *buffer2;
                     ^
R_subrcModel_interfaces.c:154: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:510:10: warning: unused variable 'scale' [-Wunused-variable]
   double scale=-1.0;
          ^
R_subrcModel_interfaces.c:469:30: warning: unused variable 'buffer2' [-Wunused-variable]
   double *results, *buffer, *buffer2;
                              ^
R_subrcModel_interfaces.c:469:21: warning: unused variable 'buffer' [-Wunused-variable]
   double *results, *buffer, *buffer2;
                     ^
R_subrcModel_interfaces.c:469:11: warning: unused variable 'results' [-Wunused-variable]
   double *results, *buffer, *buffer2;
           ^
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c avg.c -o avg.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c avg_log.c -o avg_log.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c biweight.c -o biweight.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c init_package.c -o init_package.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c lm.c -o lm.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c log_avg.c -o log_avg.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c log_median.c -o log_median.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c matrix_functions.c -o matrix_functions.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c median.c -o median.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c median_log.c -o median_log.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c medianpolish.c -o medianpolish.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c plmd.c -o plmd.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c plmr.c -o plmr.o
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){
             ^
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:279:13: warning: 'XTWX_R_inv' defined but not used [-Wunused-function]
 static void XTWX_R_inv(int *rows, int *cols, double *xtwx){
             ^
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c psi_fns.c -o psi_fns.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c qnorm.c -o qnorm.o
qnorm.c: In function 'qnorm_c_determine_target_l':
qnorm.c:1887:7: warning: unused variable 'non_na' [-Wunused-variable]
   int non_na;
       ^
qnorm.c:1882: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:2481:7: warning: unused variable 'non_na' [-Wunused-variable]
   int non_na;
       ^
qnorm.c:2476: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:2692: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:2791:11: warning: unused variable 'datvec' [-Wunused-variable]
   double *datvec;
           ^
qnorm.c:2790:11: warning: unused variable 'sample_percentiles' [-Wunused-variable]
   double *sample_percentiles;
           ^
qnorm.c: In function 'using_target_via_subset':
qnorm.c:2940:11: warning: unused variable 'datvec' [-Wunused-variable]
   double *datvec;
           ^
qnorm.c:2939:11: warning: unused variable 'sample_percentiles' [-Wunused-variable]
   double *sample_percentiles;
           ^
qnorm.c:2935:7: warning: unused variable 'non_na' [-Wunused-variable]
   int non_na = 0;
       ^
qnorm.c:2934:7: warning: unused variable 'targetnon_na' [-Wunused-variable]
   int targetnon_na = targetrows;
       ^
qnorm.c:2932:28: warning: unused variable 'target_ind_double_floor' [-Wunused-variable]
   double target_ind_double,target_ind_double_floor;
                            ^
qnorm.c:2932:10: warning: unused variable 'target_ind_double' [-Wunused-variable]
   double target_ind_double,target_ind_double_floor;
          ^
qnorm.c:2931:10: warning: unused variable 'samplepercentile' [-Wunused-variable]
   double samplepercentile;
          ^
qnorm.c:2930:11: warning: unused variable 'ranks' [-Wunused-variable]
   double *ranks = (double *)Calloc((rows),double);
           ^
qnorm.c:2928:11: warning: unused variable 'row_mean' [-Wunused-variable]
   double *row_mean = target;
           ^
qnorm.c:2926:14: warning: unused variable 'dimat' [-Wunused-variable]
   dataitem **dimat;
              ^
qnorm.c:2924:18: warning: unused variable 'target_ind' [-Wunused-variable]
   size_t i,j,ind,target_ind;
                  ^
qnorm.c:2924:14: warning: unused variable 'ind' [-Wunused-variable]
   size_t i,j,ind,target_ind;
              ^
qnorm.c:2924:12: warning: unused variable 'j' [-Wunused-variable]
   size_t i,j,ind,target_ind;
            ^
qnorm.c: In function 'R_qnorm_using_target':
qnorm.c:2055:10: warning: 'target_rows' may be used uninitialized in this function [-Wmaybe-uninitialized]
   size_t target_rows, target_cols;
          ^
qnorm.c: In function 'R_qnorm_using_target_via_subset':
qnorm.c:3205: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:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c rlm.c -o rlm.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -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:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c rlm_se.c -o rlm_se.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c rma_background4.c -o rma_background4.o
rma_background4.c: In function 'R_rma_bg_correct':
rma_background4.c:465:13: warning: 'PMcopy' may be used uninitialized in this function [-Wmaybe-uninitialized]
   SEXP dim1,PMcopy;
             ^
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c rma_common.c -o rma_common.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c weightedkerneldensity.c -o weightedkerneldensity.o
C:/Rtools/mingw_32/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.10-/R/bin/i386 -lRlapack -LC:/Users/BIOCBU~1/BBS-3~1.10-/R/bin/i386 -lRblas -lgfortran -lm -lquadmath -LC:/extsoft/lib/i386 -LC:/extsoft/lib -LC:/Users/BIOCBU~1/BBS-3~1.10-/R/bin/i386 -lR
installing to C:/Users/biocbuild/bbs-3.10-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:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c R_colSummarize.c -o R_colSummarize.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c R_plmd_interfaces.c -o R_plmd_interfaces.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c R_plmr_interfaces.c -o R_plmr_interfaces.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c R_rlm_interfaces.c -o R_rlm_interfaces.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c R_subColSummarize.c -o R_subColSummarize.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c R_subrcModel_interfaces.c -o R_subrcModel_interfaces.o
R_subrcModel_interfaces.c: In function 'R_sub_rcModelSummarize_medianpolish':
R_subrcModel_interfaces.c:190:11: warning: unused variable 'se' [-Wunused-variable]
   double *se;
           ^
R_subrcModel_interfaces.c:189:11: warning: unused variable 'weights' [-Wunused-variable]
   double *weights;
           ^
R_subrcModel_interfaces.c:154:30: warning: unused variable 'buffer2' [-Wunused-variable]
   double *results, *buffer, *buffer2;
                              ^
R_subrcModel_interfaces.c:154:21: warning: unused variable 'buffer' [-Wunused-variable]
   double *results, *buffer, *buffer2;
                     ^
R_subrcModel_interfaces.c:154: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:510:10: warning: unused variable 'scale' [-Wunused-variable]
   double scale=-1.0;
          ^
R_subrcModel_interfaces.c:469:30: warning: unused variable 'buffer2' [-Wunused-variable]
   double *results, *buffer, *buffer2;
                              ^
R_subrcModel_interfaces.c:469:21: warning: unused variable 'buffer' [-Wunused-variable]
   double *results, *buffer, *buffer2;
                     ^
R_subrcModel_interfaces.c:469:11: warning: unused variable 'results' [-Wunused-variable]
   double *results, *buffer, *buffer2;
           ^
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c avg.c -o avg.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c avg_log.c -o avg_log.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c biweight.c -o biweight.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c init_package.c -o init_package.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c lm.c -o lm.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c log_avg.c -o log_avg.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c log_median.c -o log_median.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c matrix_functions.c -o matrix_functions.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c median.c -o median.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c median_log.c -o median_log.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c medianpolish.c -o medianpolish.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c plmd.c -o plmd.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c plmr.c -o plmr.o
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){
             ^
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:279:13: warning: 'XTWX_R_inv' defined but not used [-Wunused-function]
 static void XTWX_R_inv(int *rows, int *cols, double *xtwx){
             ^
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c psi_fns.c -o psi_fns.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c qnorm.c -o qnorm.o
qnorm.c: In function 'qnorm_c_determine_target_l':
qnorm.c:1887:7: warning: unused variable 'non_na' [-Wunused-variable]
   int non_na;
       ^
qnorm.c:1882: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:2481:7: warning: unused variable 'non_na' [-Wunused-variable]
   int non_na;
       ^
qnorm.c:2476: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:2692: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:2791:11: warning: unused variable 'datvec' [-Wunused-variable]
   double *datvec;
           ^
qnorm.c:2790:11: warning: unused variable 'sample_percentiles' [-Wunused-variable]
   double *sample_percentiles;
           ^
qnorm.c: In function 'using_target_via_subset':
qnorm.c:2940:11: warning: unused variable 'datvec' [-Wunused-variable]
   double *datvec;
           ^
qnorm.c:2939:11: warning: unused variable 'sample_percentiles' [-Wunused-variable]
   double *sample_percentiles;
           ^
qnorm.c:2935:7: warning: unused variable 'non_na' [-Wunused-variable]
   int non_na = 0;
       ^
qnorm.c:2934:7: warning: unused variable 'targetnon_na' [-Wunused-variable]
   int targetnon_na = targetrows;
       ^
qnorm.c:2932:28: warning: unused variable 'target_ind_double_floor' [-Wunused-variable]
   double target_ind_double,target_ind_double_floor;
                            ^
qnorm.c:2932:10: warning: unused variable 'target_ind_double' [-Wunused-variable]
   double target_ind_double,target_ind_double_floor;
          ^
qnorm.c:2931:10: warning: unused variable 'samplepercentile' [-Wunused-variable]
   double samplepercentile;
          ^
qnorm.c:2930:11: warning: unused variable 'ranks' [-Wunused-variable]
   double *ranks = (double *)Calloc((rows),double);
           ^
qnorm.c:2928:11: warning: unused variable 'row_mean' [-Wunused-variable]
   double *row_mean = target;
           ^
qnorm.c:2926:14: warning: unused variable 'dimat' [-Wunused-variable]
   dataitem **dimat;
              ^
qnorm.c:2924:18: warning: unused variable 'target_ind' [-Wunused-variable]
   size_t i,j,ind,target_ind;
                  ^
qnorm.c:2924:14: warning: unused variable 'ind' [-Wunused-variable]
   size_t i,j,ind,target_ind;
              ^
qnorm.c:2924:12: warning: unused variable 'j' [-Wunused-variable]
   size_t i,j,ind,target_ind;
            ^
qnorm.c: In function 'R_qnorm_using_target':
qnorm.c:2087: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:3205: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:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c rlm.c -o rlm.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -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:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c rlm_se.c -o rlm_se.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c rma_background4.c -o rma_background4.o
rma_background4.c: In function 'R_rma_bg_correct':
rma_background4.c:465:13: warning: 'PMcopy' may be used uninitialized in this function [-Wmaybe-uninitialized]
   SEXP dim1,PMcopy;
             ^
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c rma_common.c -o rma_common.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU~1/BBS-3~1.10-/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c weightedkerneldensity.c -o weightedkerneldensity.o
C:/Rtools/mingw_64/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.10-/R/bin/x64 -lRlapack -LC:/Users/BIOCBU~1/BBS-3~1.10-/R/bin/x64 -lRblas -lgfortran -lm -lquadmath -LC:/extsoft/lib/x64 -LC:/extsoft/lib -LC:/Users/BIOCBU~1/BBS-3~1.10-/R/bin/x64 -lR
installing to C:/Users/biocbuild/bbs-3.10-bioc/meat/preprocessCore.buildbin-libdir/preprocessCore/libs/x64
** testing if installed package can be loaded
* MD5 sums
packaged installation of 'preprocessCore' as preprocessCore_1.48.0.zip
* DONE (preprocessCore)
* installing to library 'C:/Users/biocbuild/bbs-3.10-bioc/R/library'
package 'preprocessCore' successfully unpacked and MD5 sums checked

Tests output

preprocessCore.Rcheck/tests_i386/PLMdtest.Rout


R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
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.005912       0.961088  

> 
> 
> 
> 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] 51.63475
> sum((resid(lm(values ~ as.factor(group.labels)))/sc)^2)/2
[1] 51.11859
> 
> 
> 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.2534                          9.2301  
                as.factor(cp)3                  as.factor(cp)4  
                       10.2567                         11.2092  
                as.factor(cp)5                  as.factor(cp)6  
                       12.2137                         10.2128  
C(as.factor(pr), "contr.sum")1  C(as.factor(pr), "contr.sum")2  
                        3.7710                          2.7648  
C(as.factor(pr), "contr.sum")3  C(as.factor(pr), "contr.sum")4  
                        1.8087                          0.7683  
C(as.factor(pr), "contr.sum")5  C(as.factor(pr), "contr.sum")6  
                       -1.1729                         -2.2934  
C(as.factor(pr), "contr.sum")7  C(as.factor(pr), "contr.sum")8  
                       -3.2269                         -4.2796  

> 
> 
> 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.5123838  9.4088659 10.3999509 11.2917375 12.2944182 10.1924042
 [7]  3.6795062  2.7633560  1.6317985  0.7789063 -1.9783245 -2.3144717
[13] -3.4942325 -1.0665383

$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 0.6924717
[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.4542932 0.5224399 0.4463488 0.3484093 0.4730793 0.6717978
[6,] 1.0000000 1.0000000 1.0000000 1.0000000 0.8554811 1.0000000
[7,] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
[8,] 0.1047524 0.1095582 0.1242511 0.1235792 0.1118268 0.1031267

$Residuals
            [,1]        [,2]        [,3]        [,4]        [,5]        [,6]
[1,]  0.07204489 -0.02396594  0.09832991 -0.08251949 -0.31342530  0.24953593
[2,]  0.15846736 -0.15829575  0.23972709 -0.09678420  0.23168125 -0.54124340
[3,]  0.16994580 -0.17795797 -0.17813998  0.09588011 -0.11888024  0.20915227
[4,] -0.18981324  0.16425671  0.08917923  0.09691976  0.02738608 -0.18792853
[5,]  0.82494589  0.71733822  0.83962890 -1.07568095 -0.79211914 -0.55788861
[6,] -0.05533205  0.02904915 -0.22352077 -0.20146032  0.43823620  0.07636120
[7,] -0.15530551  0.16692240 -0.02556801  0.18796992 -0.20171134  0.02769255
[8,] -3.57771909 -3.42078228 -3.01626867  3.03264278  3.35145091  3.63407936

$StdErrors
 [1] 0.2274419 0.2259299 0.2266695 0.2286634 0.2289110 0.2282888 0.2257270
 [8] 0.2304438 0.2257270 0.2257270 0.3017200 0.2278157 0.2257270 0.5888961

$Scale
[1] 0.2786497

> rcModelPLMd(y,c(1,1,1,2,2,2))
$Estimates
 [1]  8.1794109  9.0820593 10.1389946 10.9144429 11.9828038  9.9767877
 [7]  3.9837165  3.0965969  1.9360087  1.0831166 -0.8774416 -2.4853789
[13] -2.0230740 -3.1900223 -4.0978831  2.5743612

$Weights
     [,1] [,2] [,3] [,4]      [,5]      [,6]
[1,]    1    1    1    1 1.0000000 1.0000000
[2,]    1    1    1    1 1.0000000 0.4830048
[3,]    1    1    1    1 1.0000000 1.0000000
[4,]    1    1    1    1 1.0000000 1.0000000
[5,]    1    1    1    1 1.0000000 1.0000000
[6,]    1    1    1    1 0.6941693 1.0000000
[7,]    1    1    1    1 1.0000000 1.0000000
[8,]    1    1    1    1 1.0000000 1.0000000

$Residuals
            [,1]         [,2]          [,3]         [,4]        [,5]
[1,]  0.10080761 -0.001369534  0.0550759171 -0.009435103 -0.30602114
[2,]  0.15819944 -0.164729978  0.1674424691 -0.052730441  0.21005478
[3,]  0.19870852 -0.155361562 -0.2213939679  0.168964505 -0.11147608
[4,] -0.16105053  0.186853116  0.0459252372  0.170004146  0.03479024
[5,]  0.05703589 -0.056738092 -0.0002977973 -0.191331946  0.02654963
[6,] -0.01375674  0.064458152 -0.2539621650 -0.115563336  0.45845296
[7,] -0.12654280  0.189518807 -0.0688220031  0.261054306 -0.19430718
[8,] -0.21340140 -0.062630909  0.2760323099 -0.230962132  0.02216576
             [,6]
[1,]  0.160942248
[2,] -0.658867716
[3,]  0.120558582
[4,] -0.276522216
[5,]  0.164782312
[6,]  0.000580114
[7,] -0.060901134
[8,]  0.208796369

$StdErrors
 [1] 0.07615617 0.07615617 0.07615617 0.07606728 0.08220790 0.08220790
 [7] 0.08230467 0.09002754 0.08230467 0.08230467 0.11699935 0.11792098
[13] 0.09002754 0.08230467 0.11699935 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.122                           9.101  
                as.factor(cp)3                  as.factor(cp)4  
                        10.175                          10.623  
                as.factor(cp)5                  as.factor(cp)6  
                        11.709                           9.643  
C(as.factor(pr), "contr.sum")1  C(as.factor(pr), "contr.sum")2  
                         4.134                           3.190  
C(as.factor(pr), "contr.sum")3  C(as.factor(pr), "contr.sum")4  
                         2.295                           1.233  
C(as.factor(pr), "contr.sum")5  C(as.factor(pr), "contr.sum")6  
                        -1.531                          -1.849  
C(as.factor(pr), "contr.sum")7  C(as.factor(pr), "contr.sum")8  
                        -3.040                          -4.097  
C(as.factor(pr), "contr.sum")9  
                         2.874  

> 
> 
> proc.time()
   user  system elapsed 
   2.18    0.04    2.20 

preprocessCore.Rcheck/tests_x64/PLMdtest.Rout


R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
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.03377        0.89928  

> 
> 
> 
> 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] 64.49383
> sum((resid(lm(values ~ as.factor(group.labels)))/sc)^2)/2
[1] 64.46813
> 
> 
> 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.255                           9.237  
                as.factor(cp)3                  as.factor(cp)4  
                        10.298                          11.237  
                as.factor(cp)5                  as.factor(cp)6  
                        12.225                          10.178  
C(as.factor(pr), "contr.sum")1  C(as.factor(pr), "contr.sum")2  
                         3.716                           2.829  
C(as.factor(pr), "contr.sum")3  C(as.factor(pr), "contr.sum")4  
                         1.752                           0.744  
C(as.factor(pr), "contr.sum")5  C(as.factor(pr), "contr.sum")6  
                        -1.204                          -2.182  
C(as.factor(pr), "contr.sum")7  C(as.factor(pr), "contr.sum")8  
                        -3.145                          -4.238  

> 
> 
> 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.350621  9.175565 10.302714 11.541149 12.283589 10.127421  3.626451
 [8]  2.630391  1.714960  0.662979 -2.049895 -2.246394 -3.229974 -1.108518

$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.4634234 0.4756716 0.3519791 0.2943763 0.2843288 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.1209399 0.1217178 0.1020315 0.1132667 0.1116212 0.1178543

$Residuals
             [,1]        [,2]         [,3]          [,4]          [,5]
[1,]  0.005009286 -0.09401331  0.008848222 -0.2166710038  0.0061766096
[2,]  0.025022925  0.28733123 -0.163914838  0.1149432952  0.0001560406
[3,]  0.198048508 -0.05133755 -0.029475048  0.0689685928  0.0362066899
[4,] -0.206056086  0.35681605  0.100553827  0.0702149506 -0.3800990248
[5,]  0.827528208  0.80621261  1.089630187 -1.3034343954 -1.3494849006
[6,] -0.121101233 -0.21652160 -0.102612677 -0.0382729269  0.3180713989
[7,]  0.099203470 -0.28214446  0.186695817  0.0008964979  0.0195649062
[8,] -3.172010999 -3.15173979 -3.759841860  3.3868796001  3.4368083151
            [,6]
[1,]  0.29065019
[2,] -0.26353865
[3,] -0.22241119
[4,]  0.05857028
[5,] -0.38311782
[6,]  0.16043704
[7,] -0.02421623
[8,]  3.25508923

$StdErrors
 [1] 0.2316368 0.2313598 0.2348466 0.2355555 0.2358616 0.2231261 0.2307569
 [8] 0.2307569 0.2307569 0.2307569 0.3126059 0.2307569 0.2307569 0.5981481

$Scale
[1] 0.2852071

> rcModelPLMd(y,c(1,1,1,2,2,2))
$Estimates
 [1]  8.0144710  8.8029477  9.9642031 11.2031177 11.9505136  9.8167810
 [7]  3.9530474  2.9609001  2.0652588  1.0053736 -0.7930124 -2.9461364
[13] -1.9329562 -2.8801235 -4.0106746  2.5783234

$Weights
          [,1]      [,2]      [,3]      [,4]      [,5]      [,6]
[1,] 1.0000000 1.0000000 1.0000000 0.9224815 1.0000000 0.6892679
[2,] 1.0000000 0.5747548 1.0000000 1.0000000 1.0000000 0.6678960
[3,] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 0.7223250
[4,] 0.8918104 0.4891642 1.0000000 1.0000000 0.4861897 1.0000000
[5,] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 0.2298362
[6,] 1.0000000 1.0000000 1.0000000 1.0000000 0.5605684 1.0000000
[7,] 1.0000000 0.7298270 1.0000000 1.0000000 1.0000000 1.0000000
[8,] 1.0000000 1.0000000 0.3646747 1.0000000 1.0000000 1.0000000

$Residuals
            [,1]        [,2]        [,3]        [,4]         [,5]        [,6]
[1,]  0.01456297 -0.04799227  0.02076245 -0.20523575  0.012655204  0.27469412
[2,]  0.03066416  0.32943983 -0.15591305  0.12246610  0.002722191 -0.28340717
[3,]  0.18389935 -0.02901935 -0.04126366  0.05670100  0.018982445 -0.26207010
[4,] -0.21230066  0.38703884  0.09666981  0.06585195 -0.389418683  0.02681596
[5,] -0.09320476 -0.07805300  0.17125777 -0.06916177 -0.120168934  0.82376349
[6,] -0.09838868 -0.15734169 -0.07753958 -0.01367881  0.337708862  0.15763984
[7,]  0.08550324 -0.25937733  0.17535613 -0.01092216  0.002789586 -0.06342622
[8,]  0.06629565  0.12303422 -0.51917466  0.03806988  0.083041936 -0.12111181

$StdErrors
 [1] 0.07366909 0.09050579 0.07297563 0.07369861 0.08004480 0.10119218
 [7] 0.09075100 0.08949270 0.08045263 0.10652659 0.10596251 0.12809909
[13] 0.08142290 0.08136926 0.13062125 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.053                           8.907  
                as.factor(cp)3                  as.factor(cp)4  
                        10.001                          10.912  
                as.factor(cp)5                  as.factor(cp)6  
                        11.655                           9.597  
C(as.factor(pr), "contr.sum")1  C(as.factor(pr), "contr.sum")2  
                         4.069                           3.073  
C(as.factor(pr), "contr.sum")3  C(as.factor(pr), "contr.sum")4  
                         2.272                           1.106  
C(as.factor(pr), "contr.sum")5  C(as.factor(pr), "contr.sum")6  
                        -1.659                          -1.804  
C(as.factor(pr), "contr.sum")7  C(as.factor(pr), "contr.sum")8  
                        -2.787                          -4.180  
C(as.factor(pr), "contr.sum")9  
                         2.847  

> 
> 
> proc.time()
   user  system elapsed 
   1.98    0.04    2.01 

preprocessCore.Rcheck/tests_i386/qnormtest.Rout


R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
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.14    0.04    0.17 

preprocessCore.Rcheck/tests_x64/qnormtest.Rout


R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
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.18    0.07    0.25 

Example timings

preprocessCore.Rcheck/examples_i386/preprocessCore-Ex.timings

nameusersystemelapsed
colSummarize000
normalize.quantiles.in.blocks0.060.000.06
rcModelPLMd0.030.000.03
rcModelPLMr0.060.000.06
rcModels0.020.000.02
subColSummarize000
subrcModels0.030.000.03

preprocessCore.Rcheck/examples_x64/preprocessCore-Ex.timings

nameusersystemelapsed
colSummarize000
normalize.quantiles.in.blocks0.030.000.03
rcModelPLMd0.020.000.01
rcModelPLMr0.050.000.05
rcModels0.010.000.01
subColSummarize000
subrcModels000