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

CHECK report for preprocessCore on tokay2

This page was generated on 2019-04-09 11:53:13 -0400 (Tue, 09 Apr 2019).

Package 1221/1703HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
preprocessCore 1.45.0
Ben Bolstad
Snapshot Date: 2019-04-08 17:01:18 -0400 (Mon, 08 Apr 2019)
URL: https://git.bioconductor.org/packages/preprocessCore
Branch: master
Last Commit: 59d073d
Last Changed Date: 2018-10-30 11:54:26 -0400 (Tue, 30 Oct 2018)
malbec2 Linux (Ubuntu 18.04.2 LTS) / x86_64  OK  OK  OK 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
celaya2 OS X 10.11.6 El Capitan / x86_64  OK  OK  OK  OK UNNEEDED, same version exists in internal repository
merida2 OS X 10.11.6 El Capitan / x86_64  OK  OK  OK  OK 

Summary

Package: preprocessCore
Version: 1.45.0
Command: C:\Users\biocbuild\bbs-3.9-bioc\R\bin\R.exe CMD check --force-multiarch --install=check:preprocessCore.install-out.txt --library=C:\Users\biocbuild\bbs-3.9-bioc\R\library --no-vignettes --timings preprocessCore_1.45.0.tar.gz
StartedAt: 2019-04-09 05:03:26 -0400 (Tue, 09 Apr 2019)
EndedAt: 2019-04-09 05:04:04 -0400 (Tue, 09 Apr 2019)
EllapsedTime: 38.4 seconds
RetCode: 0
Status:  OK  
CheckDir: preprocessCore.Rcheck
Warnings: 0

Command output

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


* using log directory 'C:/Users/biocbuild/bbs-3.9-bioc/meat/preprocessCore.Rcheck'
* using R Under development (unstable) (2019-03-09 r76216)
* 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.45.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.9-bioc/R/library/preprocessCore/libs/i386/preprocessCore.dll':
  Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran)
File 'C:/Users/biocbuild/bbs-3.9-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.9-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.9/bioc/src/contrib/preprocessCore_1.45.0.tar.gz && rm -rf preprocessCore.buildbin-libdir && mkdir preprocessCore.buildbin-libdir && C:\Users\biocbuild\bbs-3.9-bioc\R\bin\R.exe CMD INSTALL --merge-multiarch --build --library=preprocessCore.buildbin-libdir preprocessCore_1.45.0.tar.gz && C:\Users\biocbuild\bbs-3.9-bioc\R\bin\R.exe CMD INSTALL preprocessCore_1.45.0.zip && rm preprocessCore_1.45.0.tar.gz preprocessCore_1.45.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  2020k      0 --:--:-- --:--:-- --:--:-- 2247k

install for i386

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

   **********************************************
   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.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=generic -c R_colSummarize.c -o R_colSummarize.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=generic -c R_plmd_interfaces.c -o R_plmd_interfaces.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=generic -c R_plmr_interfaces.c -o R_plmr_interfaces.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=generic -c R_rlm_interfaces.c -o R_rlm_interfaces.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=generic -c R_subColSummarize.c -o R_subColSummarize.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=generic -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.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=generic -c avg.c -o avg.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=generic -c avg_log.c -o avg_log.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=generic -c biweight.c -o biweight.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=generic -c init_package.c -o init_package.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=generic -c lm.c -o lm.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=generic -c log_avg.c -o log_avg.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=generic -c log_median.c -o log_median.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=generic -c matrix_functions.c -o matrix_functions.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=generic -c median.c -o median.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=generic -c median_log.c -o median_log.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=generic -c medianpolish.c -o medianpolish.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=generic -c plmd.c -o plmd.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=generic -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.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=generic -c psi_fns.c -o psi_fns.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=generic -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.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=generic -c rlm.c -o rlm.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=generic -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.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=generic -c rlm_se.c -o rlm_se.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=generic -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.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=generic -c rma_common.c -o rma_common.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O3 -Wall  -std=gnu99 -mtune=generic -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.9-B/R/bin/i386 -lRlapack -LC:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/bin/i386 -lRblas -lgfortran -lm -lquadmath -LC:/extsoft/lib/i386 -LC:/extsoft/lib -LC:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/bin/i386 -lR
installing to C:/Users/biocbuild/bbs-3.9-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.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=generic -c R_colSummarize.c -o R_colSummarize.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=generic -c R_plmd_interfaces.c -o R_plmd_interfaces.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=generic -c R_plmr_interfaces.c -o R_plmr_interfaces.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=generic -c R_rlm_interfaces.c -o R_rlm_interfaces.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=generic -c R_subColSummarize.c -o R_subColSummarize.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=generic -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.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=generic -c avg.c -o avg.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=generic -c avg_log.c -o avg_log.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=generic -c biweight.c -o biweight.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=generic -c init_package.c -o init_package.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=generic -c lm.c -o lm.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=generic -c log_avg.c -o log_avg.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=generic -c log_median.c -o log_median.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=generic -c matrix_functions.c -o matrix_functions.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=generic -c median.c -o median.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=generic -c median_log.c -o median_log.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=generic -c medianpolish.c -o medianpolish.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=generic -c plmd.c -o plmd.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=generic -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.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=generic -c psi_fns.c -o psi_fns.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=generic -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.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=generic -c rlm.c -o rlm.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=generic -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.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=generic -c rlm_se.c -o rlm_se.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=generic -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.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=generic -c rma_common.c -o rma_common.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/include" -DNDEBUG     -I"C:/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=generic -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.9-B/R/bin/x64 -lRlapack -LC:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/bin/x64 -lRblas -lgfortran -lm -lquadmath -LC:/extsoft/lib/x64 -LC:/extsoft/lib -LC:/Users/BIOCBU˜1/BBS-3˜1.9-B/R/bin/x64 -lR
installing to C:/Users/biocbuild/bbs-3.9-bioc/meat/preprocessCore.buildbin-libdir/preprocessCore/libs/x64
** testing if installed package can be loaded
* MD5 sums
packaged installation of 'preprocessCore' as preprocessCore_1.45.0.zip
* DONE (preprocessCore)
* installing to library 'C:/Users/biocbuild/bbs-3.9-bioc/R/library'
package 'preprocessCore' successfully unpacked and MD5 sums checked

Tests output

preprocessCore.Rcheck/tests_i386/PLMdtest.Rout


R Under development (unstable) (2019-03-09 r76216) -- "Unsuffered Consequences"
Copyright (C) 2019 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.009875       0.972718  

> 
> 
> 
> 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.52015
> sum((resid(lm(values ˜ as.factor(group.labels)))/sc)^2)/2
[1] 51.51649
> 
> 
> 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.1783                          9.2216  
                as.factor(cp)3                  as.factor(cp)4  
                       10.1249                         11.3279  
                as.factor(cp)5                  as.factor(cp)6  
                       12.2085                         10.2472  
C(as.factor(pr), "contr.sum")1  C(as.factor(pr), "contr.sum")2  
                        3.7877                          2.8074  
C(as.factor(pr), "contr.sum")3  C(as.factor(pr), "contr.sum")4  
                        1.7086                          0.8021  
C(as.factor(pr), "contr.sum")5  C(as.factor(pr), "contr.sum")6  
                       -1.1889                         -2.2401  
C(as.factor(pr), "contr.sum")7  C(as.factor(pr), "contr.sum")8  
                       -3.2113                         -4.2130  

> 
> 
> 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.3625606  9.1306362 10.2726527 11.2862734 12.4377450 10.5150360
 [7]  3.6479815  2.7259903  1.7485902  0.7354591 -2.0075967 -2.4115612
[13] -3.3576211 -1.0812421

$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.4880421 0.4582857 0.6295824 0.8660131 0.3257617 0.5487684
[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.1270097 0.1437150 0.1721397 0.1476302 0.1610731 0.1303146

$Residuals
            [,1]         [,2]       [,3]        [,4]        [,5]        [,6]
[1,] -0.23266240  0.002765663  0.2451814 -0.27591759  0.35176020 -0.09112728
[2,]  0.12510326 -0.195895835  0.1190884 -0.11293678 -0.10803768  0.17267866
[3,]  0.10874571 -0.359241033 -0.2241843  0.27270715  0.02270431  0.17926815
[4,]  0.02990106  0.093478385 -0.1524202 -0.02338915 -0.13000607  0.18243594
[5,]  0.93900657  0.999982401  0.7278597 -0.52912874 -1.40686138 -0.83508089
[6,] -0.28787952  0.375912755 -0.3592483  0.22235980  0.09062289 -0.04176759
[7,]  0.25682048  0.083005981  0.3716460 -0.08290230 -0.22704075 -0.40152942
[8,] -3.60841087 -3.188974833 -2.6624345  3.10445417  2.84528303  3.51693233

$StdErrors
 [1] 0.2462535 0.2461397 0.2415547 0.2385345 0.2482853 0.2448817 0.2445694
 [8] 0.2445694 0.2445694 0.2445694 0.3122989 0.2445694 0.2445694 0.5709190

$Scale
[1] 0.3407733

> rcModelPLMd(y,c(1,1,1,2,2,2))
$Estimates
 [1]  8.0063020  8.8357374  9.9902146 11.0085085 12.0047720 10.2744438
 [7]  3.9336896  3.0401445  2.0727713  1.0496133 -0.8074487 -2.6020478
[13] -2.0888354 -3.0141177 -3.9751936  2.3914245

$Weights
          [,1]      [,2]      [,3]      [,4]      [,5]      [,6]
[1,] 1.0000000 1.0000000 1.0000000 1.0000000 0.6579789 1.0000000
[2,] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
[3,] 1.0000000 0.8451552 1.0000000 1.0000000 1.0000000 1.0000000
[4,] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
[5,] 1.0000000 1.0000000 1.0000000 0.9570859 0.8652982 1.0000000
[6,] 1.0000000 0.9432287 0.8218163 1.0000000 1.0000000 1.0000000
[7,] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 0.6509108
[8,] 0.9164429 1.0000000 0.6389569 1.0000000 1.0000000 1.0000000

$Residuals
            [,1]          [,2]        [,3]        [,4]        [,5]
[1,] -0.16211186  0.0119563993  0.24191138 -0.28386078  0.49902514
[2,]  0.16720762 -0.2151512892  0.08737216 -0.14932617  0.01078106
[3,]  0.14082327 -0.3885232886 -0.26592731  0.22629097  0.13149626
[4,]  0.07200542  0.0742229311 -0.18413639 -0.05977853 -0.01118733
[5,]  0.09511715  0.0947331736 -0.18985033  0.34308724 -0.37943727
[6,] -0.25434675  0.3480857099 -0.39953614  0.17739883  0.20087004
[7,]  0.26957572  0.0344014022  0.31058066 -0.14864080 -0.13757113
[8,] -0.35820079 -0.0001245675  0.51395503 -0.09044749 -0.19441050
              [,6]
[1,] -1.362431e-01
[2,]  9.911661e-02
[3,]  9.567930e-02
[4,]  1.088739e-01
[5,] -3.757741e-05
[6,] -1.239012e-01
[7,] -5.044406e-01
[8,]  2.848580e-01

$StdErrors
 [1] 0.1185619 0.1289550 0.1285214 0.1187965 0.1289000 0.1174765 0.1289063
 [8] 0.1189772 0.1310234 0.1189772 0.1673481 0.2812409 0.1450682 0.1310715
[15] 0.2862256 0.0000000

$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.019                           8.924  
                as.factor(cp)3                  as.factor(cp)4  
                        10.078                          10.726  
                as.factor(cp)5                  as.factor(cp)6  
                        11.735                           9.968  
C(as.factor(pr), "contr.sum")1  C(as.factor(pr), "contr.sum")2  
                         4.074                           3.152  
C(as.factor(pr), "contr.sum")3  C(as.factor(pr), "contr.sum")4  
                         2.510                           1.161  
C(as.factor(pr), "contr.sum")5  C(as.factor(pr), "contr.sum")6  
                        -1.599                          -1.986  
C(as.factor(pr), "contr.sum")7  C(as.factor(pr), "contr.sum")8  
                        -2.932                          -3.986  
C(as.factor(pr), "contr.sum")9  
                         2.678  

> 
> 
> proc.time()
   user  system elapsed 
   2.03    0.09    2.11 

preprocessCore.Rcheck/tests_x64/PLMdtest.Rout


R Under development (unstable) (2019-03-09 r76216) -- "Unsuffered Consequences"
Copyright (C) 2019 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.009147       0.999191  

> 
> 
> 
> 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] 43.72841
> sum((resid(lm(values ˜ as.factor(group.labels)))/sc)^2)/2
[1] 43.26936
> 
> 
> 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.202                           9.195  
                as.factor(cp)3                  as.factor(cp)4  
                        10.227                          11.222  
                as.factor(cp)5                  as.factor(cp)6  
                        12.217                          10.272  
C(as.factor(pr), "contr.sum")1  C(as.factor(pr), "contr.sum")2  
                         3.794                           2.798  
C(as.factor(pr), "contr.sum")3  C(as.factor(pr), "contr.sum")4  
                         1.780                           0.736  
C(as.factor(pr), "contr.sum")5  C(as.factor(pr), "contr.sum")6  
                        -1.173                          -2.180  
C(as.factor(pr), "contr.sum")7  C(as.factor(pr), "contr.sum")8  
                        -3.246                          -4.179  

> 
> 
> 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.1759586  9.3508709 10.2679454 11.3752727 12.4027175 10.0883382
 [7]  3.5740813  2.7007972  1.7640845  0.7525674 -2.0981843 -2.3896136
[13] -3.2509230 -1.0528094

$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 0.9960380 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.5721079 0.6991507 0.5208828 0.5230854 0.5972015 0.6648892
[6,] 0.9678006 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
[7,] 1.0000000 1.0000000 0.9547380 1.0000000 1.0000000 1.0000000
[8,] 0.1450697 0.1525324 0.1704434 0.1597445 0.1483516 0.1584804

$Residuals
            [,1]        [,2]        [,3]        [,4]       [,5]        [,6]
[1,] -0.06174280 -0.19388808  0.05448557 -0.34819805  0.2804782  0.26886518
[2,] -0.03897933 -0.21776574 -0.40634899  0.51279906 -0.2475119  0.39983864
[3,]  0.22020282  0.21267693  0.16774309 -0.09515095 -0.1619893 -0.34348264
[4,]  0.14419000  0.04183950 -0.22002344 -0.06954818  0.1444824 -0.04094027
[5,]  0.89239936  0.73033881  0.98039103 -0.97609929 -0.8550303 -0.76798619
[6,] -0.52784991  0.12598873 -0.10670911  0.07598981  0.4353780 -0.01979396
[7,]  0.24727499  0.03115524  0.53500670 -0.07390898 -0.4508317 -0.26448078
[8,] -3.51996941 -3.34763997 -2.99575760  3.19655536  3.4419560  3.22197397

$StdErrors
 [1] 0.2654422 0.2619949 0.2656249 0.2653312 0.2642114 0.2623974 0.2652289
 [8] 0.2652963 0.2652289 0.2652289 0.3275169 0.2657807 0.2660102 0.6041596

$Scale
[1] 0.379535

> rcModelPLMd(y,c(1,1,1,2,2,2))
$Estimates
 [1]  7.5500495  8.6990269  9.7067456 10.7860056 11.8757497  9.5574965
 [7]  4.1691898  3.2241189  2.3699350  1.3335724 -0.6174903 -2.4155307
[13] -1.7874611 -2.3667931 -2.9649713 -3.7276141  2.7830445

$Weights
          [,1] [,2]      [,3]      [,4]      [,5]      [,6]
[1,] 1.0000000    1 1.0000000 0.7609829 1.0000000 1.0000000
[2,] 1.0000000    1 0.7311262 0.4655687 1.0000000 0.6614683
[3,] 1.0000000    1 1.0000000 1.0000000 1.0000000 0.6437834
[4,] 1.0000000    1 1.0000000 1.0000000 1.0000000 1.0000000
[5,] 1.0000000    1 1.0000000 1.0000000 1.0000000 1.0000000
[6,] 0.5344942    1 1.0000000 1.0000000 0.7479781 1.0000000
[7,] 1.0000000    1 1.0000000 1.0000000 1.0000000 1.0000000
[8,] 1.0000000    1 1.0000000 1.0000000 1.0000000 1.0000000

$Residuals
            [,1]        [,2]        [,3]        [,4]        [,5]        [,6]
[1,] -0.03094212 -0.13715257  0.02057683 -0.35403952  0.21233751  0.20459838
[2,]  0.06360810 -0.08924349 -0.36847099  0.57874434 -0.24386586  0.40735860
[3,]  0.24026149  0.25867042  0.12309233 -0.11173444 -0.24087195 -0.41849145
[4,]  0.18909426  0.11267859 -0.23982861 -0.06128607  0.09044530 -0.09110348
[5,]  0.03761450 -0.09851123  0.06089674 -0.06948586 -0.01071606  0.08020192
[6,] -0.50409319  0.17568028 -0.14766181  0.06310438  0.36019337 -0.09110471
[7,] -0.01094579 -0.20113071  0.21207650  0.22940634 -0.20981556 -0.01959078
[8,] -0.21925555 -0.02099128  0.24024684 -0.05003158  0.13306986 -0.08303828

$StdErrors
 [1] 0.09670091 0.08896596 0.09605417 0.10586266 0.09562351 0.10586266
 [7] 0.10378573 0.13390673 0.10378573 0.09487579 0.13680183 0.13933097
[13] 0.11662990 0.13680183 0.13933097 0.13680183 0.00000000

$WasSplit
[1] 0 0 0 0 1 0 1 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.817                           8.979  
                as.factor(cp)3                  as.factor(cp)4  
                         9.976                          10.787  
                as.factor(cp)5                  as.factor(cp)6  
                        11.860                           9.529  
C(as.factor(pr), "contr.sum")1  C(as.factor(pr), "contr.sum")2  
                         4.026                           3.153  
C(as.factor(pr), "contr.sum")3  C(as.factor(pr), "contr.sum")4  
                         2.127                           1.205  
C(as.factor(pr), "contr.sum")5  C(as.factor(pr), "contr.sum")6  
                        -1.645                          -1.940  
C(as.factor(pr), "contr.sum")7  C(as.factor(pr), "contr.sum")8  
                        -2.795                          -4.000  
C(as.factor(pr), "contr.sum")9  
                         2.798  

> 
> 
> proc.time()
   user  system elapsed 
   2.31    0.03    2.34 

preprocessCore.Rcheck/tests_i386/qnormtest.Rout


R Under development (unstable) (2019-03-09 r76216) -- "Unsuffered Consequences"
Copyright (C) 2019 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.26    0.04    0.29 

preprocessCore.Rcheck/tests_x64/qnormtest.Rout


R Under development (unstable) (2019-03-09 r76216) -- "Unsuffered Consequences"
Copyright (C) 2019 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.28 

Example timings

preprocessCore.Rcheck/examples_i386/preprocessCore-Ex.timings

nameusersystemelapsed
colSummarize0.020.000.02
normalize.quantiles.in.blocks0.030.000.03
rcModelPLMd0.010.000.01
rcModelPLMr0.050.000.05
rcModels000
subColSummarize0.010.000.01
subrcModels0.000.010.02

preprocessCore.Rcheck/examples_x64/preprocessCore-Ex.timings

nameusersystemelapsed
colSummarize000
normalize.quantiles.in.blocks0.060.000.06
rcModelPLMd0.010.000.01
rcModelPLMr0.030.000.03
rcModels0.010.000.02
subColSummarize0.020.000.01
subrcModels0.020.000.02