Back to Rapid builds (Linux only) of a subset of BioC 3.21
Report updated every 6 hours

This page was generated on 2024-12-22 09:21 -0500 (Sun, 22 Dec 2024).

HostnameOSArch (*)R versionInstalled pkgs
teran2Linux (Ubuntu 24.04.1 LTS)x86_64R Under development (unstable) (2024-12-18 r87448) -- "Unsuffered Consequences" 852
Click on any hostname to see more info about the system (e.g. compilers)      (*) as reported by 'uname -p', except on Windows and Mac OS X

Package 125/216HostnameOS / ArchINSTALLBUILDCHECK
limma 3.63.2  (landing page)
Gordon Smyth
Snapshot Date: 2024-12-22 06:00 -0500 (Sun, 22 Dec 2024)
git_url: https://git.bioconductor.org/packages/limma
git_branch: devel
git_last_commit: 39aac52
git_last_commit_date: 2024-11-10 05:04:41 -0500 (Sun, 10 Nov 2024)
teran2Linux (Ubuntu 24.04.1 LTS) / x86_64  OK    OK    OK  


CHECK results for limma on teran2

To the developers/maintainers of the limma package:
- Use the following Renviron settings to reproduce errors and warnings.
- If 'R CMD check' started to fail recently on the Linux builder(s) over a missing dependency, add the missing dependency to 'Suggests:' in your DESCRIPTION file. See Renviron.bioc for more information.

raw results


Summary

Package: limma
Version: 3.63.2
Command: /home/rapidbuild/bbs-3.21-bioc-rapid/R/bin/R CMD check --install=check:limma.install-out.txt --library=/home/rapidbuild/bbs-3.21-bioc-rapid/R/site-library --timings limma_3.63.2.tar.gz
StartedAt: 2024-12-22 08:25:04 -0500 (Sun, 22 Dec 2024)
EndedAt: 2024-12-22 08:26:03 -0500 (Sun, 22 Dec 2024)
EllapsedTime: 59.3 seconds
RetCode: 0
Status:   OK  
CheckDir: limma.Rcheck
Warnings: 0

Command output

##############################################################################
##############################################################################
###
### Running command:
###
###   /home/rapidbuild/bbs-3.21-bioc-rapid/R/bin/R CMD check --install=check:limma.install-out.txt --library=/home/rapidbuild/bbs-3.21-bioc-rapid/R/site-library --timings limma_3.63.2.tar.gz
###
##############################################################################
##############################################################################


* using log directory ‘/media/volume/teran2_disk/rapidbuild/bbs-3.21-bioc-rapid/meat/limma.Rcheck’
* using R Under development (unstable) (2024-12-18 r87448)
* using platform: x86_64-pc-linux-gnu
* R was compiled by
    gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
    GNU Fortran (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
* running under: Ubuntu 24.04.1 LTS
* using session charset: UTF-8
* checking for file ‘limma/DESCRIPTION’ ... OK
* this is package ‘limma’ version ‘3.63.2’
* 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 for sufficient/correct file permissions ... OK
* checking whether package ‘limma’ can be installed ... OK
* used C compiler: ‘gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0’
* checking installed package size ... OK
* checking package directory ... OK
* checking ‘build’ directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking code files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* 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 loading without being on the library search path ... OK
* checking whether startup messages can be suppressed ... 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 C/C++/Fortran sources/headers ... OK
* checking compiled code ... NOTE
Note: information on .o files is not available
* checking installed files from ‘inst/doc’ ... OK
* checking files in ‘vignettes’ ... OK
* checking examples ... OK
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
  Running ‘limma-Tests.R’
  Comparing ‘limma-Tests.Rout’ to ‘limma-Tests.Rout.save’ ... OK
 OK
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes ... OK
* checking re-building of vignette outputs ... OK
* checking PDF version of manual ... OK
* DONE

Status: 1 NOTE
See
  ‘/media/volume/teran2_disk/rapidbuild/bbs-3.21-bioc-rapid/meat/limma.Rcheck/00check.log’
for details.


Installation output

limma.Rcheck/00install.out

##############################################################################
##############################################################################
###
### Running command:
###
###   /home/rapidbuild/bbs-3.21-bioc-rapid/R/bin/R CMD INSTALL limma
###
##############################################################################
##############################################################################


* installing to library ‘/media/volume/teran2_disk/rapidbuild/bbs-3.21-bioc-rapid/R/site-library’
* installing *source* package ‘limma’ ...
** using staged installation
** libs
using C compiler: ‘gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0’
gcc -I"/home/rapidbuild/bbs-3.21-bioc-rapid/R/include" -DNDEBUG   -I/usr/local/include    -fpic  -g -O2  -Wall -Werror=format-security -c init.c -o init.o
gcc -I"/home/rapidbuild/bbs-3.21-bioc-rapid/R/include" -DNDEBUG   -I/usr/local/include    -fpic  -g -O2  -Wall -Werror=format-security -c normexp.c -o normexp.o
gcc -I"/home/rapidbuild/bbs-3.21-bioc-rapid/R/include" -DNDEBUG   -I/usr/local/include    -fpic  -g -O2  -Wall -Werror=format-security -c weighted_lowess.c -o weighted_lowess.o
gcc -shared -L/usr/local/lib -o limma.so init.o normexp.o weighted_lowess.o
installing to /media/volume/teran2_disk/rapidbuild/bbs-3.21-bioc-rapid/R/site-library/00LOCK-limma/00new/limma/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (limma)

Tests output

limma.Rcheck/tests/limma-Tests.Rout


R Under development (unstable) (2024-12-18 r87448) -- "Unsuffered Consequences"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu

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(limma)
> options(warnPartialMatchArgs=TRUE,warnPartialMatchAttr=TRUE,warnPartialMatchDollar=TRUE,width=120)
> 
> set.seed(0); u <- runif(100)
> 
> ### strsplit2
> 
> x <- c("ab;cd;efg","abc;def","z","")
> strsplit2(x,split=";")
     [,1]  [,2]  [,3] 
[1,] "ab"  "cd"  "efg"
[2,] "abc" "def" ""   
[3,] "z"   ""    ""   
[4,] ""    ""    ""   
> 
> ### removeext
> 
> removeExt(c("slide1.spot","slide.2.spot"))
[1] "slide1"  "slide.2"
> removeExt(c("slide1.spot","slide"))
[1] "slide1.spot" "slide"      
> 
> ### printorder
> 
> printorder(list(ngrid.r=4,ngrid.c=4,nspot.r=8,nspot.c=6),ndups=2,start="topright",npins=4)
$printorder
  [1]   6   5   4   3   2   1  12  11  10   9   8   7  18  17  16  15  14  13  24  23  22  21  20  19  30  29  28  27
 [29]  26  25  36  35  34  33  32  31  42  41  40  39  38  37  48  47  46  45  44  43   6   5   4   3   2   1  12  11
 [57]  10   9   8   7  18  17  16  15  14  13  24  23  22  21  20  19  30  29  28  27  26  25  36  35  34  33  32  31
 [85]  42  41  40  39  38  37  48  47  46  45  44  43   6   5   4   3   2   1  12  11  10   9   8   7  18  17  16  15
[113]  14  13  24  23  22  21  20  19  30  29  28  27  26  25  36  35  34  33  32  31  42  41  40  39  38  37  48  47
[141]  46  45  44  43   6   5   4   3   2   1  12  11  10   9   8   7  18  17  16  15  14  13  24  23  22  21  20  19
[169]  30  29  28  27  26  25  36  35  34  33  32  31  42  41  40  39  38  37  48  47  46  45  44  43  54  53  52  51
[197]  50  49  60  59  58  57  56  55  66  65  64  63  62  61  72  71  70  69  68  67  78  77  76  75  74  73  84  83
[225]  82  81  80  79  90  89  88  87  86  85  96  95  94  93  92  91  54  53  52  51  50  49  60  59  58  57  56  55
[253]  66  65  64  63  62  61  72  71  70  69  68  67  78  77  76  75  74  73  84  83  82  81  80  79  90  89  88  87
[281]  86  85  96  95  94  93  92  91  54  53  52  51  50  49  60  59  58  57  56  55  66  65  64  63  62  61  72  71
[309]  70  69  68  67  78  77  76  75  74  73  84  83  82  81  80  79  90  89  88  87  86  85  96  95  94  93  92  91
[337]  54  53  52  51  50  49  60  59  58  57  56  55  66  65  64  63  62  61  72  71  70  69  68  67  78  77  76  75
[365]  74  73  84  83  82  81  80  79  90  89  88  87  86  85  96  95  94  93  92  91 102 101 100  99  98  97 108 107
[393] 106 105 104 103 114 113 112 111 110 109 120 119 118 117 116 115 126 125 124 123 122 121 132 131 130 129 128 127
[421] 138 137 136 135 134 133 144 143 142 141 140 139 102 101 100  99  98  97 108 107 106 105 104 103 114 113 112 111
[449] 110 109 120 119 118 117 116 115 126 125 124 123 122 121 132 131 130 129 128 127 138 137 136 135 134 133 144 143
[477] 142 141 140 139 102 101 100  99  98  97 108 107 106 105 104 103 114 113 112 111 110 109 120 119 118 117 116 115
[505] 126 125 124 123 122 121 132 131 130 129 128 127 138 137 136 135 134 133 144 143 142 141 140 139 102 101 100  99
[533]  98  97 108 107 106 105 104 103 114 113 112 111 110 109 120 119 118 117 116 115 126 125 124 123 122 121 132 131
[561] 130 129 128 127 138 137 136 135 134 133 144 143 142 141 140 139 150 149 148 147 146 145 156 155 154 153 152 151
[589] 162 161 160 159 158 157 168 167 166 165 164 163 174 173 172 171 170 169 180 179 178 177 176 175 186 185 184 183
[617] 182 181 192 191 190 189 188 187 150 149 148 147 146 145 156 155 154 153 152 151 162 161 160 159 158 157 168 167
[645] 166 165 164 163 174 173 172 171 170 169 180 179 178 177 176 175 186 185 184 183 182 181 192 191 190 189 188 187
[673] 150 149 148 147 146 145 156 155 154 153 152 151 162 161 160 159 158 157 168 167 166 165 164 163 174 173 172 171
[701] 170 169 180 179 178 177 176 175 186 185 184 183 182 181 192 191 190 189 188 187 150 149 148 147 146 145 156 155
[729] 154 153 152 151 162 161 160 159 158 157 168 167 166 165 164 163 174 173 172 171 170 169 180 179 178 177 176 175
[757] 186 185 184 183 182 181 192 191 190 189 188 187

$plate
  [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
 [58] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[115] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[172] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[229] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[286] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[343] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[400] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[457] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[514] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[571] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[628] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[685] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[742] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

$plate.r
  [1]  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4
 [39]  4  4  4  4  4  4  4  4  4  4  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3
 [77]  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2
[115]  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  1  1  1  1  1  1  1  1
[153]  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1
[191]  1  1  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8
[229]  8  8  8  8  8  8  8  8  8  8  8  8  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7
[267]  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6
[305]  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  5  5  5  5  5  5
[343]  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5
[381]  5  5  5  5 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12
[419] 12 12 12 12 12 12 12 12 12 12 12 12 12 12 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
[457] 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 10 10 10 10 10 10 10 10 10 10 10 10 10 10
[495] 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10  9  9  9  9
[533]  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9
[571]  9  9  9  9  9  9 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
[609] 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15
[647] 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 14 14 14 14 14 14 14 14 14 14 14 14
[685] 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 13 13
[723] 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13
[761] 13 13 13 13 13 13 13 13

$plate.c
  [1]  3  3  2  2  1  1  6  6  5  5  4  4  9  9  8  8  7  7 12 12 11 11 10 10 15 15 14 14 13 13 18 18 17 17 16 16 21 21
 [39] 20 20 19 19 24 24 23 23 22 22  3  3  2  2  1  1  6  6  5  5  4  4  9  9  8  8  7  7 12 12 11 11 10 10 15 15 14 14
 [77] 13 13 18 18 17 17 16 16 21 21 20 20 19 19 24 24 23 23 22 22  3  3  2  2  1  1  6  6  5  5  4  4  9  9  8  8  7  7
[115] 12 12 11 11 10 10 15 15 14 14 13 13 18 18 17 17 16 16 21 21 20 20 19 19 24 24 23 23 22 22  3  3  2  2  1  1  6  6
[153]  5  5  4  4  9  9  8  8  7  7 12 12 11 11 10 10 15 15 14 14 13 13 18 18 17 17 16 16 21 21 20 20 19 19 24 24 23 23
[191] 22 22  3  3  2  2  1  1  6  6  5  5  4  4  9  9  8  8  7  7 12 12 11 11 10 10 15 15 14 14 13 13 18 18 17 17 16 16
[229] 21 21 20 20 19 19 24 24 23 23 22 22  3  3  2  2  1  1  6  6  5  5  4  4  9  9  8  8  7  7 12 12 11 11 10 10 15 15
[267] 14 14 13 13 18 18 17 17 16 16 21 21 20 20 19 19 24 24 23 23 22 22  3  3  2  2  1  1  6  6  5  5  4  4  9  9  8  8
[305]  7  7 12 12 11 11 10 10 15 15 14 14 13 13 18 18 17 17 16 16 21 21 20 20 19 19 24 24 23 23 22 22  3  3  2  2  1  1
[343]  6  6  5  5  4  4  9  9  8  8  7  7 12 12 11 11 10 10 15 15 14 14 13 13 18 18 17 17 16 16 21 21 20 20 19 19 24 24
[381] 23 23 22 22  3  3  2  2  1  1  6  6  5  5  4  4  9  9  8  8  7  7 12 12 11 11 10 10 15 15 14 14 13 13 18 18 17 17
[419] 16 16 21 21 20 20 19 19 24 24 23 23 22 22  3  3  2  2  1  1  6  6  5  5  4  4  9  9  8  8  7  7 12 12 11 11 10 10
[457] 15 15 14 14 13 13 18 18 17 17 16 16 21 21 20 20 19 19 24 24 23 23 22 22  3  3  2  2  1  1  6  6  5  5  4  4  9  9
[495]  8  8  7  7 12 12 11 11 10 10 15 15 14 14 13 13 18 18 17 17 16 16 21 21 20 20 19 19 24 24 23 23 22 22  3  3  2  2
[533]  1  1  6  6  5  5  4  4  9  9  8  8  7  7 12 12 11 11 10 10 15 15 14 14 13 13 18 18 17 17 16 16 21 21 20 20 19 19
[571] 24 24 23 23 22 22  3  3  2  2  1  1  6  6  5  5  4  4  9  9  8  8  7  7 12 12 11 11 10 10 15 15 14 14 13 13 18 18
[609] 17 17 16 16 21 21 20 20 19 19 24 24 23 23 22 22  3  3  2  2  1  1  6  6  5  5  4  4  9  9  8  8  7  7 12 12 11 11
[647] 10 10 15 15 14 14 13 13 18 18 17 17 16 16 21 21 20 20 19 19 24 24 23 23 22 22  3  3  2  2  1  1  6  6  5  5  4  4
[685]  9  9  8  8  7  7 12 12 11 11 10 10 15 15 14 14 13 13 18 18 17 17 16 16 21 21 20 20 19 19 24 24 23 23 22 22  3  3
[723]  2  2  1  1  6  6  5  5  4  4  9  9  8  8  7  7 12 12 11 11 10 10 15 15 14 14 13 13 18 18 17 17 16 16 21 21 20 20
[761] 19 19 24 24 23 23 22 22

$plateposition
  [1] "p1D03" "p1D03" "p1D02" "p1D02" "p1D01" "p1D01" "p1D06" "p1D06" "p1D05" "p1D05" "p1D04" "p1D04" "p1D09" "p1D09"
 [15] "p1D08" "p1D08" "p1D07" "p1D07" "p1D12" "p1D12" "p1D11" "p1D11" "p1D10" "p1D10" "p1D15" "p1D15" "p1D14" "p1D14"
 [29] "p1D13" "p1D13" "p1D18" "p1D18" "p1D17" "p1D17" "p1D16" "p1D16" "p1D21" "p1D21" "p1D20" "p1D20" "p1D19" "p1D19"
 [43] "p1D24" "p1D24" "p1D23" "p1D23" "p1D22" "p1D22" "p1C03" "p1C03" "p1C02" "p1C02" "p1C01" "p1C01" "p1C06" "p1C06"
 [57] "p1C05" "p1C05" "p1C04" "p1C04" "p1C09" "p1C09" "p1C08" "p1C08" "p1C07" "p1C07" "p1C12" "p1C12" "p1C11" "p1C11"
 [71] "p1C10" "p1C10" "p1C15" "p1C15" "p1C14" "p1C14" "p1C13" "p1C13" "p1C18" "p1C18" "p1C17" "p1C17" "p1C16" "p1C16"
 [85] "p1C21" "p1C21" "p1C20" "p1C20" "p1C19" "p1C19" "p1C24" "p1C24" "p1C23" "p1C23" "p1C22" "p1C22" "p1B03" "p1B03"
 [99] "p1B02" "p1B02" "p1B01" "p1B01" "p1B06" "p1B06" "p1B05" "p1B05" "p1B04" "p1B04" "p1B09" "p1B09" "p1B08" "p1B08"
[113] "p1B07" "p1B07" "p1B12" "p1B12" "p1B11" "p1B11" "p1B10" "p1B10" "p1B15" "p1B15" "p1B14" "p1B14" "p1B13" "p1B13"
[127] "p1B18" "p1B18" "p1B17" "p1B17" "p1B16" "p1B16" "p1B21" "p1B21" "p1B20" "p1B20" "p1B19" "p1B19" "p1B24" "p1B24"
[141] "p1B23" "p1B23" "p1B22" "p1B22" "p1A03" "p1A03" "p1A02" "p1A02" "p1A01" "p1A01" "p1A06" "p1A06" "p1A05" "p1A05"
[155] "p1A04" "p1A04" "p1A09" "p1A09" "p1A08" "p1A08" "p1A07" "p1A07" "p1A12" "p1A12" "p1A11" "p1A11" "p1A10" "p1A10"
[169] "p1A15" "p1A15" "p1A14" "p1A14" "p1A13" "p1A13" "p1A18" "p1A18" "p1A17" "p1A17" "p1A16" "p1A16" "p1A21" "p1A21"
[183] "p1A20" "p1A20" "p1A19" "p1A19" "p1A24" "p1A24" "p1A23" "p1A23" "p1A22" "p1A22" "p1H03" "p1H03" "p1H02" "p1H02"
[197] "p1H01" "p1H01" "p1H06" "p1H06" "p1H05" "p1H05" "p1H04" "p1H04" "p1H09" "p1H09" "p1H08" "p1H08" "p1H07" "p1H07"
[211] "p1H12" "p1H12" "p1H11" "p1H11" "p1H10" "p1H10" "p1H15" "p1H15" "p1H14" "p1H14" "p1H13" "p1H13" "p1H18" "p1H18"
[225] "p1H17" "p1H17" "p1H16" "p1H16" "p1H21" "p1H21" "p1H20" "p1H20" "p1H19" "p1H19" "p1H24" "p1H24" "p1H23" "p1H23"
[239] "p1H22" "p1H22" "p1G03" "p1G03" "p1G02" "p1G02" "p1G01" "p1G01" "p1G06" "p1G06" "p1G05" "p1G05" "p1G04" "p1G04"
[253] "p1G09" "p1G09" "p1G08" "p1G08" "p1G07" "p1G07" "p1G12" "p1G12" "p1G11" "p1G11" "p1G10" "p1G10" "p1G15" "p1G15"
[267] "p1G14" "p1G14" "p1G13" "p1G13" "p1G18" "p1G18" "p1G17" "p1G17" "p1G16" "p1G16" "p1G21" "p1G21" "p1G20" "p1G20"
[281] "p1G19" "p1G19" "p1G24" "p1G24" "p1G23" "p1G23" "p1G22" "p1G22" "p1F03" "p1F03" "p1F02" "p1F02" "p1F01" "p1F01"
[295] "p1F06" "p1F06" "p1F05" "p1F05" "p1F04" "p1F04" "p1F09" "p1F09" "p1F08" "p1F08" "p1F07" "p1F07" "p1F12" "p1F12"
[309] "p1F11" "p1F11" "p1F10" "p1F10" "p1F15" "p1F15" "p1F14" "p1F14" "p1F13" "p1F13" "p1F18" "p1F18" "p1F17" "p1F17"
[323] "p1F16" "p1F16" "p1F21" "p1F21" "p1F20" "p1F20" "p1F19" "p1F19" "p1F24" "p1F24" "p1F23" "p1F23" "p1F22" "p1F22"
[337] "p1E03" "p1E03" "p1E02" "p1E02" "p1E01" "p1E01" "p1E06" "p1E06" "p1E05" "p1E05" "p1E04" "p1E04" "p1E09" "p1E09"
[351] "p1E08" "p1E08" "p1E07" "p1E07" "p1E12" "p1E12" "p1E11" "p1E11" "p1E10" "p1E10" "p1E15" "p1E15" "p1E14" "p1E14"
[365] "p1E13" "p1E13" "p1E18" "p1E18" "p1E17" "p1E17" "p1E16" "p1E16" "p1E21" "p1E21" "p1E20" "p1E20" "p1E19" "p1E19"
[379] "p1E24" "p1E24" "p1E23" "p1E23" "p1E22" "p1E22" "p1L03" "p1L03" "p1L02" "p1L02" "p1L01" "p1L01" "p1L06" "p1L06"
[393] "p1L05" "p1L05" "p1L04" "p1L04" "p1L09" "p1L09" "p1L08" "p1L08" "p1L07" "p1L07" "p1L12" "p1L12" "p1L11" "p1L11"
[407] "p1L10" "p1L10" "p1L15" "p1L15" "p1L14" "p1L14" "p1L13" "p1L13" "p1L18" "p1L18" "p1L17" "p1L17" "p1L16" "p1L16"
[421] "p1L21" "p1L21" "p1L20" "p1L20" "p1L19" "p1L19" "p1L24" "p1L24" "p1L23" "p1L23" "p1L22" "p1L22" "p1K03" "p1K03"
[435] "p1K02" "p1K02" "p1K01" "p1K01" "p1K06" "p1K06" "p1K05" "p1K05" "p1K04" "p1K04" "p1K09" "p1K09" "p1K08" "p1K08"
[449] "p1K07" "p1K07" "p1K12" "p1K12" "p1K11" "p1K11" "p1K10" "p1K10" "p1K15" "p1K15" "p1K14" "p1K14" "p1K13" "p1K13"
[463] "p1K18" "p1K18" "p1K17" "p1K17" "p1K16" "p1K16" "p1K21" "p1K21" "p1K20" "p1K20" "p1K19" "p1K19" "p1K24" "p1K24"
[477] "p1K23" "p1K23" "p1K22" "p1K22" "p1J03" "p1J03" "p1J02" "p1J02" "p1J01" "p1J01" "p1J06" "p1J06" "p1J05" "p1J05"
[491] "p1J04" "p1J04" "p1J09" "p1J09" "p1J08" "p1J08" "p1J07" "p1J07" "p1J12" "p1J12" "p1J11" "p1J11" "p1J10" "p1J10"
[505] "p1J15" "p1J15" "p1J14" "p1J14" "p1J13" "p1J13" "p1J18" "p1J18" "p1J17" "p1J17" "p1J16" "p1J16" "p1J21" "p1J21"
[519] "p1J20" "p1J20" "p1J19" "p1J19" "p1J24" "p1J24" "p1J23" "p1J23" "p1J22" "p1J22" "p1I03" "p1I03" "p1I02" "p1I02"
[533] "p1I01" "p1I01" "p1I06" "p1I06" "p1I05" "p1I05" "p1I04" "p1I04" "p1I09" "p1I09" "p1I08" "p1I08" "p1I07" "p1I07"
[547] "p1I12" "p1I12" "p1I11" "p1I11" "p1I10" "p1I10" "p1I15" "p1I15" "p1I14" "p1I14" "p1I13" "p1I13" "p1I18" "p1I18"
[561] "p1I17" "p1I17" "p1I16" "p1I16" "p1I21" "p1I21" "p1I20" "p1I20" "p1I19" "p1I19" "p1I24" "p1I24" "p1I23" "p1I23"
[575] "p1I22" "p1I22" "p1P03" "p1P03" "p1P02" "p1P02" "p1P01" "p1P01" "p1P06" "p1P06" "p1P05" "p1P05" "p1P04" "p1P04"
[589] "p1P09" "p1P09" "p1P08" "p1P08" "p1P07" "p1P07" "p1P12" "p1P12" "p1P11" "p1P11" "p1P10" "p1P10" "p1P15" "p1P15"
[603] "p1P14" "p1P14" "p1P13" "p1P13" "p1P18" "p1P18" "p1P17" "p1P17" "p1P16" "p1P16" "p1P21" "p1P21" "p1P20" "p1P20"
[617] "p1P19" "p1P19" "p1P24" "p1P24" "p1P23" "p1P23" "p1P22" "p1P22" "p1O03" "p1O03" "p1O02" "p1O02" "p1O01" "p1O01"
[631] "p1O06" "p1O06" "p1O05" "p1O05" "p1O04" "p1O04" "p1O09" "p1O09" "p1O08" "p1O08" "p1O07" "p1O07" "p1O12" "p1O12"
[645] "p1O11" "p1O11" "p1O10" "p1O10" "p1O15" "p1O15" "p1O14" "p1O14" "p1O13" "p1O13" "p1O18" "p1O18" "p1O17" "p1O17"
[659] "p1O16" "p1O16" "p1O21" "p1O21" "p1O20" "p1O20" "p1O19" "p1O19" "p1O24" "p1O24" "p1O23" "p1O23" "p1O22" "p1O22"
[673] "p1N03" "p1N03" "p1N02" "p1N02" "p1N01" "p1N01" "p1N06" "p1N06" "p1N05" "p1N05" "p1N04" "p1N04" "p1N09" "p1N09"
[687] "p1N08" "p1N08" "p1N07" "p1N07" "p1N12" "p1N12" "p1N11" "p1N11" "p1N10" "p1N10" "p1N15" "p1N15" "p1N14" "p1N14"
[701] "p1N13" "p1N13" "p1N18" "p1N18" "p1N17" "p1N17" "p1N16" "p1N16" "p1N21" "p1N21" "p1N20" "p1N20" "p1N19" "p1N19"
[715] "p1N24" "p1N24" "p1N23" "p1N23" "p1N22" "p1N22" "p1M03" "p1M03" "p1M02" "p1M02" "p1M01" "p1M01" "p1M06" "p1M06"
[729] "p1M05" "p1M05" "p1M04" "p1M04" "p1M09" "p1M09" "p1M08" "p1M08" "p1M07" "p1M07" "p1M12" "p1M12" "p1M11" "p1M11"
[743] "p1M10" "p1M10" "p1M15" "p1M15" "p1M14" "p1M14" "p1M13" "p1M13" "p1M18" "p1M18" "p1M17" "p1M17" "p1M16" "p1M16"
[757] "p1M21" "p1M21" "p1M20" "p1M20" "p1M19" "p1M19" "p1M24" "p1M24" "p1M23" "p1M23" "p1M22" "p1M22"

> printorder(list(ngrid.r=4,ngrid.c=4,nspot.r=8,nspot.c=6))
$printorder
  [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
 [39] 39 40 41 42 43 44 45 46 47 48  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
 [77] 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18
[115] 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48  1  2  3  4  5  6  7  8
[153]  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
[191] 47 48  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
[229] 37 38 39 40 41 42 43 44 45 46 47 48  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
[267] 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16
[305] 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48  1  2  3  4  5  6
[343]  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
[381] 45 46 47 48  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
[419] 35 36 37 38 39 40 41 42 43 44 45 46 47 48  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
[457] 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48  1  2  3  4  5  6  7  8  9 10 11 12 13 14
[495] 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48  1  2  3  4
[533]  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
[571] 43 44 45 46 47 48  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
[609] 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22
[647] 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48  1  2  3  4  5  6  7  8  9 10 11 12
[685] 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48  1  2
[723]  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
[761] 41 42 43 44 45 46 47 48

$plate
  [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1
 [58] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[115] 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2
[172] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2
[229] 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
[286] 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1
[343] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[400] 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[457] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2
[514] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
[571] 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1
[628] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1
[685] 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[742] 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

$plate.r
  [1]  4  4  4  4  4  4  8  8  8  8  8  8 12 12 12 12 12 12 16 16 16 16 16 16  4  4  4  4  4  4  8  8  8  8  8  8 12 12
 [39] 12 12 12 12 16 16 16 16 16 16  3  3  3  3  3  3  7  7  7  7  7  7 11 11 11 11 11 11 15 15 15 15 15 15  3  3  3  3
 [77]  3  3  7  7  7  7  7  7 11 11 11 11 11 11 15 15 15 15 15 15  2  2  2  2  2  2  6  6  6  6  6  6 10 10 10 10 10 10
[115] 14 14 14 14 14 14  2  2  2  2  2  2  6  6  6  6  6  6 10 10 10 10 10 10 14 14 14 14 14 14  1  1  1  1  1  1  5  5
[153]  5  5  5  5  9  9  9  9  9  9 13 13 13 13 13 13  1  1  1  1  1  1  5  5  5  5  5  5  9  9  9  9  9  9 13 13 13 13
[191] 13 13  4  4  4  4  4  4  8  8  8  8  8  8 12 12 12 12 12 12 16 16 16 16 16 16  4  4  4  4  4  4  8  8  8  8  8  8
[229] 12 12 12 12 12 12 16 16 16 16 16 16  3  3  3  3  3  3  7  7  7  7  7  7 11 11 11 11 11 11 15 15 15 15 15 15  3  3
[267]  3  3  3  3  7  7  7  7  7  7 11 11 11 11 11 11 15 15 15 15 15 15  2  2  2  2  2  2  6  6  6  6  6  6 10 10 10 10
[305] 10 10 14 14 14 14 14 14  2  2  2  2  2  2  6  6  6  6  6  6 10 10 10 10 10 10 14 14 14 14 14 14  1  1  1  1  1  1
[343]  5  5  5  5  5  5  9  9  9  9  9  9 13 13 13 13 13 13  1  1  1  1  1  1  5  5  5  5  5  5  9  9  9  9  9  9 13 13
[381] 13 13 13 13  4  4  4  4  4  4  8  8  8  8  8  8 12 12 12 12 12 12 16 16 16 16 16 16  4  4  4  4  4  4  8  8  8  8
[419]  8  8 12 12 12 12 12 12 16 16 16 16 16 16  3  3  3  3  3  3  7  7  7  7  7  7 11 11 11 11 11 11 15 15 15 15 15 15
[457]  3  3  3  3  3  3  7  7  7  7  7  7 11 11 11 11 11 11 15 15 15 15 15 15  2  2  2  2  2  2  6  6  6  6  6  6 10 10
[495] 10 10 10 10 14 14 14 14 14 14  2  2  2  2  2  2  6  6  6  6  6  6 10 10 10 10 10 10 14 14 14 14 14 14  1  1  1  1
[533]  1  1  5  5  5  5  5  5  9  9  9  9  9  9 13 13 13 13 13 13  1  1  1  1  1  1  5  5  5  5  5  5  9  9  9  9  9  9
[571] 13 13 13 13 13 13  4  4  4  4  4  4  8  8  8  8  8  8 12 12 12 12 12 12 16 16 16 16 16 16  4  4  4  4  4  4  8  8
[609]  8  8  8  8 12 12 12 12 12 12 16 16 16 16 16 16  3  3  3  3  3  3  7  7  7  7  7  7 11 11 11 11 11 11 15 15 15 15
[647] 15 15  3  3  3  3  3  3  7  7  7  7  7  7 11 11 11 11 11 11 15 15 15 15 15 15  2  2  2  2  2  2  6  6  6  6  6  6
[685] 10 10 10 10 10 10 14 14 14 14 14 14  2  2  2  2  2  2  6  6  6  6  6  6 10 10 10 10 10 10 14 14 14 14 14 14  1  1
[723]  1  1  1  1  5  5  5  5  5  5  9  9  9  9  9  9 13 13 13 13 13 13  1  1  1  1  1  1  5  5  5  5  5  5  9  9  9  9
[761]  9  9 13 13 13 13 13 13

$plate.c
  [1]  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5
 [39]  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13
 [77] 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21
[115]  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5
[153]  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13
[191] 17 21  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22
[229]  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6
[267] 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14
[305] 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22
[343]  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6
[381] 10 14 18 22  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15
[419] 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23
[457]  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7
[495] 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15
[533] 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23
[571]  3  7 11 15 19 23  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8
[609] 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16
[647] 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24
[685]  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8
[723] 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16
[761] 20 24  4  8 12 16 20 24

$plateposition
  [1] "p1D01" "p1D05" "p1D09" "p1D13" "p1D17" "p1D21" "p1H01" "p1H05" "p1H09" "p1H13" "p1H17" "p1H21" "p1L01" "p1L05"
 [15] "p1L09" "p1L13" "p1L17" "p1L21" "p1P01" "p1P05" "p1P09" "p1P13" "p1P17" "p1P21" "p2D01" "p2D05" "p2D09" "p2D13"
 [29] "p2D17" "p2D21" "p2H01" "p2H05" "p2H09" "p2H13" "p2H17" "p2H21" "p2L01" "p2L05" "p2L09" "p2L13" "p2L17" "p2L21"
 [43] "p2P01" "p2P05" "p2P09" "p2P13" "p2P17" "p2P21" "p1C01" "p1C05" "p1C09" "p1C13" "p1C17" "p1C21" "p1G01" "p1G05"
 [57] "p1G09" "p1G13" "p1G17" "p1G21" "p1K01" "p1K05" "p1K09" "p1K13" "p1K17" "p1K21" "p1O01" "p1O05" "p1O09" "p1O13"
 [71] "p1O17" "p1O21" "p2C01" "p2C05" "p2C09" "p2C13" "p2C17" "p2C21" "p2G01" "p2G05" "p2G09" "p2G13" "p2G17" "p2G21"
 [85] "p2K01" "p2K05" "p2K09" "p2K13" "p2K17" "p2K21" "p2O01" "p2O05" "p2O09" "p2O13" "p2O17" "p2O21" "p1B01" "p1B05"
 [99] "p1B09" "p1B13" "p1B17" "p1B21" "p1F01" "p1F05" "p1F09" "p1F13" "p1F17" "p1F21" "p1J01" "p1J05" "p1J09" "p1J13"
[113] "p1J17" "p1J21" "p1N01" "p1N05" "p1N09" "p1N13" "p1N17" "p1N21" "p2B01" "p2B05" "p2B09" "p2B13" "p2B17" "p2B21"
[127] "p2F01" "p2F05" "p2F09" "p2F13" "p2F17" "p2F21" "p2J01" "p2J05" "p2J09" "p2J13" "p2J17" "p2J21" "p2N01" "p2N05"
[141] "p2N09" "p2N13" "p2N17" "p2N21" "p1A01" "p1A05" "p1A09" "p1A13" "p1A17" "p1A21" "p1E01" "p1E05" "p1E09" "p1E13"
[155] "p1E17" "p1E21" "p1I01" "p1I05" "p1I09" "p1I13" "p1I17" "p1I21" "p1M01" "p1M05" "p1M09" "p1M13" "p1M17" "p1M21"
[169] "p2A01" "p2A05" "p2A09" "p2A13" "p2A17" "p2A21" "p2E01" "p2E05" "p2E09" "p2E13" "p2E17" "p2E21" "p2I01" "p2I05"
[183] "p2I09" "p2I13" "p2I17" "p2I21" "p2M01" "p2M05" "p2M09" "p2M13" "p2M17" "p2M21" "p1D02" "p1D06" "p1D10" "p1D14"
[197] "p1D18" "p1D22" "p1H02" "p1H06" "p1H10" "p1H14" "p1H18" "p1H22" "p1L02" "p1L06" "p1L10" "p1L14" "p1L18" "p1L22"
[211] "p1P02" "p1P06" "p1P10" "p1P14" "p1P18" "p1P22" "p2D02" "p2D06" "p2D10" "p2D14" "p2D18" "p2D22" "p2H02" "p2H06"
[225] "p2H10" "p2H14" "p2H18" "p2H22" "p2L02" "p2L06" "p2L10" "p2L14" "p2L18" "p2L22" "p2P02" "p2P06" "p2P10" "p2P14"
[239] "p2P18" "p2P22" "p1C02" "p1C06" "p1C10" "p1C14" "p1C18" "p1C22" "p1G02" "p1G06" "p1G10" "p1G14" "p1G18" "p1G22"
[253] "p1K02" "p1K06" "p1K10" "p1K14" "p1K18" "p1K22" "p1O02" "p1O06" "p1O10" "p1O14" "p1O18" "p1O22" "p2C02" "p2C06"
[267] "p2C10" "p2C14" "p2C18" "p2C22" "p2G02" "p2G06" "p2G10" "p2G14" "p2G18" "p2G22" "p2K02" "p2K06" "p2K10" "p2K14"
[281] "p2K18" "p2K22" "p2O02" "p2O06" "p2O10" "p2O14" "p2O18" "p2O22" "p1B02" "p1B06" "p1B10" "p1B14" "p1B18" "p1B22"
[295] "p1F02" "p1F06" "p1F10" "p1F14" "p1F18" "p1F22" "p1J02" "p1J06" "p1J10" "p1J14" "p1J18" "p1J22" "p1N02" "p1N06"
[309] "p1N10" "p1N14" "p1N18" "p1N22" "p2B02" "p2B06" "p2B10" "p2B14" "p2B18" "p2B22" "p2F02" "p2F06" "p2F10" "p2F14"
[323] "p2F18" "p2F22" "p2J02" "p2J06" "p2J10" "p2J14" "p2J18" "p2J22" "p2N02" "p2N06" "p2N10" "p2N14" "p2N18" "p2N22"
[337] "p1A02" "p1A06" "p1A10" "p1A14" "p1A18" "p1A22" "p1E02" "p1E06" "p1E10" "p1E14" "p1E18" "p1E22" "p1I02" "p1I06"
[351] "p1I10" "p1I14" "p1I18" "p1I22" "p1M02" "p1M06" "p1M10" "p1M14" "p1M18" "p1M22" "p2A02" "p2A06" "p2A10" "p2A14"
[365] "p2A18" "p2A22" "p2E02" "p2E06" "p2E10" "p2E14" "p2E18" "p2E22" "p2I02" "p2I06" "p2I10" "p2I14" "p2I18" "p2I22"
[379] "p2M02" "p2M06" "p2M10" "p2M14" "p2M18" "p2M22" "p1D03" "p1D07" "p1D11" "p1D15" "p1D19" "p1D23" "p1H03" "p1H07"
[393] "p1H11" "p1H15" "p1H19" "p1H23" "p1L03" "p1L07" "p1L11" "p1L15" "p1L19" "p1L23" "p1P03" "p1P07" "p1P11" "p1P15"
[407] "p1P19" "p1P23" "p2D03" "p2D07" "p2D11" "p2D15" "p2D19" "p2D23" "p2H03" "p2H07" "p2H11" "p2H15" "p2H19" "p2H23"
[421] "p2L03" "p2L07" "p2L11" "p2L15" "p2L19" "p2L23" "p2P03" "p2P07" "p2P11" "p2P15" "p2P19" "p2P23" "p1C03" "p1C07"
[435] "p1C11" "p1C15" "p1C19" "p1C23" "p1G03" "p1G07" "p1G11" "p1G15" "p1G19" "p1G23" "p1K03" "p1K07" "p1K11" "p1K15"
[449] "p1K19" "p1K23" "p1O03" "p1O07" "p1O11" "p1O15" "p1O19" "p1O23" "p2C03" "p2C07" "p2C11" "p2C15" "p2C19" "p2C23"
[463] "p2G03" "p2G07" "p2G11" "p2G15" "p2G19" "p2G23" "p2K03" "p2K07" "p2K11" "p2K15" "p2K19" "p2K23" "p2O03" "p2O07"
[477] "p2O11" "p2O15" "p2O19" "p2O23" "p1B03" "p1B07" "p1B11" "p1B15" "p1B19" "p1B23" "p1F03" "p1F07" "p1F11" "p1F15"
[491] "p1F19" "p1F23" "p1J03" "p1J07" "p1J11" "p1J15" "p1J19" "p1J23" "p1N03" "p1N07" "p1N11" "p1N15" "p1N19" "p1N23"
[505] "p2B03" "p2B07" "p2B11" "p2B15" "p2B19" "p2B23" "p2F03" "p2F07" "p2F11" "p2F15" "p2F19" "p2F23" "p2J03" "p2J07"
[519] "p2J11" "p2J15" "p2J19" "p2J23" "p2N03" "p2N07" "p2N11" "p2N15" "p2N19" "p2N23" "p1A03" "p1A07" "p1A11" "p1A15"
[533] "p1A19" "p1A23" "p1E03" "p1E07" "p1E11" "p1E15" "p1E19" "p1E23" "p1I03" "p1I07" "p1I11" "p1I15" "p1I19" "p1I23"
[547] "p1M03" "p1M07" "p1M11" "p1M15" "p1M19" "p1M23" "p2A03" "p2A07" "p2A11" "p2A15" "p2A19" "p2A23" "p2E03" "p2E07"
[561] "p2E11" "p2E15" "p2E19" "p2E23" "p2I03" "p2I07" "p2I11" "p2I15" "p2I19" "p2I23" "p2M03" "p2M07" "p2M11" "p2M15"
[575] "p2M19" "p2M23" "p1D04" "p1D08" "p1D12" "p1D16" "p1D20" "p1D24" "p1H04" "p1H08" "p1H12" "p1H16" "p1H20" "p1H24"
[589] "p1L04" "p1L08" "p1L12" "p1L16" "p1L20" "p1L24" "p1P04" "p1P08" "p1P12" "p1P16" "p1P20" "p1P24" "p2D04" "p2D08"
[603] "p2D12" "p2D16" "p2D20" "p2D24" "p2H04" "p2H08" "p2H12" "p2H16" "p2H20" "p2H24" "p2L04" "p2L08" "p2L12" "p2L16"
[617] "p2L20" "p2L24" "p2P04" "p2P08" "p2P12" "p2P16" "p2P20" "p2P24" "p1C04" "p1C08" "p1C12" "p1C16" "p1C20" "p1C24"
[631] "p1G04" "p1G08" "p1G12" "p1G16" "p1G20" "p1G24" "p1K04" "p1K08" "p1K12" "p1K16" "p1K20" "p1K24" "p1O04" "p1O08"
[645] "p1O12" "p1O16" "p1O20" "p1O24" "p2C04" "p2C08" "p2C12" "p2C16" "p2C20" "p2C24" "p2G04" "p2G08" "p2G12" "p2G16"
[659] "p2G20" "p2G24" "p2K04" "p2K08" "p2K12" "p2K16" "p2K20" "p2K24" "p2O04" "p2O08" "p2O12" "p2O16" "p2O20" "p2O24"
[673] "p1B04" "p1B08" "p1B12" "p1B16" "p1B20" "p1B24" "p1F04" "p1F08" "p1F12" "p1F16" "p1F20" "p1F24" "p1J04" "p1J08"
[687] "p1J12" "p1J16" "p1J20" "p1J24" "p1N04" "p1N08" "p1N12" "p1N16" "p1N20" "p1N24" "p2B04" "p2B08" "p2B12" "p2B16"
[701] "p2B20" "p2B24" "p2F04" "p2F08" "p2F12" "p2F16" "p2F20" "p2F24" "p2J04" "p2J08" "p2J12" "p2J16" "p2J20" "p2J24"
[715] "p2N04" "p2N08" "p2N12" "p2N16" "p2N20" "p2N24" "p1A04" "p1A08" "p1A12" "p1A16" "p1A20" "p1A24" "p1E04" "p1E08"
[729] "p1E12" "p1E16" "p1E20" "p1E24" "p1I04" "p1I08" "p1I12" "p1I16" "p1I20" "p1I24" "p1M04" "p1M08" "p1M12" "p1M16"
[743] "p1M20" "p1M24" "p2A04" "p2A08" "p2A12" "p2A16" "p2A20" "p2A24" "p2E04" "p2E08" "p2E12" "p2E16" "p2E20" "p2E24"
[757] "p2I04" "p2I08" "p2I12" "p2I16" "p2I20" "p2I24" "p2M04" "p2M08" "p2M12" "p2M16" "p2M20" "p2M24"

> 
> ### merge.rglist
> 
> R <- G <- matrix(11:14,4,2)
> rownames(R) <- rownames(G) <- c("a","a","b","c")
> RG1 <- new("RGList",list(R=R,G=G))
> R <- G <- matrix(21:24,4,2)
> rownames(R) <- rownames(G) <- c("b","a","a","c")
> RG2 <- new("RGList",list(R=R,G=G))
> merge(RG1,RG2)
An object of class "RGList"
$R
  [,1] [,2] [,3] [,4]
a   11   11   22   22
a   12   12   23   23
b   13   13   21   21
c   14   14   24   24

$G
  [,1] [,2] [,3] [,4]
a   11   11   22   22
a   12   12   23   23
b   13   13   21   21
c   14   14   24   24

> merge(RG2,RG1)
An object of class "RGList"
$R
  [,1] [,2] [,3] [,4]
b   21   21   13   13
a   22   22   11   11
a   23   23   12   12
c   24   24   14   14

$G
  [,1] [,2] [,3] [,4]
b   21   21   13   13
a   22   22   11   11
a   23   23   12   12
c   24   24   14   14

> 
> ### background correction
> 
> RG <- new("RGList", list(R=c(1,2,3,4),G=c(1,2,3,4),Rb=c(2,2,2,2),Gb=c(2,2,2,2)))
> backgroundCorrect(RG)
An object of class "RGList"
$R
     [,1]
[1,]   -1
[2,]    0
[3,]    1
[4,]    2

$G
     [,1]
[1,]   -1
[2,]    0
[3,]    1
[4,]    2

> backgroundCorrect(RG, method="half")
An object of class "RGList"
$R
     [,1]
[1,]  0.5
[2,]  0.5
[3,]  1.0
[4,]  2.0

$G
     [,1]
[1,]  0.5
[2,]  0.5
[3,]  1.0
[4,]  2.0

> backgroundCorrect(RG, method="minimum")
An object of class "RGList"
$R
     [,1]
[1,]  0.5
[2,]  0.5
[3,]  1.0
[4,]  2.0

$G
     [,1]
[1,]  0.5
[2,]  0.5
[3,]  1.0
[4,]  2.0

> backgroundCorrect(RG, offset=5)
An object of class "RGList"
$R
     [,1]
[1,]    4
[2,]    5
[3,]    6
[4,]    7

$G
     [,1]
[1,]    4
[2,]    5
[3,]    6
[4,]    7

> 
> ### loessFit
> 
> x <- 1:100
> y <- rnorm(100)
> out <- loessFit(y,x)
> f1 <- quantile(out$fitted)
> r1 <- quantile(out$residuals)
> w <- rep(1,100)
> w[1:50] <- 0.5
> out <- loessFit(y,x,weights=w,method="weightedLowess")
> f2 <- quantile(out$fitted)
> r2 <- quantile(out$residuals)
> out <- loessFit(y,x,weights=w,method="locfit")
> f3 <- quantile(out$fitted)
> r3 <- quantile(out$residuals)
> out <- loessFit(y,x,weights=w,method="loess")
> f4 <- quantile(out$fitted)
> r4 <- quantile(out$residuals)
> w <- rep(1,100)
> w[2*(1:50)] <- 0
> out <- loessFit(y,x,weights=w,method="weightedLowess")
> f5 <- quantile(out$fitted)
> r5 <- quantile(out$residuals)
> data.frame(f1,f2,f3,f4,f5)
              f1           f2          f3          f4          f5
0%   -0.78835384 -0.687432210 -0.78957137 -0.76756060 -0.63778292
25%  -0.18340154 -0.179683572 -0.18979269 -0.16773223 -0.38064318
50%  -0.11492924 -0.114796040 -0.12087983 -0.07185314 -0.15971879
75%   0.01507921 -0.008145125 -0.01857508  0.04030634  0.07839396
100%  0.21653837  0.145106033  0.19214597  0.21417361  0.51836274
> data.frame(r1,r2,r3,r4,r5)
              r1          r2          r3           r4          r5
0%   -2.04434053 -2.05132680 -2.02404318 -2.101242874 -2.22280633
25%  -0.59321065 -0.57200209 -0.58975649 -0.577887481 -0.71037756
50%   0.05874864  0.04514326  0.08335198 -0.001769806  0.06785517
75%   0.56010750  0.55124530  0.57618740  0.561454370  0.65383830
100%  2.57936026  2.64549799  2.57549257  2.402324533  2.28648835
> 
> ### normalizeWithinArrays
> 
> RG <- new("RGList",list())
> RG$R <- matrix(rexp(100*2),100,2)
> RG$G <- matrix(rexp(100*2),100,2)
> RG$Rb <- matrix(rnorm(100*2,sd=0.02),100,2)
> RG$Gb <- matrix(rnorm(100*2,sd=0.02),100,2)
> RGb <- backgroundCorrect(RG,method="normexp",normexp.method="saddle")
Array 1 corrected
Array 2 corrected
Array 1 corrected
Array 2 corrected
> summary(cbind(RGb$R,RGb$G))
       V1                V2                V3               V4        
 Min.   :0.01626   Min.   :0.01213   Min.   :0.0000   Min.   :0.0000  
 1st Qu.:0.35497   1st Qu.:0.29133   1st Qu.:0.2745   1st Qu.:0.3953  
 Median :0.71793   Median :0.70294   Median :0.6339   Median :0.8223  
 Mean   :0.90184   Mean   :1.00122   Mean   :0.9454   Mean   :1.1324  
 3rd Qu.:1.16891   3rd Qu.:1.33139   3rd Qu.:1.4059   3rd Qu.:1.4221  
 Max.   :4.56267   Max.   :6.37947   Max.   :5.0486   Max.   :6.6295  
> RGb <- backgroundCorrect(RG,method="normexp",normexp.method="mle")
Array 1 corrected
Array 2 corrected
Array 1 corrected
Array 2 corrected
> summary(cbind(RGb$R,RGb$G))
       V1                V2                V3               V4        
 Min.   :0.01701   Min.   :0.01255   Min.   :0.0000   Min.   :0.0000  
 1st Qu.:0.35423   1st Qu.:0.29118   1st Qu.:0.2745   1st Qu.:0.3953  
 Median :0.71719   Median :0.70280   Median :0.6339   Median :0.8223  
 Mean   :0.90118   Mean   :1.00110   Mean   :0.9454   Mean   :1.1324  
 3rd Qu.:1.16817   3rd Qu.:1.33124   3rd Qu.:1.4059   3rd Qu.:1.4221  
 Max.   :4.56193   Max.   :6.37932   Max.   :5.0486   Max.   :6.6295  
> MA <- normalizeWithinArrays(RGb,method="loess")
> summary(MA$M)
       V1                V2          
 Min.   :-5.8801   Min.   :-5.66985  
 1st Qu.:-1.1850   1st Qu.:-1.57014  
 Median :-0.2164   Median : 0.04823  
 Mean   : 0.0349   Mean   :-0.05481  
 3rd Qu.: 1.4964   3rd Qu.: 1.45113  
 Max.   : 7.0751   Max.   : 6.19744  
> #MA <- normalizeWithinArrays(RG[,1:2], mouse.setup, method="robustspline")
> #MA$M[1:5,]
> #MA <- normalizeWithinArrays(mouse.data, mouse.setup)
> #MA$M[1:5,]
> 
> ### normalizeBetweenArrays
> 
> MA2 <- normalizeBetweenArrays(MA,method="scale")
> MA$M[1:5,]
           [,1]       [,2]
[1,] -1.1669590  4.5558123
[2,]  0.8969743  0.3296544
[3,]  2.8245754  1.4249960
[4,] -1.8532747  0.4804851
[5,]  1.9159023 -5.5087631
> MA$A[1:5,]
            [,1]       [,2]
[1,] -2.48465011 -2.4041550
[2,] -0.79230447 -0.9002250
[3,] -0.76237200  0.2071043
[4,]  0.09281027 -1.3880965
[5,]  0.22385828 -3.0855818
> MA2 <- normalizeBetweenArrays(MA,method="quantile")
> MA$M[1:5,]
           [,1]       [,2]
[1,] -1.1669590  4.5558123
[2,]  0.8969743  0.3296544
[3,]  2.8245754  1.4249960
[4,] -1.8532747  0.4804851
[5,]  1.9159023 -5.5087631
> MA$A[1:5,]
            [,1]       [,2]
[1,] -2.48465011 -2.4041550
[2,] -0.79230447 -0.9002250
[3,] -0.76237200  0.2071043
[4,]  0.09281027 -1.3880965
[5,]  0.22385828 -3.0855818
> 
> ### unwrapdups
> 
> M <- matrix(1:12,6,2)
> unwrapdups(M,ndups=1)
     [,1] [,2]
[1,]    1    7
[2,]    2    8
[3,]    3    9
[4,]    4   10
[5,]    5   11
[6,]    6   12
> unwrapdups(M,ndups=2)
     [,1] [,2] [,3] [,4]
[1,]    1    2    7    8
[2,]    3    4    9   10
[3,]    5    6   11   12
> unwrapdups(M,ndups=3)
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    1    2    3    7    8    9
[2,]    4    5    6   10   11   12
> unwrapdups(M,ndups=2,spacing=3)
     [,1] [,2] [,3] [,4]
[1,]    1    4    7   10
[2,]    2    5    8   11
[3,]    3    6    9   12
> 
> ### trigammaInverse
> 
> trigammaInverse(c(1e-6,NA,5,1e6))
[1] 1.000000e+06           NA 4.961687e-01 1.000001e-03
> 
> ### lmFit, eBayes, topTable
> 
> M <- matrix(rnorm(10*6,sd=0.3),10,6)
> rownames(M) <- LETTERS[1:10]
> M[1,1:3] <- M[1,1:3] + 2
> design <- cbind(First3Arrays=c(1,1,1,0,0,0),Last3Arrays=c(0,0,0,1,1,1))
> contrast.matrix <- cbind(First3=c(1,0),Last3=c(0,1),"Last3-First3"=c(-1,1))
> fit <- lmFit(M,design)
> fit2 <- eBayes(contrasts.fit(fit,contrasts=contrast.matrix))
> topTable(fit2)
       First3       Last3 Last3.First3      AveExpr           F      P.Value    adj.P.Val
A  1.77602021  0.06025114  -1.71576906  0.918135675 50.91471061 7.727200e-23 7.727200e-22
D -0.05454069  0.39127869   0.44581938  0.168369004  2.51638838 8.075072e-02 3.758388e-01
F -0.16249607 -0.33009728  -0.16760121 -0.246296671  2.18256779 1.127516e-01 3.758388e-01
G  0.30852468 -0.06873462  -0.37725930  0.119895035  1.61088775 1.997102e-01 4.992756e-01
H -0.16942269  0.20578118   0.37520387  0.018179245  1.14554368 3.180510e-01 6.361019e-01
J  0.21417623  0.07074940  -0.14342683  0.142462814  0.82029274 4.403027e-01 7.338379e-01
C -0.12236781  0.15095948   0.27332729  0.014295836  0.60885003 5.439761e-01 7.382414e-01
B -0.11982833  0.13529287   0.25512120  0.007732271  0.52662792 5.905931e-01 7.382414e-01
E  0.01897934  0.10434934   0.08536999  0.061664340  0.18136849 8.341279e-01 9.268088e-01
I -0.04720963  0.03996397   0.08717360 -0.003622829  0.06168476 9.401792e-01 9.401792e-01
> topTable(fit2,coef=3,resort.by="logFC")
        logFC      AveExpr          t      P.Value    adj.P.Val         B
D  0.44581938  0.168369004  1.7901232 8.100587e-02 3.494414e-01 -5.323150
H  0.37520387  0.018179245  1.5065768 1.397766e-01 3.494414e-01 -5.785971
C  0.27332729  0.014295836  1.0975061 2.789833e-01 5.196681e-01 -6.313399
B  0.25512120  0.007732271  1.0244023 3.118009e-01 5.196681e-01 -6.390202
I  0.08717360 -0.003622829  0.3500330 7.281504e-01 7.335508e-01 -6.849117
E  0.08536999  0.061664340  0.3427908 7.335508e-01 7.335508e-01 -6.851601
J -0.14342683  0.142462814 -0.5759097 5.679026e-01 7.098782e-01 -6.745563
F -0.16760121 -0.246296671 -0.6729784 5.048308e-01 7.098782e-01 -6.685541
G -0.37725930  0.119895035 -1.5148301 1.376783e-01 3.494414e-01 -5.773625
A -1.71576906  0.918135675 -6.8894222 2.674199e-08 2.674199e-07 16.590631
> topTable(fit2,coef=3,resort.by="p")
        logFC      AveExpr          t      P.Value    adj.P.Val         B
A -1.71576906  0.918135675 -6.8894222 2.674199e-08 2.674199e-07 16.590631
D  0.44581938  0.168369004  1.7901232 8.100587e-02 3.494414e-01 -5.323150
G -0.37725930  0.119895035 -1.5148301 1.376783e-01 3.494414e-01 -5.773625
H  0.37520387  0.018179245  1.5065768 1.397766e-01 3.494414e-01 -5.785971
C  0.27332729  0.014295836  1.0975061 2.789833e-01 5.196681e-01 -6.313399
B  0.25512120  0.007732271  1.0244023 3.118009e-01 5.196681e-01 -6.390202
F -0.16760121 -0.246296671 -0.6729784 5.048308e-01 7.098782e-01 -6.685541
J -0.14342683  0.142462814 -0.5759097 5.679026e-01 7.098782e-01 -6.745563
I  0.08717360 -0.003622829  0.3500330 7.281504e-01 7.335508e-01 -6.849117
E  0.08536999  0.061664340  0.3427908 7.335508e-01 7.335508e-01 -6.851601
> topTable(fit2,coef=3,sort.by="logFC",resort.by="t")
        logFC      AveExpr          t      P.Value    adj.P.Val         B
D  0.44581938  0.168369004  1.7901232 8.100587e-02 3.494414e-01 -5.323150
H  0.37520387  0.018179245  1.5065768 1.397766e-01 3.494414e-01 -5.785971
C  0.27332729  0.014295836  1.0975061 2.789833e-01 5.196681e-01 -6.313399
B  0.25512120  0.007732271  1.0244023 3.118009e-01 5.196681e-01 -6.390202
I  0.08717360 -0.003622829  0.3500330 7.281504e-01 7.335508e-01 -6.849117
E  0.08536999  0.061664340  0.3427908 7.335508e-01 7.335508e-01 -6.851601
J -0.14342683  0.142462814 -0.5759097 5.679026e-01 7.098782e-01 -6.745563
F -0.16760121 -0.246296671 -0.6729784 5.048308e-01 7.098782e-01 -6.685541
G -0.37725930  0.119895035 -1.5148301 1.376783e-01 3.494414e-01 -5.773625
A -1.71576906  0.918135675 -6.8894222 2.674199e-08 2.674199e-07 16.590631
> topTable(fit2,coef=3,resort.by="B")
        logFC      AveExpr          t      P.Value    adj.P.Val         B
A -1.71576906  0.918135675 -6.8894222 2.674199e-08 2.674199e-07 16.590631
D  0.44581938  0.168369004  1.7901232 8.100587e-02 3.494414e-01 -5.323150
G -0.37725930  0.119895035 -1.5148301 1.376783e-01 3.494414e-01 -5.773625
H  0.37520387  0.018179245  1.5065768 1.397766e-01 3.494414e-01 -5.785971
C  0.27332729  0.014295836  1.0975061 2.789833e-01 5.196681e-01 -6.313399
B  0.25512120  0.007732271  1.0244023 3.118009e-01 5.196681e-01 -6.390202
F -0.16760121 -0.246296671 -0.6729784 5.048308e-01 7.098782e-01 -6.685541
J -0.14342683  0.142462814 -0.5759097 5.679026e-01 7.098782e-01 -6.745563
I  0.08717360 -0.003622829  0.3500330 7.281504e-01 7.335508e-01 -6.849117
E  0.08536999  0.061664340  0.3427908 7.335508e-01 7.335508e-01 -6.851601
> topTable(fit2,coef=3,lfc=1)
      logFC   AveExpr         t      P.Value    adj.P.Val        B
A -1.715769 0.9181357 -6.889422 2.674199e-08 2.674199e-07 16.59063
> topTable(fit2,coef=3,p.value=0.2)
      logFC   AveExpr         t      P.Value    adj.P.Val        B
A -1.715769 0.9181357 -6.889422 2.674199e-08 2.674199e-07 16.59063
> topTable(fit2,coef=3,p.value=0.2,lfc=0.5)
      logFC   AveExpr         t      P.Value    adj.P.Val        B
A -1.715769 0.9181357 -6.889422 2.674199e-08 2.674199e-07 16.59063
> topTable(fit2,coef=3,p.value=0.2,lfc=0.5,sort.by="none")
      logFC   AveExpr         t      P.Value    adj.P.Val        B
A -1.715769 0.9181357 -6.889422 2.674199e-08 2.674199e-07 16.59063
> contrasts.fit(fit[1:3,],contrast.matrix[,0])
An object of class "MArrayLM"
$coefficients
 
A
B
C

$rank
[1] 2

$assign
NULL

$qr
$qr
     First3Arrays Last3Arrays
[1,]   -1.7320508   0.0000000
[2,]    0.5773503  -1.7320508
[3,]    0.5773503   0.0000000
[4,]    0.0000000   0.5773503
[5,]    0.0000000   0.5773503
[6,]    0.0000000   0.5773503

$qraux
[1] 1.57735 1.00000

$pivot
[1] 1 2

$tol
[1] 1e-07

$rank
[1] 2


$df.residual
[1] 4 4 4

$sigma
        A         B         C 
0.3299787 0.3323336 0.2315815 

$cov.coefficients
<0 x 0 matrix>

$stdev.unscaled
 
A
B
C

$pivot
[1] 1 2

$Amean
          A           B           C 
0.918135675 0.007732271 0.014295836 

$method
[1] "ls"

$design
     First3Arrays Last3Arrays
[1,]            1           0
[2,]            1           0
[3,]            1           0
[4,]            0           1
[5,]            0           1
[6,]            0           1

$contrasts
    
[1,]
[2,]

> fit$coefficients[1,1] <- NA
> contrasts.fit(fit[1:3,],contrast.matrix)$coefficients
      First3      Last3 Last3-First3
A         NA 0.06025114           NA
B -0.1198283 0.13529287    0.2551212
C -0.1223678 0.15095948    0.2733273
> 
> designlist <- list(Null=matrix(1,6,1),Two=design,Three=cbind(1,c(0,0,1,1,0,0),c(0,0,0,0,1,1)))
> out <- selectModel(M,designlist)
> table(out$pref)

 Null   Two Three 
    5     3     2 
> 
> ### marray object
> 
> #suppressMessages(suppressWarnings(gotmarray <- require(marray,quietly=TRUE)))
> #if(gotmarray) {
> #	data(swirl)
> #	snorm = maNorm(swirl)
> #	fit <- lmFit(snorm, design = c(1,-1,-1,1))
> #	fit <- eBayes(fit)
> #	topTable(fit,resort.by="AveExpr")
> #}
> 
> ### duplicateCorrelation
> 
> cor.out <- duplicateCorrelation(M)
> cor.out$consensus.correlation
[1] -0.09290714
> cor.out$atanh.correlations
[1] -0.4419130  0.4088967 -0.1964978 -0.6093769  0.3730118
> 
> ### gls.series
> 
> fit <- gls.series(M,design,correlation=cor.out$cor)
> fit$coefficients
     First3Arrays Last3Arrays
[1,]   0.82809594  0.09777201
[2,]  -0.08845425  0.27111909
[3,]  -0.07175836 -0.11287397
[4,]   0.06955100  0.06852328
[5,]   0.08348330  0.05535668
> fit$stdev.unscaled
     First3Arrays Last3Arrays
[1,]    0.3888215   0.3888215
[2,]    0.3888215   0.3888215
[3,]    0.3888215   0.3888215
[4,]    0.3888215   0.3888215
[5,]    0.3888215   0.3888215
> fit$sigma
[1] 0.7630059 0.2152728 0.3350370 0.3227781 0.3405473
> fit$df.residual
[1] 10 10 10 10 10
> 
> ### mrlm
> 
> fit <- mrlm(M,design)
Warning message:
In rlm.default(x = X, y = y, weights = w, ...) :
  'rlm' failed to converge in 20 steps
> fit$coefficients
  First3Arrays Last3Arrays
A   1.75138894  0.06025114
B  -0.11982833  0.10322039
C  -0.09302502  0.15095948
D  -0.05454069  0.33700045
E   0.07927938  0.10434934
F  -0.16249607 -0.34010852
G   0.30852468 -0.06873462
H  -0.16942269  0.24392984
I  -0.04720963  0.03996397
J   0.21417623 -0.05679272
> fit$stdev.unscaled
  First3Arrays Last3Arrays
A    0.5933418   0.5773503
B    0.5773503   0.6096497
C    0.6017444   0.5773503
D    0.5773503   0.6266021
E    0.6307703   0.5773503
F    0.5773503   0.5846707
G    0.5773503   0.5773503
H    0.5773503   0.6544564
I    0.5773503   0.5773503
J    0.5773503   0.6689776
> fit$sigma
 [1] 0.2894294 0.2679396 0.2090236 0.1461395 0.2309018 0.2827476 0.2285945 0.2267556 0.3537469 0.2172409
> fit$df.residual
 [1] 4 4 4 4 4 4 4 4 4 4
> 
> # Similar to Mette Langaas 19 May 2004
> set.seed(123)
> narrays <- 9
> ngenes <- 5
> mu <- 0
> alpha <- 2
> beta <- -2
> epsilon <- matrix(rnorm(narrays*ngenes,0,1),ncol=narrays)
> X <- cbind(rep(1,9),c(0,0,0,1,1,1,0,0,0),c(0,0,0,0,0,0,1,1,1))
> dimnames(X) <- list(1:9,c("mu","alpha","beta"))
> yvec <- mu*X[,1]+alpha*X[,2]+beta*X[,3]
> ymat <- matrix(rep(yvec,ngenes),ncol=narrays,byrow=T)+epsilon
> ymat[5,1:2] <- NA
> fit <- lmFit(ymat,design=X)
> test.contr <- cbind(c(0,1,-1),c(1,1,0),c(1,0,1))
> dimnames(test.contr) <- list(c("mu","alpha","beta"),c("alpha-beta","mu+alpha","mu+beta"))
> fit2 <- contrasts.fit(fit,contrasts=test.contr)
> eBayes(fit2)
An object of class "MArrayLM"
$coefficients
     alpha-beta mu+alpha   mu+beta
[1,]   3.537333 1.677465 -1.859868
[2,]   4.355578 2.372554 -1.983024
[3,]   3.197645 1.053584 -2.144061
[4,]   2.697734 1.611443 -1.086291
[5,]   3.502304 2.051995 -1.450309

$stdev.unscaled
     alpha-beta  mu+alpha   mu+beta
[1,]  0.8164966 0.5773503 0.5773503
[2,]  0.8164966 0.5773503 0.5773503
[3,]  0.8164966 0.5773503 0.5773503
[4,]  0.8164966 0.5773503 0.5773503
[5,]  1.1547005 0.8368633 0.8368633

$sigma
[1] 1.3425032 0.4647155 1.1993444 0.9428569 0.9421509

$df.residual
[1] 6 6 6 6 4

$cov.coefficients
           alpha-beta     mu+alpha       mu+beta
alpha-beta  0.6666667 3.333333e-01 -3.333333e-01
mu+alpha    0.3333333 3.333333e-01  1.110223e-16
mu+beta    -0.3333333 1.110223e-16  3.333333e-01

$pivot
[1] 1 2 3

$rank
[1] 3

$Amean
[1]  0.2034961  0.1954604 -0.2863347  0.1188659  0.1784593

$method
[1] "ls"

$design
  mu alpha beta
1  1     0    0
2  1     0    0
3  1     0    0
4  1     1    0
5  1     1    0
6  1     1    0
7  1     0    1
8  1     0    1
9  1     0    1

$contrasts
      alpha-beta mu+alpha mu+beta
mu             0        1       1
alpha          1        1       0
beta          -1        0       1

$df.prior
[1] 8134.845

$s2.prior
[1] 1.021387

$var.prior
[1] 15.664973 11.397823  9.122785

$proportion
[1] 0.01

$s2.post
[1] 1.021963 1.020793 1.021694 1.021289 1.021321

$t
     alpha-beta mu+alpha   mu+beta
[1,]   4.285525 2.874066 -3.186582
[2,]   5.279861 4.067315 -3.399536
[3,]   3.874497 1.805382 -3.673984
[4,]   3.269417 2.761856 -1.861797
[5,]   3.001258 2.426278 -1.714845

$df.total
[1] 28 28 28 28 28

$p.value
       alpha-beta     mu+alpha      mu+beta
[1,] 1.945874e-04 0.0076518793 0.0035226472
[2,] 1.290875e-05 0.0003507232 0.0020449743
[3,] 5.877177e-04 0.0817788496 0.0009997966
[4,] 2.854794e-03 0.0100337538 0.0731588447
[5,] 5.599946e-03 0.0219470179 0.0974229293

$lods
     alpha-beta   mu+alpha    mu+beta
[1,]  0.7356274 -2.7480831 -1.9651516
[2,]  3.2466921  0.1146964 -1.4669585
[3,] -0.2839280 -4.8267525 -0.8071472
[4,] -1.7300021 -2.9939736 -4.6385674
[5,] -2.1848828 -3.4282344 -4.5756693

$F
[1]  9.207280 14.049948  8.378781  5.547069  4.521367

$F.p.value
[1] 1.013549e-04 8.103854e-07 2.316764e-04 3.913618e-03 1.090148e-02

> 
> ### uniquegenelist
> 
> uniquegenelist(letters[1:8],ndups=2)
[1] "a" "c" "e" "g"
> uniquegenelist(letters[1:8],ndups=2,spacing=2)
[1] "a" "b" "e" "f"
> 
> ### classifyTests
> 
> tstat <- matrix(c(0,5,0, 0,2.5,0, -2,-2,2, 1,1,1), 4, 3, byrow=TRUE)
> classifyTestsF(tstat)
TestResults matrix
     [,1] [,2] [,3]
[1,]    0    1    0
[2,]    0    0    0
[3,]   -1   -1    1
[4,]    0    0    0
> classifyTestsF(tstat,fstat.only=TRUE)
[1] 8.333333 2.083333 4.000000 1.000000
attr(,"df1")
[1] 3
attr(,"df2")
[1] Inf
> limma:::.classifyTestsP(tstat)
TestResults matrix
     [,1] [,2] [,3]
[1,]    0    1    0
[2,]    0    1    0
[3,]    0    0    0
[4,]    0    0    0
> 
> ### avereps
> 
> x <- matrix(rnorm(8*3),8,3)
> colnames(x) <- c("S1","S2","S3")
> rownames(x) <- c("b","a","a","c","c","b","b","b")
> avereps(x)
          S1         S2         S3
b -0.2353018  0.5220094  0.2302895
a -0.4347701  0.6453498 -0.6758914
c  0.3482980 -0.4820695 -0.3841313
> 
> ### roast
> 
> y <- matrix(rnorm(100*4),100,4)
> sigma <- sqrt(2/rchisq(100,df=7))
> y <- y*sigma
> design <- cbind(Intercept=1,Group=c(0,0,1,1))
> iset1 <- 1:5
> y[iset1,3:4] <- y[iset1,3:4]+3
> iset2 <- 6:10
> roast(y=y,iset1,design,contrast=2)
         Active.Prop     P.Value
Down               0 0.997999500
Up                 1 0.002250563
UpOrDown           1 0.004500000
Mixed              1 0.004500000
> roast(y=y,iset1,design,contrast=2,array.weights=c(0.5,1,0.5,1))
         Active.Prop     P.Value
Down               0 0.998749687
Up                 1 0.001500375
UpOrDown           1 0.003000000
Mixed              1 0.003000000
> w <- matrix(runif(100*4),100,4)
> roast(y=y,iset1,design,contrast=2,weights=w)
         Active.Prop     P.Value
Down               0 0.996999250
Up                 1 0.003250813
UpOrDown           1 0.006500000
Mixed              1 0.006500000
> mroast(y=y,list(set1=iset1,set2=iset2),design,contrast=2,gene.weights=runif(100))
     NGenes PropDown PropUp Direction PValue    FDR PValue.Mixed FDR.Mixed
set1      5        0      1        Up 0.0055 0.0105       0.0055    0.0105
set2      5        0      0        Up 0.2025 0.2025       0.4715    0.4715
> mroast(y=y,list(set1=iset1,set2=iset2),design,contrast=2,array.weights=c(0.5,1,0.5,1))
     NGenes PropDown PropUp Direction PValue    FDR PValue.Mixed FDR.Mixed
set1      5        0      1        Up 0.0050 0.0095        0.005    0.0095
set2      5        0      0        Up 0.6845 0.6845        0.642    0.6420
> mroast(y=y,list(set1=iset1,set2=iset2),design,contrast=2,weights=w)
     NGenes PropDown PropUp Direction PValue    FDR PValue.Mixed FDR.Mixed
set1      5        0    1.0        Up 0.0030 0.0055        0.003    0.0055
set2      5        0    0.2      Down 0.9615 0.9615        0.496    0.4960
> mroast(y=y,list(set1=iset1,set2=iset2),design,contrast=2,weights=w,array.weights=c(0.5,1,0.5,1))
     NGenes PropDown PropUp Direction PValue    FDR PValue.Mixed FDR.Mixed
set1      5        0    1.0        Up 0.0025 0.0045       0.0025    0.0045
set2      5        0    0.2      Down 0.8930 0.8930       0.4380    0.4380
> fry(y=y,list(set1=iset1,set2=iset2),design,contrast=2,weights=w,array.weights=c(0.5,1,0.5,1))
     NGenes Direction      PValue         FDR PValue.Mixed    FDR.Mixed
set1      5        Up 0.001568924 0.003137848 0.0001156464 0.0002312929
set2      5      Down 0.932105219 0.932105219 0.4315499569 0.4315499569
> rownames(y) <- paste0("Gene",1:100)
> iset1A <- rownames(y)[1:5]
> fry(y=y,index=iset1A,design,contrast=2,weights=w,array.weights=c(0.5,1,0.5,1))
     NGenes Direction      PValue PValue.Mixed
set1      5        Up 0.001568924 0.0001156464
> 
> ### camera
> 
> camera(y=y,iset1,design,contrast=2,weights=c(0.5,1,0.5,1),allow.neg.cor=TRUE,inter.gene.cor=NA)
     NGenes Correlation Direction      PValue
set1      5  -0.2481655        Up 0.001050253
> camera(y=y,list(set1=iset1,set2=iset2),design,contrast=2,allow.neg.cor=TRUE,inter.gene.cor=NA)
     NGenes Correlation Direction       PValue        FDR
set1      5  -0.2481655        Up 0.0009047749 0.00180955
set2      5   0.1719094      Down 0.9068364378 0.90683644
> camera(y=y,iset1,design,contrast=2,weights=c(0.5,1,0.5,1))
     NGenes Direction       PValue
set1      5        Up 1.105329e-10
> camera(y=y,list(set1=iset1,set2=iset2),design,contrast=2)
     NGenes Direction       PValue          FDR
set1      5        Up 7.334400e-12 1.466880e-11
set2      5      Down 8.677115e-01 8.677115e-01
> camera(y=y,iset1A,design,contrast=2)
     NGenes Direction     PValue
set1      5        Up 7.3344e-12
> 
> ### with EList arg
> 
> y <- new("EList",list(E=y))
> roast(y=y,iset1,design,contrast=2)
         Active.Prop     P.Value
Down               0 0.996999250
Up                 1 0.003250813
UpOrDown           1 0.006500000
Mixed              1 0.006500000
> camera(y=y,iset1,design,contrast=2,allow.neg.cor=TRUE,inter.gene.cor=NA)
     NGenes Correlation Direction       PValue
set1      5  -0.2481655        Up 0.0009047749
> camera(y=y,iset1,design,contrast=2)
     NGenes Direction     PValue
set1      5        Up 7.3344e-12
> 
> ### eBayes with trend
> 
> fit <- lmFit(y,design)
> fit <- eBayes(fit,trend=TRUE)
> topTable(fit,coef=2)
           logFC     AveExpr         t      P.Value  adj.P.Val          B
Gene2   3.729512  1.73488969  4.865697 0.0004854886 0.02902331  0.1596831
Gene3   3.488703  1.03931081  4.754954 0.0005804663 0.02902331 -0.0144071
Gene4   2.696676  1.74060725  3.356468 0.0063282637 0.21094212 -2.3434702
Gene1   2.391846  1.72305203  3.107124 0.0098781268 0.24695317 -2.7738874
Gene33 -1.492317 -0.07525287 -2.783817 0.0176475742 0.29965463 -3.3300835
Gene5   2.387967  1.63066783  2.773444 0.0179792778 0.29965463 -3.3478204
Gene80 -1.839760 -0.32802306 -2.503584 0.0291489863 0.37972679 -3.8049642
Gene39  1.366141 -0.27360750  2.451133 0.0320042242 0.37972679 -3.8925860
Gene95 -1.907074  1.26297763 -2.414217 0.0341754107 0.37972679 -3.9539571
Gene50  1.034777  0.01608433  2.054690 0.0642289403 0.59978803 -4.5350317
> fit$df.prior
[1] 9.098442
> fit$s2.prior
    Gene1     Gene2     Gene3     Gene4     Gene5     Gene6     Gene7     Gene8     Gene9    Gene10    Gene11    Gene12 
0.6901845 0.6977354 0.3860494 0.7014122 0.6341068 0.2926337 0.3077620 0.3058098 0.2985145 0.2832520 0.3232434 0.3279710 
   Gene13    Gene14    Gene15    Gene16    Gene17    Gene18    Gene19    Gene20    Gene21    Gene22    Gene23    Gene24 
0.2816081 0.2943502 0.3127994 0.2894802 0.2812758 0.2840051 0.2839124 0.2954261 0.2838592 0.2812704 0.3157029 0.2844541 
   Gene25    Gene26    Gene27    Gene28    Gene29    Gene30    Gene31    Gene32    Gene33    Gene34    Gene35    Gene36 
0.4778832 0.2818242 0.2930360 0.2940957 0.2941862 0.3234399 0.3164779 0.2853510 0.2988244 0.3450090 0.3048596 0.3089086 
   Gene37    Gene38    Gene39    Gene40    Gene41    Gene42    Gene43    Gene44    Gene45    Gene46    Gene47    Gene48 
0.3104534 0.4551549 0.3220008 0.2813286 0.2826027 0.2822504 0.2823330 0.3170673 0.3146173 0.3146793 0.2916540 0.2975003 
   Gene49    Gene50    Gene51    Gene52    Gene53    Gene54    Gene55    Gene56    Gene57    Gene58    Gene59    Gene60 
0.3538946 0.2907240 0.3199596 0.2816641 0.2814293 0.2996822 0.2812885 0.2896157 0.2955317 0.2815907 0.2919420 0.2849675 
   Gene61    Gene62    Gene63    Gene64    Gene65    Gene66    Gene67    Gene68    Gene69    Gene70    Gene71    Gene72 
0.3540805 0.3491713 0.2975019 0.2939325 0.2986943 0.3265466 0.3402343 0.3394927 0.2813283 0.2814440 0.3089669 0.3030850 
   Gene73    Gene74    Gene75    Gene76    Gene77    Gene78    Gene79    Gene80    Gene81    Gene82    Gene83    Gene84 
0.2859286 0.2813216 0.3475231 0.3334419 0.2949550 0.3108702 0.2959688 0.3295294 0.3413700 0.2946268 0.3029565 0.2920284 
   Gene85    Gene86    Gene87    Gene88    Gene89    Gene90    Gene91    Gene92    Gene93    Gene94    Gene95    Gene96 
0.2926205 0.2818046 0.3425116 0.2882936 0.2945459 0.3077919 0.2892134 0.2823787 0.3048049 0.2961408 0.4590012 0.2812784 
   Gene97    Gene98    Gene99   Gene100 
0.2846345 0.2819651 0.3137551 0.2856081 
> summary(fit$s2.post)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
 0.2335  0.2603  0.2997  0.3375  0.3655  0.7812 
> 
> y$E[1,1] <- NA
> y$E[1,3] <- NA
> fit <- lmFit(y,design)
> fit <- eBayes(fit,trend=TRUE)
> topTable(fit,coef=2)
           logFC     AveExpr         t      P.Value  adj.P.Val          B
Gene3   3.488703  1.03931081  4.604490 0.0007644061 0.07644061 -0.2333915
Gene2   3.729512  1.73488969  4.158038 0.0016033158 0.08016579 -0.9438583
Gene4   2.696676  1.74060725  2.898102 0.0145292666 0.44537707 -3.0530813
Gene33 -1.492317 -0.07525287 -2.784004 0.0178150826 0.44537707 -3.2456324
Gene5   2.387967  1.63066783  2.495395 0.0297982959 0.46902627 -3.7272957
Gene80 -1.839760 -0.32802306 -2.491115 0.0300256116 0.46902627 -3.7343584
Gene39  1.366141 -0.27360750  2.440729 0.0328318388 0.46902627 -3.8172597
Gene1   2.638272  1.47993643  2.227507 0.0530016060 0.58890673 -3.9537576
Gene95 -1.907074  1.26297763 -2.288870 0.0429197808 0.53649726 -4.0642439
Gene50  1.034777  0.01608433  2.063663 0.0635275235 0.60439978 -4.4204731
> fit$df.residual[1]
[1] 0
> fit$df.prior
[1] 8.971891
> fit$s2.prior
  [1] 0.7014084 0.9646561 0.4276287 0.9716476 0.8458852 0.2910492 0.3097052 0.3074225 0.2985517 0.2786374 0.3267121
 [12] 0.3316013 0.2766404 0.2932679 0.3154347 0.2869186 0.2761395 0.2799884 0.2795119 0.2946468 0.2794412 0.2761282
 [23] 0.3186442 0.2806092 0.4596465 0.2767847 0.2924541 0.2939204 0.2930568 0.3269177 0.3194905 0.2814293 0.2989389
 [34] 0.3483845 0.3062977 0.3110287 0.3127934 0.4418052 0.3254067 0.2761732 0.2780422 0.2773311 0.2776653 0.3201314
 [45] 0.3174515 0.3175199 0.2897731 0.2972785 0.3567262 0.2885556 0.3232426 0.2767207 0.2762915 0.3000062 0.2761306
 [56] 0.2870975 0.2947817 0.2766152 0.2901489 0.2813183 0.3568982 0.3724440 0.2972804 0.2927300 0.2987764 0.3301406
 [67] 0.3437962 0.3430762 0.2761729 0.2763094 0.3110958 0.3041715 0.2822004 0.2761654 0.3507694 0.3371214 0.2940441
 [78] 0.3132660 0.2953388 0.3331880 0.3448949 0.2946558 0.3040162 0.2902616 0.2910320 0.2769211 0.3459946 0.2859057
 [89] 0.2935193 0.3097398 0.2865663 0.2774968 0.3062327 0.2955576 0.5425422 0.2761214 0.2808585 0.2771484 0.3164981
[100] 0.2817725
> summary(fit$s2.post)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
 0.2296  0.2581  0.3003  0.3453  0.3652  0.9158 
> 
> ### eBayes with robust
> 
> fitr <- lmFit(y,design)
> fitr <- eBayes(fitr,robust=TRUE)
> summary(fitr$df.prior)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  6.717   9.244   9.244   9.194   9.244   9.244 
> topTable(fitr,coef=2)
           logFC     AveExpr         t      P.Value   adj.P.Val          B
Gene2   3.729512  1.73488969  7.108463 1.752774e-05 0.001752774  3.3517310
Gene3   3.488703  1.03931081  5.041209 3.526138e-04 0.017630688  0.4056329
Gene4   2.696676  1.74060725  4.697690 6.150508e-04 0.020501693 -0.1463315
Gene5   2.387967  1.63066783  3.451807 5.245019e-03 0.131125480 -2.2678836
Gene1   2.638272  1.47993643  3.317593 8.651142e-03 0.173022847 -2.4400000
Gene33 -1.492317 -0.07525287 -2.716431 1.970991e-02 0.297950865 -3.5553166
Gene95 -1.907074  1.26297763 -2.685067 2.085656e-02 0.297950865 -3.6094982
Gene80 -1.839760 -0.32802306 -2.535926 2.727440e-02 0.340929958 -3.8653107
Gene39  1.366141 -0.27360750  2.469570 3.071854e-02 0.341317083 -3.9779817
Gene50  1.034777  0.01608433  1.973040 7.357960e-02 0.632875126 -4.7877548
> fitr <- eBayes(fitr,trend=TRUE,robust=TRUE)
> summary(fitr$df.prior)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  7.809   8.972   8.972   8.949   8.972   8.972 
> topTable(fitr,coef=2)
           logFC     AveExpr         t      P.Value  adj.P.Val          B
Gene2   3.729512  1.73488969  4.754160 0.0005999064 0.05999064 -0.0218247
Gene3   3.488703  1.03931081  3.761219 0.0031618743 0.15809372 -1.6338257
Gene4   2.696676  1.74060725  3.292262 0.0071993347 0.23997782 -2.4295326
Gene33 -1.492317 -0.07525287 -3.063180 0.0108203134 0.27050784 -2.8211394
Gene50  1.034777  0.01608433  2.645717 0.0228036320 0.38815282 -3.5304767
Gene5   2.387967  1.63066783  2.633901 0.0232891695 0.38815282 -3.5503445
Gene1   2.638272  1.47993643  2.204116 0.0550613420 0.58959402 -4.0334169
Gene80 -1.839760 -0.32802306 -2.332729 0.0397331916 0.56761702 -4.0496640
Gene39  1.366141 -0.27360750  2.210665 0.0492211477 0.58959402 -4.2469578
Gene95 -1.907074  1.26297763 -2.106861 0.0589594023 0.58959402 -4.4117140
> 
> ### voom
> 
> y <- matrix(rpois(100*4,lambda=20),100,4)
> design <- cbind(Int=1,x=c(0,0,1,1))
> v <- voom(y,design)
> names(v)
[1] "E"       "weights" "design"  "targets"
> summary(v$E)
       V1              V2              V3              V4       
 Min.   :12.38   Min.   :12.32   Min.   :12.17   Min.   :12.08  
 1st Qu.:13.11   1st Qu.:13.05   1st Qu.:13.11   1st Qu.:13.03  
 Median :13.34   Median :13.28   Median :13.35   Median :13.35  
 Mean   :13.29   Mean   :13.29   Mean   :13.28   Mean   :13.28  
 3rd Qu.:13.48   3rd Qu.:13.54   3rd Qu.:13.48   3rd Qu.:13.50  
 Max.   :14.01   Max.   :13.95   Max.   :14.03   Max.   :14.05  
> summary(v$weights)
       V1               V2               V3               V4        
 Min.   : 7.729   Min.   : 7.729   Min.   : 7.729   Min.   : 7.729  
 1st Qu.:13.859   1st Qu.:15.067   1st Qu.:14.254   1st Qu.:13.592  
 Median :15.913   Median :16.621   Median :16.081   Median :16.028  
 Mean   :16.773   Mean   :18.525   Mean   :18.472   Mean   :17.112  
 3rd Qu.:18.214   3rd Qu.:20.002   3rd Qu.:18.475   3rd Qu.:18.398  
 Max.   :34.331   Max.   :34.331   Max.   :34.331   Max.   :34.331  
> 
> ### goana
> 
> EB <- c("133746","1339","134","1340","134083","134111","134147","134187","134218","134266",
+ "134353","134359","134391","134429","134430","1345","134510","134526","134549","1346",
+ "134637","1347","134701","134728","1348","134829","134860","134864","1349","134957",
+ "135","1350","1351","135112","135114","135138","135152","135154","1352","135228",
+ "135250","135293","135295","1353","135458","1355","1356","135644","135656","1357",
+ "1358","135892","1359","135924","135935","135941","135946","135948","136","1360",
+ "136051","1361","1362","136227","136242","136259","1363","136306","136319","136332",
+ "136371","1364","1365","136541","1366","136647","1368","136853","1369","136991",
+ "1370","137075","1371","137209","1373","137362","1374","137492","1375","1376",
+ "137682","137695","137735","1378","137814","137868","137872","137886","137902","137964")
> go <- goana(fit,FDR=0.8,geneid=EB)
> topGO(go,number=10,truncate.term=30)
                                     Term Ont  N Up Down        P.Up      P.Down
GO:0032502          developmental process  BP 26  5    7 0.785697935 0.002720775
GO:0070062          extracellular exosome  CC  8  0    4 1.000000000 0.003047199
GO:0065010 extracellular membrane-boun...  CC  8  0    4 1.000000000 0.003047199
GO:0043230        extracellular organelle  CC  8  0    4 1.000000000 0.003047199
GO:1903561          extracellular vesicle  CC  8  0    4 1.000000000 0.003047199
GO:0006915              apoptotic process  BP  5  4    1 0.009503355 0.416247633
GO:0008219                     cell death  BP  5  4    1 0.009503355 0.416247633
GO:0012501          programmed cell death  BP  5  4    1 0.009503355 0.416247633
GO:0042981 regulation of apoptotic pro...  BP  5  4    1 0.009503355 0.416247633
GO:0043067 regulation of programmed ce...  BP  5  4    1 0.009503355 0.416247633
> topGO(go,number=10,truncate.term=30,sort="down")
                                     Term Ont  N Up Down      P.Up      P.Down
GO:0032502          developmental process  BP 26  5    7 0.7856979 0.002720775
GO:0070062          extracellular exosome  CC  8  0    4 1.0000000 0.003047199
GO:0065010 extracellular membrane-boun...  CC  8  0    4 1.0000000 0.003047199
GO:0043230        extracellular organelle  CC  8  0    4 1.0000000 0.003047199
GO:1903561          extracellular vesicle  CC  8  0    4 1.0000000 0.003047199
GO:0016485             protein processing  BP  6  0    3 1.0000000 0.012551076
GO:0043009 chordate embryonic developm...  BP  3  0    2 1.0000000 0.025788497
GO:0072359 circulatory system developm...  BP  3  0    2 1.0000000 0.025788497
GO:0009790             embryo development  BP  3  0    2 1.0000000 0.025788497
GO:0009792 embryo development ending i...  BP  3  0    2 1.0000000 0.025788497
> 
> proc.time()
   user  system elapsed 
  3.051   0.292   3.346 

limma.Rcheck/tests/limma-Tests.Rout.save


R version 4.4.2 (2024-10-31 ucrt) -- "Pile of Leaves"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64

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(limma)
> options(warnPartialMatchArgs=TRUE,warnPartialMatchAttr=TRUE,warnPartialMatchDollar=TRUE,width=120)
> 
> set.seed(0); u <- runif(100)
> 
> ### strsplit2
> 
> x <- c("ab;cd;efg","abc;def","z","")
> strsplit2(x,split=";")
     [,1]  [,2]  [,3] 
[1,] "ab"  "cd"  "efg"
[2,] "abc" "def" ""   
[3,] "z"   ""    ""   
[4,] ""    ""    ""   
> 
> ### removeext
> 
> removeExt(c("slide1.spot","slide.2.spot"))
[1] "slide1"  "slide.2"
> removeExt(c("slide1.spot","slide"))
[1] "slide1.spot" "slide"      
> 
> ### printorder
> 
> printorder(list(ngrid.r=4,ngrid.c=4,nspot.r=8,nspot.c=6),ndups=2,start="topright",npins=4)
$printorder
  [1]   6   5   4   3   2   1  12  11  10   9   8   7  18  17  16  15  14  13  24  23  22  21  20  19  30  29  28  27
 [29]  26  25  36  35  34  33  32  31  42  41  40  39  38  37  48  47  46  45  44  43   6   5   4   3   2   1  12  11
 [57]  10   9   8   7  18  17  16  15  14  13  24  23  22  21  20  19  30  29  28  27  26  25  36  35  34  33  32  31
 [85]  42  41  40  39  38  37  48  47  46  45  44  43   6   5   4   3   2   1  12  11  10   9   8   7  18  17  16  15
[113]  14  13  24  23  22  21  20  19  30  29  28  27  26  25  36  35  34  33  32  31  42  41  40  39  38  37  48  47
[141]  46  45  44  43   6   5   4   3   2   1  12  11  10   9   8   7  18  17  16  15  14  13  24  23  22  21  20  19
[169]  30  29  28  27  26  25  36  35  34  33  32  31  42  41  40  39  38  37  48  47  46  45  44  43  54  53  52  51
[197]  50  49  60  59  58  57  56  55  66  65  64  63  62  61  72  71  70  69  68  67  78  77  76  75  74  73  84  83
[225]  82  81  80  79  90  89  88  87  86  85  96  95  94  93  92  91  54  53  52  51  50  49  60  59  58  57  56  55
[253]  66  65  64  63  62  61  72  71  70  69  68  67  78  77  76  75  74  73  84  83  82  81  80  79  90  89  88  87
[281]  86  85  96  95  94  93  92  91  54  53  52  51  50  49  60  59  58  57  56  55  66  65  64  63  62  61  72  71
[309]  70  69  68  67  78  77  76  75  74  73  84  83  82  81  80  79  90  89  88  87  86  85  96  95  94  93  92  91
[337]  54  53  52  51  50  49  60  59  58  57  56  55  66  65  64  63  62  61  72  71  70  69  68  67  78  77  76  75
[365]  74  73  84  83  82  81  80  79  90  89  88  87  86  85  96  95  94  93  92  91 102 101 100  99  98  97 108 107
[393] 106 105 104 103 114 113 112 111 110 109 120 119 118 117 116 115 126 125 124 123 122 121 132 131 130 129 128 127
[421] 138 137 136 135 134 133 144 143 142 141 140 139 102 101 100  99  98  97 108 107 106 105 104 103 114 113 112 111
[449] 110 109 120 119 118 117 116 115 126 125 124 123 122 121 132 131 130 129 128 127 138 137 136 135 134 133 144 143
[477] 142 141 140 139 102 101 100  99  98  97 108 107 106 105 104 103 114 113 112 111 110 109 120 119 118 117 116 115
[505] 126 125 124 123 122 121 132 131 130 129 128 127 138 137 136 135 134 133 144 143 142 141 140 139 102 101 100  99
[533]  98  97 108 107 106 105 104 103 114 113 112 111 110 109 120 119 118 117 116 115 126 125 124 123 122 121 132 131
[561] 130 129 128 127 138 137 136 135 134 133 144 143 142 141 140 139 150 149 148 147 146 145 156 155 154 153 152 151
[589] 162 161 160 159 158 157 168 167 166 165 164 163 174 173 172 171 170 169 180 179 178 177 176 175 186 185 184 183
[617] 182 181 192 191 190 189 188 187 150 149 148 147 146 145 156 155 154 153 152 151 162 161 160 159 158 157 168 167
[645] 166 165 164 163 174 173 172 171 170 169 180 179 178 177 176 175 186 185 184 183 182 181 192 191 190 189 188 187
[673] 150 149 148 147 146 145 156 155 154 153 152 151 162 161 160 159 158 157 168 167 166 165 164 163 174 173 172 171
[701] 170 169 180 179 178 177 176 175 186 185 184 183 182 181 192 191 190 189 188 187 150 149 148 147 146 145 156 155
[729] 154 153 152 151 162 161 160 159 158 157 168 167 166 165 164 163 174 173 172 171 170 169 180 179 178 177 176 175
[757] 186 185 184 183 182 181 192 191 190 189 188 187

$plate
  [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
 [58] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[115] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[172] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[229] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[286] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[343] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[400] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[457] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[514] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[571] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[628] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[685] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[742] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

$plate.r
  [1]  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4
 [39]  4  4  4  4  4  4  4  4  4  4  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3
 [77]  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2
[115]  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  1  1  1  1  1  1  1  1
[153]  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1
[191]  1  1  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8
[229]  8  8  8  8  8  8  8  8  8  8  8  8  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7
[267]  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6
[305]  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  5  5  5  5  5  5
[343]  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5
[381]  5  5  5  5 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12
[419] 12 12 12 12 12 12 12 12 12 12 12 12 12 12 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
[457] 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 10 10 10 10 10 10 10 10 10 10 10 10 10 10
[495] 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10  9  9  9  9
[533]  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9
[571]  9  9  9  9  9  9 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
[609] 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15
[647] 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 14 14 14 14 14 14 14 14 14 14 14 14
[685] 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 13 13
[723] 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13
[761] 13 13 13 13 13 13 13 13

$plate.c
  [1]  3  3  2  2  1  1  6  6  5  5  4  4  9  9  8  8  7  7 12 12 11 11 10 10 15 15 14 14 13 13 18 18 17 17 16 16 21 21
 [39] 20 20 19 19 24 24 23 23 22 22  3  3  2  2  1  1  6  6  5  5  4  4  9  9  8  8  7  7 12 12 11 11 10 10 15 15 14 14
 [77] 13 13 18 18 17 17 16 16 21 21 20 20 19 19 24 24 23 23 22 22  3  3  2  2  1  1  6  6  5  5  4  4  9  9  8  8  7  7
[115] 12 12 11 11 10 10 15 15 14 14 13 13 18 18 17 17 16 16 21 21 20 20 19 19 24 24 23 23 22 22  3  3  2  2  1  1  6  6
[153]  5  5  4  4  9  9  8  8  7  7 12 12 11 11 10 10 15 15 14 14 13 13 18 18 17 17 16 16 21 21 20 20 19 19 24 24 23 23
[191] 22 22  3  3  2  2  1  1  6  6  5  5  4  4  9  9  8  8  7  7 12 12 11 11 10 10 15 15 14 14 13 13 18 18 17 17 16 16
[229] 21 21 20 20 19 19 24 24 23 23 22 22  3  3  2  2  1  1  6  6  5  5  4  4  9  9  8  8  7  7 12 12 11 11 10 10 15 15
[267] 14 14 13 13 18 18 17 17 16 16 21 21 20 20 19 19 24 24 23 23 22 22  3  3  2  2  1  1  6  6  5  5  4  4  9  9  8  8
[305]  7  7 12 12 11 11 10 10 15 15 14 14 13 13 18 18 17 17 16 16 21 21 20 20 19 19 24 24 23 23 22 22  3  3  2  2  1  1
[343]  6  6  5  5  4  4  9  9  8  8  7  7 12 12 11 11 10 10 15 15 14 14 13 13 18 18 17 17 16 16 21 21 20 20 19 19 24 24
[381] 23 23 22 22  3  3  2  2  1  1  6  6  5  5  4  4  9  9  8  8  7  7 12 12 11 11 10 10 15 15 14 14 13 13 18 18 17 17
[419] 16 16 21 21 20 20 19 19 24 24 23 23 22 22  3  3  2  2  1  1  6  6  5  5  4  4  9  9  8  8  7  7 12 12 11 11 10 10
[457] 15 15 14 14 13 13 18 18 17 17 16 16 21 21 20 20 19 19 24 24 23 23 22 22  3  3  2  2  1  1  6  6  5  5  4  4  9  9
[495]  8  8  7  7 12 12 11 11 10 10 15 15 14 14 13 13 18 18 17 17 16 16 21 21 20 20 19 19 24 24 23 23 22 22  3  3  2  2
[533]  1  1  6  6  5  5  4  4  9  9  8  8  7  7 12 12 11 11 10 10 15 15 14 14 13 13 18 18 17 17 16 16 21 21 20 20 19 19
[571] 24 24 23 23 22 22  3  3  2  2  1  1  6  6  5  5  4  4  9  9  8  8  7  7 12 12 11 11 10 10 15 15 14 14 13 13 18 18
[609] 17 17 16 16 21 21 20 20 19 19 24 24 23 23 22 22  3  3  2  2  1  1  6  6  5  5  4  4  9  9  8  8  7  7 12 12 11 11
[647] 10 10 15 15 14 14 13 13 18 18 17 17 16 16 21 21 20 20 19 19 24 24 23 23 22 22  3  3  2  2  1  1  6  6  5  5  4  4
[685]  9  9  8  8  7  7 12 12 11 11 10 10 15 15 14 14 13 13 18 18 17 17 16 16 21 21 20 20 19 19 24 24 23 23 22 22  3  3
[723]  2  2  1  1  6  6  5  5  4  4  9  9  8  8  7  7 12 12 11 11 10 10 15 15 14 14 13 13 18 18 17 17 16 16 21 21 20 20
[761] 19 19 24 24 23 23 22 22

$plateposition
  [1] "p1D03" "p1D03" "p1D02" "p1D02" "p1D01" "p1D01" "p1D06" "p1D06" "p1D05" "p1D05" "p1D04" "p1D04" "p1D09" "p1D09"
 [15] "p1D08" "p1D08" "p1D07" "p1D07" "p1D12" "p1D12" "p1D11" "p1D11" "p1D10" "p1D10" "p1D15" "p1D15" "p1D14" "p1D14"
 [29] "p1D13" "p1D13" "p1D18" "p1D18" "p1D17" "p1D17" "p1D16" "p1D16" "p1D21" "p1D21" "p1D20" "p1D20" "p1D19" "p1D19"
 [43] "p1D24" "p1D24" "p1D23" "p1D23" "p1D22" "p1D22" "p1C03" "p1C03" "p1C02" "p1C02" "p1C01" "p1C01" "p1C06" "p1C06"
 [57] "p1C05" "p1C05" "p1C04" "p1C04" "p1C09" "p1C09" "p1C08" "p1C08" "p1C07" "p1C07" "p1C12" "p1C12" "p1C11" "p1C11"
 [71] "p1C10" "p1C10" "p1C15" "p1C15" "p1C14" "p1C14" "p1C13" "p1C13" "p1C18" "p1C18" "p1C17" "p1C17" "p1C16" "p1C16"
 [85] "p1C21" "p1C21" "p1C20" "p1C20" "p1C19" "p1C19" "p1C24" "p1C24" "p1C23" "p1C23" "p1C22" "p1C22" "p1B03" "p1B03"
 [99] "p1B02" "p1B02" "p1B01" "p1B01" "p1B06" "p1B06" "p1B05" "p1B05" "p1B04" "p1B04" "p1B09" "p1B09" "p1B08" "p1B08"
[113] "p1B07" "p1B07" "p1B12" "p1B12" "p1B11" "p1B11" "p1B10" "p1B10" "p1B15" "p1B15" "p1B14" "p1B14" "p1B13" "p1B13"
[127] "p1B18" "p1B18" "p1B17" "p1B17" "p1B16" "p1B16" "p1B21" "p1B21" "p1B20" "p1B20" "p1B19" "p1B19" "p1B24" "p1B24"
[141] "p1B23" "p1B23" "p1B22" "p1B22" "p1A03" "p1A03" "p1A02" "p1A02" "p1A01" "p1A01" "p1A06" "p1A06" "p1A05" "p1A05"
[155] "p1A04" "p1A04" "p1A09" "p1A09" "p1A08" "p1A08" "p1A07" "p1A07" "p1A12" "p1A12" "p1A11" "p1A11" "p1A10" "p1A10"
[169] "p1A15" "p1A15" "p1A14" "p1A14" "p1A13" "p1A13" "p1A18" "p1A18" "p1A17" "p1A17" "p1A16" "p1A16" "p1A21" "p1A21"
[183] "p1A20" "p1A20" "p1A19" "p1A19" "p1A24" "p1A24" "p1A23" "p1A23" "p1A22" "p1A22" "p1H03" "p1H03" "p1H02" "p1H02"
[197] "p1H01" "p1H01" "p1H06" "p1H06" "p1H05" "p1H05" "p1H04" "p1H04" "p1H09" "p1H09" "p1H08" "p1H08" "p1H07" "p1H07"
[211] "p1H12" "p1H12" "p1H11" "p1H11" "p1H10" "p1H10" "p1H15" "p1H15" "p1H14" "p1H14" "p1H13" "p1H13" "p1H18" "p1H18"
[225] "p1H17" "p1H17" "p1H16" "p1H16" "p1H21" "p1H21" "p1H20" "p1H20" "p1H19" "p1H19" "p1H24" "p1H24" "p1H23" "p1H23"
[239] "p1H22" "p1H22" "p1G03" "p1G03" "p1G02" "p1G02" "p1G01" "p1G01" "p1G06" "p1G06" "p1G05" "p1G05" "p1G04" "p1G04"
[253] "p1G09" "p1G09" "p1G08" "p1G08" "p1G07" "p1G07" "p1G12" "p1G12" "p1G11" "p1G11" "p1G10" "p1G10" "p1G15" "p1G15"
[267] "p1G14" "p1G14" "p1G13" "p1G13" "p1G18" "p1G18" "p1G17" "p1G17" "p1G16" "p1G16" "p1G21" "p1G21" "p1G20" "p1G20"
[281] "p1G19" "p1G19" "p1G24" "p1G24" "p1G23" "p1G23" "p1G22" "p1G22" "p1F03" "p1F03" "p1F02" "p1F02" "p1F01" "p1F01"
[295] "p1F06" "p1F06" "p1F05" "p1F05" "p1F04" "p1F04" "p1F09" "p1F09" "p1F08" "p1F08" "p1F07" "p1F07" "p1F12" "p1F12"
[309] "p1F11" "p1F11" "p1F10" "p1F10" "p1F15" "p1F15" "p1F14" "p1F14" "p1F13" "p1F13" "p1F18" "p1F18" "p1F17" "p1F17"
[323] "p1F16" "p1F16" "p1F21" "p1F21" "p1F20" "p1F20" "p1F19" "p1F19" "p1F24" "p1F24" "p1F23" "p1F23" "p1F22" "p1F22"
[337] "p1E03" "p1E03" "p1E02" "p1E02" "p1E01" "p1E01" "p1E06" "p1E06" "p1E05" "p1E05" "p1E04" "p1E04" "p1E09" "p1E09"
[351] "p1E08" "p1E08" "p1E07" "p1E07" "p1E12" "p1E12" "p1E11" "p1E11" "p1E10" "p1E10" "p1E15" "p1E15" "p1E14" "p1E14"
[365] "p1E13" "p1E13" "p1E18" "p1E18" "p1E17" "p1E17" "p1E16" "p1E16" "p1E21" "p1E21" "p1E20" "p1E20" "p1E19" "p1E19"
[379] "p1E24" "p1E24" "p1E23" "p1E23" "p1E22" "p1E22" "p1L03" "p1L03" "p1L02" "p1L02" "p1L01" "p1L01" "p1L06" "p1L06"
[393] "p1L05" "p1L05" "p1L04" "p1L04" "p1L09" "p1L09" "p1L08" "p1L08" "p1L07" "p1L07" "p1L12" "p1L12" "p1L11" "p1L11"
[407] "p1L10" "p1L10" "p1L15" "p1L15" "p1L14" "p1L14" "p1L13" "p1L13" "p1L18" "p1L18" "p1L17" "p1L17" "p1L16" "p1L16"
[421] "p1L21" "p1L21" "p1L20" "p1L20" "p1L19" "p1L19" "p1L24" "p1L24" "p1L23" "p1L23" "p1L22" "p1L22" "p1K03" "p1K03"
[435] "p1K02" "p1K02" "p1K01" "p1K01" "p1K06" "p1K06" "p1K05" "p1K05" "p1K04" "p1K04" "p1K09" "p1K09" "p1K08" "p1K08"
[449] "p1K07" "p1K07" "p1K12" "p1K12" "p1K11" "p1K11" "p1K10" "p1K10" "p1K15" "p1K15" "p1K14" "p1K14" "p1K13" "p1K13"
[463] "p1K18" "p1K18" "p1K17" "p1K17" "p1K16" "p1K16" "p1K21" "p1K21" "p1K20" "p1K20" "p1K19" "p1K19" "p1K24" "p1K24"
[477] "p1K23" "p1K23" "p1K22" "p1K22" "p1J03" "p1J03" "p1J02" "p1J02" "p1J01" "p1J01" "p1J06" "p1J06" "p1J05" "p1J05"
[491] "p1J04" "p1J04" "p1J09" "p1J09" "p1J08" "p1J08" "p1J07" "p1J07" "p1J12" "p1J12" "p1J11" "p1J11" "p1J10" "p1J10"
[505] "p1J15" "p1J15" "p1J14" "p1J14" "p1J13" "p1J13" "p1J18" "p1J18" "p1J17" "p1J17" "p1J16" "p1J16" "p1J21" "p1J21"
[519] "p1J20" "p1J20" "p1J19" "p1J19" "p1J24" "p1J24" "p1J23" "p1J23" "p1J22" "p1J22" "p1I03" "p1I03" "p1I02" "p1I02"
[533] "p1I01" "p1I01" "p1I06" "p1I06" "p1I05" "p1I05" "p1I04" "p1I04" "p1I09" "p1I09" "p1I08" "p1I08" "p1I07" "p1I07"
[547] "p1I12" "p1I12" "p1I11" "p1I11" "p1I10" "p1I10" "p1I15" "p1I15" "p1I14" "p1I14" "p1I13" "p1I13" "p1I18" "p1I18"
[561] "p1I17" "p1I17" "p1I16" "p1I16" "p1I21" "p1I21" "p1I20" "p1I20" "p1I19" "p1I19" "p1I24" "p1I24" "p1I23" "p1I23"
[575] "p1I22" "p1I22" "p1P03" "p1P03" "p1P02" "p1P02" "p1P01" "p1P01" "p1P06" "p1P06" "p1P05" "p1P05" "p1P04" "p1P04"
[589] "p1P09" "p1P09" "p1P08" "p1P08" "p1P07" "p1P07" "p1P12" "p1P12" "p1P11" "p1P11" "p1P10" "p1P10" "p1P15" "p1P15"
[603] "p1P14" "p1P14" "p1P13" "p1P13" "p1P18" "p1P18" "p1P17" "p1P17" "p1P16" "p1P16" "p1P21" "p1P21" "p1P20" "p1P20"
[617] "p1P19" "p1P19" "p1P24" "p1P24" "p1P23" "p1P23" "p1P22" "p1P22" "p1O03" "p1O03" "p1O02" "p1O02" "p1O01" "p1O01"
[631] "p1O06" "p1O06" "p1O05" "p1O05" "p1O04" "p1O04" "p1O09" "p1O09" "p1O08" "p1O08" "p1O07" "p1O07" "p1O12" "p1O12"
[645] "p1O11" "p1O11" "p1O10" "p1O10" "p1O15" "p1O15" "p1O14" "p1O14" "p1O13" "p1O13" "p1O18" "p1O18" "p1O17" "p1O17"
[659] "p1O16" "p1O16" "p1O21" "p1O21" "p1O20" "p1O20" "p1O19" "p1O19" "p1O24" "p1O24" "p1O23" "p1O23" "p1O22" "p1O22"
[673] "p1N03" "p1N03" "p1N02" "p1N02" "p1N01" "p1N01" "p1N06" "p1N06" "p1N05" "p1N05" "p1N04" "p1N04" "p1N09" "p1N09"
[687] "p1N08" "p1N08" "p1N07" "p1N07" "p1N12" "p1N12" "p1N11" "p1N11" "p1N10" "p1N10" "p1N15" "p1N15" "p1N14" "p1N14"
[701] "p1N13" "p1N13" "p1N18" "p1N18" "p1N17" "p1N17" "p1N16" "p1N16" "p1N21" "p1N21" "p1N20" "p1N20" "p1N19" "p1N19"
[715] "p1N24" "p1N24" "p1N23" "p1N23" "p1N22" "p1N22" "p1M03" "p1M03" "p1M02" "p1M02" "p1M01" "p1M01" "p1M06" "p1M06"
[729] "p1M05" "p1M05" "p1M04" "p1M04" "p1M09" "p1M09" "p1M08" "p1M08" "p1M07" "p1M07" "p1M12" "p1M12" "p1M11" "p1M11"
[743] "p1M10" "p1M10" "p1M15" "p1M15" "p1M14" "p1M14" "p1M13" "p1M13" "p1M18" "p1M18" "p1M17" "p1M17" "p1M16" "p1M16"
[757] "p1M21" "p1M21" "p1M20" "p1M20" "p1M19" "p1M19" "p1M24" "p1M24" "p1M23" "p1M23" "p1M22" "p1M22"

> printorder(list(ngrid.r=4,ngrid.c=4,nspot.r=8,nspot.c=6))
$printorder
  [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
 [39] 39 40 41 42 43 44 45 46 47 48  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
 [77] 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18
[115] 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48  1  2  3  4  5  6  7  8
[153]  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
[191] 47 48  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
[229] 37 38 39 40 41 42 43 44 45 46 47 48  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
[267] 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16
[305] 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48  1  2  3  4  5  6
[343]  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
[381] 45 46 47 48  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
[419] 35 36 37 38 39 40 41 42 43 44 45 46 47 48  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
[457] 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48  1  2  3  4  5  6  7  8  9 10 11 12 13 14
[495] 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48  1  2  3  4
[533]  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
[571] 43 44 45 46 47 48  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
[609] 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22
[647] 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48  1  2  3  4  5  6  7  8  9 10 11 12
[685] 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48  1  2
[723]  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
[761] 41 42 43 44 45 46 47 48

$plate
  [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1
 [58] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[115] 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2
[172] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2
[229] 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
[286] 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1
[343] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[400] 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[457] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2
[514] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
[571] 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1
[628] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1
[685] 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[742] 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

$plate.r
  [1]  4  4  4  4  4  4  8  8  8  8  8  8 12 12 12 12 12 12 16 16 16 16 16 16  4  4  4  4  4  4  8  8  8  8  8  8 12 12
 [39] 12 12 12 12 16 16 16 16 16 16  3  3  3  3  3  3  7  7  7  7  7  7 11 11 11 11 11 11 15 15 15 15 15 15  3  3  3  3
 [77]  3  3  7  7  7  7  7  7 11 11 11 11 11 11 15 15 15 15 15 15  2  2  2  2  2  2  6  6  6  6  6  6 10 10 10 10 10 10
[115] 14 14 14 14 14 14  2  2  2  2  2  2  6  6  6  6  6  6 10 10 10 10 10 10 14 14 14 14 14 14  1  1  1  1  1  1  5  5
[153]  5  5  5  5  9  9  9  9  9  9 13 13 13 13 13 13  1  1  1  1  1  1  5  5  5  5  5  5  9  9  9  9  9  9 13 13 13 13
[191] 13 13  4  4  4  4  4  4  8  8  8  8  8  8 12 12 12 12 12 12 16 16 16 16 16 16  4  4  4  4  4  4  8  8  8  8  8  8
[229] 12 12 12 12 12 12 16 16 16 16 16 16  3  3  3  3  3  3  7  7  7  7  7  7 11 11 11 11 11 11 15 15 15 15 15 15  3  3
[267]  3  3  3  3  7  7  7  7  7  7 11 11 11 11 11 11 15 15 15 15 15 15  2  2  2  2  2  2  6  6  6  6  6  6 10 10 10 10
[305] 10 10 14 14 14 14 14 14  2  2  2  2  2  2  6  6  6  6  6  6 10 10 10 10 10 10 14 14 14 14 14 14  1  1  1  1  1  1
[343]  5  5  5  5  5  5  9  9  9  9  9  9 13 13 13 13 13 13  1  1  1  1  1  1  5  5  5  5  5  5  9  9  9  9  9  9 13 13
[381] 13 13 13 13  4  4  4  4  4  4  8  8  8  8  8  8 12 12 12 12 12 12 16 16 16 16 16 16  4  4  4  4  4  4  8  8  8  8
[419]  8  8 12 12 12 12 12 12 16 16 16 16 16 16  3  3  3  3  3  3  7  7  7  7  7  7 11 11 11 11 11 11 15 15 15 15 15 15
[457]  3  3  3  3  3  3  7  7  7  7  7  7 11 11 11 11 11 11 15 15 15 15 15 15  2  2  2  2  2  2  6  6  6  6  6  6 10 10
[495] 10 10 10 10 14 14 14 14 14 14  2  2  2  2  2  2  6  6  6  6  6  6 10 10 10 10 10 10 14 14 14 14 14 14  1  1  1  1
[533]  1  1  5  5  5  5  5  5  9  9  9  9  9  9 13 13 13 13 13 13  1  1  1  1  1  1  5  5  5  5  5  5  9  9  9  9  9  9
[571] 13 13 13 13 13 13  4  4  4  4  4  4  8  8  8  8  8  8 12 12 12 12 12 12 16 16 16 16 16 16  4  4  4  4  4  4  8  8
[609]  8  8  8  8 12 12 12 12 12 12 16 16 16 16 16 16  3  3  3  3  3  3  7  7  7  7  7  7 11 11 11 11 11 11 15 15 15 15
[647] 15 15  3  3  3  3  3  3  7  7  7  7  7  7 11 11 11 11 11 11 15 15 15 15 15 15  2  2  2  2  2  2  6  6  6  6  6  6
[685] 10 10 10 10 10 10 14 14 14 14 14 14  2  2  2  2  2  2  6  6  6  6  6  6 10 10 10 10 10 10 14 14 14 14 14 14  1  1
[723]  1  1  1  1  5  5  5  5  5  5  9  9  9  9  9  9 13 13 13 13 13 13  1  1  1  1  1  1  5  5  5  5  5  5  9  9  9  9
[761]  9  9 13 13 13 13 13 13

$plate.c
  [1]  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5
 [39]  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13
 [77] 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21
[115]  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5
[153]  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13 17 21  1  5  9 13
[191] 17 21  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22
[229]  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6
[267] 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14
[305] 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22
[343]  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6 10 14 18 22  2  6
[381] 10 14 18 22  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15
[419] 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23
[457]  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7
[495] 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15
[533] 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23  3  7 11 15 19 23
[571]  3  7 11 15 19 23  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8
[609] 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16
[647] 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24
[685]  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8
[723] 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16 20 24  4  8 12 16
[761] 20 24  4  8 12 16 20 24

$plateposition
  [1] "p1D01" "p1D05" "p1D09" "p1D13" "p1D17" "p1D21" "p1H01" "p1H05" "p1H09" "p1H13" "p1H17" "p1H21" "p1L01" "p1L05"
 [15] "p1L09" "p1L13" "p1L17" "p1L21" "p1P01" "p1P05" "p1P09" "p1P13" "p1P17" "p1P21" "p2D01" "p2D05" "p2D09" "p2D13"
 [29] "p2D17" "p2D21" "p2H01" "p2H05" "p2H09" "p2H13" "p2H17" "p2H21" "p2L01" "p2L05" "p2L09" "p2L13" "p2L17" "p2L21"
 [43] "p2P01" "p2P05" "p2P09" "p2P13" "p2P17" "p2P21" "p1C01" "p1C05" "p1C09" "p1C13" "p1C17" "p1C21" "p1G01" "p1G05"
 [57] "p1G09" "p1G13" "p1G17" "p1G21" "p1K01" "p1K05" "p1K09" "p1K13" "p1K17" "p1K21" "p1O01" "p1O05" "p1O09" "p1O13"
 [71] "p1O17" "p1O21" "p2C01" "p2C05" "p2C09" "p2C13" "p2C17" "p2C21" "p2G01" "p2G05" "p2G09" "p2G13" "p2G17" "p2G21"
 [85] "p2K01" "p2K05" "p2K09" "p2K13" "p2K17" "p2K21" "p2O01" "p2O05" "p2O09" "p2O13" "p2O17" "p2O21" "p1B01" "p1B05"
 [99] "p1B09" "p1B13" "p1B17" "p1B21" "p1F01" "p1F05" "p1F09" "p1F13" "p1F17" "p1F21" "p1J01" "p1J05" "p1J09" "p1J13"
[113] "p1J17" "p1J21" "p1N01" "p1N05" "p1N09" "p1N13" "p1N17" "p1N21" "p2B01" "p2B05" "p2B09" "p2B13" "p2B17" "p2B21"
[127] "p2F01" "p2F05" "p2F09" "p2F13" "p2F17" "p2F21" "p2J01" "p2J05" "p2J09" "p2J13" "p2J17" "p2J21" "p2N01" "p2N05"
[141] "p2N09" "p2N13" "p2N17" "p2N21" "p1A01" "p1A05" "p1A09" "p1A13" "p1A17" "p1A21" "p1E01" "p1E05" "p1E09" "p1E13"
[155] "p1E17" "p1E21" "p1I01" "p1I05" "p1I09" "p1I13" "p1I17" "p1I21" "p1M01" "p1M05" "p1M09" "p1M13" "p1M17" "p1M21"
[169] "p2A01" "p2A05" "p2A09" "p2A13" "p2A17" "p2A21" "p2E01" "p2E05" "p2E09" "p2E13" "p2E17" "p2E21" "p2I01" "p2I05"
[183] "p2I09" "p2I13" "p2I17" "p2I21" "p2M01" "p2M05" "p2M09" "p2M13" "p2M17" "p2M21" "p1D02" "p1D06" "p1D10" "p1D14"
[197] "p1D18" "p1D22" "p1H02" "p1H06" "p1H10" "p1H14" "p1H18" "p1H22" "p1L02" "p1L06" "p1L10" "p1L14" "p1L18" "p1L22"
[211] "p1P02" "p1P06" "p1P10" "p1P14" "p1P18" "p1P22" "p2D02" "p2D06" "p2D10" "p2D14" "p2D18" "p2D22" "p2H02" "p2H06"
[225] "p2H10" "p2H14" "p2H18" "p2H22" "p2L02" "p2L06" "p2L10" "p2L14" "p2L18" "p2L22" "p2P02" "p2P06" "p2P10" "p2P14"
[239] "p2P18" "p2P22" "p1C02" "p1C06" "p1C10" "p1C14" "p1C18" "p1C22" "p1G02" "p1G06" "p1G10" "p1G14" "p1G18" "p1G22"
[253] "p1K02" "p1K06" "p1K10" "p1K14" "p1K18" "p1K22" "p1O02" "p1O06" "p1O10" "p1O14" "p1O18" "p1O22" "p2C02" "p2C06"
[267] "p2C10" "p2C14" "p2C18" "p2C22" "p2G02" "p2G06" "p2G10" "p2G14" "p2G18" "p2G22" "p2K02" "p2K06" "p2K10" "p2K14"
[281] "p2K18" "p2K22" "p2O02" "p2O06" "p2O10" "p2O14" "p2O18" "p2O22" "p1B02" "p1B06" "p1B10" "p1B14" "p1B18" "p1B22"
[295] "p1F02" "p1F06" "p1F10" "p1F14" "p1F18" "p1F22" "p1J02" "p1J06" "p1J10" "p1J14" "p1J18" "p1J22" "p1N02" "p1N06"
[309] "p1N10" "p1N14" "p1N18" "p1N22" "p2B02" "p2B06" "p2B10" "p2B14" "p2B18" "p2B22" "p2F02" "p2F06" "p2F10" "p2F14"
[323] "p2F18" "p2F22" "p2J02" "p2J06" "p2J10" "p2J14" "p2J18" "p2J22" "p2N02" "p2N06" "p2N10" "p2N14" "p2N18" "p2N22"
[337] "p1A02" "p1A06" "p1A10" "p1A14" "p1A18" "p1A22" "p1E02" "p1E06" "p1E10" "p1E14" "p1E18" "p1E22" "p1I02" "p1I06"
[351] "p1I10" "p1I14" "p1I18" "p1I22" "p1M02" "p1M06" "p1M10" "p1M14" "p1M18" "p1M22" "p2A02" "p2A06" "p2A10" "p2A14"
[365] "p2A18" "p2A22" "p2E02" "p2E06" "p2E10" "p2E14" "p2E18" "p2E22" "p2I02" "p2I06" "p2I10" "p2I14" "p2I18" "p2I22"
[379] "p2M02" "p2M06" "p2M10" "p2M14" "p2M18" "p2M22" "p1D03" "p1D07" "p1D11" "p1D15" "p1D19" "p1D23" "p1H03" "p1H07"
[393] "p1H11" "p1H15" "p1H19" "p1H23" "p1L03" "p1L07" "p1L11" "p1L15" "p1L19" "p1L23" "p1P03" "p1P07" "p1P11" "p1P15"
[407] "p1P19" "p1P23" "p2D03" "p2D07" "p2D11" "p2D15" "p2D19" "p2D23" "p2H03" "p2H07" "p2H11" "p2H15" "p2H19" "p2H23"
[421] "p2L03" "p2L07" "p2L11" "p2L15" "p2L19" "p2L23" "p2P03" "p2P07" "p2P11" "p2P15" "p2P19" "p2P23" "p1C03" "p1C07"
[435] "p1C11" "p1C15" "p1C19" "p1C23" "p1G03" "p1G07" "p1G11" "p1G15" "p1G19" "p1G23" "p1K03" "p1K07" "p1K11" "p1K15"
[449] "p1K19" "p1K23" "p1O03" "p1O07" "p1O11" "p1O15" "p1O19" "p1O23" "p2C03" "p2C07" "p2C11" "p2C15" "p2C19" "p2C23"
[463] "p2G03" "p2G07" "p2G11" "p2G15" "p2G19" "p2G23" "p2K03" "p2K07" "p2K11" "p2K15" "p2K19" "p2K23" "p2O03" "p2O07"
[477] "p2O11" "p2O15" "p2O19" "p2O23" "p1B03" "p1B07" "p1B11" "p1B15" "p1B19" "p1B23" "p1F03" "p1F07" "p1F11" "p1F15"
[491] "p1F19" "p1F23" "p1J03" "p1J07" "p1J11" "p1J15" "p1J19" "p1J23" "p1N03" "p1N07" "p1N11" "p1N15" "p1N19" "p1N23"
[505] "p2B03" "p2B07" "p2B11" "p2B15" "p2B19" "p2B23" "p2F03" "p2F07" "p2F11" "p2F15" "p2F19" "p2F23" "p2J03" "p2J07"
[519] "p2J11" "p2J15" "p2J19" "p2J23" "p2N03" "p2N07" "p2N11" "p2N15" "p2N19" "p2N23" "p1A03" "p1A07" "p1A11" "p1A15"
[533] "p1A19" "p1A23" "p1E03" "p1E07" "p1E11" "p1E15" "p1E19" "p1E23" "p1I03" "p1I07" "p1I11" "p1I15" "p1I19" "p1I23"
[547] "p1M03" "p1M07" "p1M11" "p1M15" "p1M19" "p1M23" "p2A03" "p2A07" "p2A11" "p2A15" "p2A19" "p2A23" "p2E03" "p2E07"
[561] "p2E11" "p2E15" "p2E19" "p2E23" "p2I03" "p2I07" "p2I11" "p2I15" "p2I19" "p2I23" "p2M03" "p2M07" "p2M11" "p2M15"
[575] "p2M19" "p2M23" "p1D04" "p1D08" "p1D12" "p1D16" "p1D20" "p1D24" "p1H04" "p1H08" "p1H12" "p1H16" "p1H20" "p1H24"
[589] "p1L04" "p1L08" "p1L12" "p1L16" "p1L20" "p1L24" "p1P04" "p1P08" "p1P12" "p1P16" "p1P20" "p1P24" "p2D04" "p2D08"
[603] "p2D12" "p2D16" "p2D20" "p2D24" "p2H04" "p2H08" "p2H12" "p2H16" "p2H20" "p2H24" "p2L04" "p2L08" "p2L12" "p2L16"
[617] "p2L20" "p2L24" "p2P04" "p2P08" "p2P12" "p2P16" "p2P20" "p2P24" "p1C04" "p1C08" "p1C12" "p1C16" "p1C20" "p1C24"
[631] "p1G04" "p1G08" "p1G12" "p1G16" "p1G20" "p1G24" "p1K04" "p1K08" "p1K12" "p1K16" "p1K20" "p1K24" "p1O04" "p1O08"
[645] "p1O12" "p1O16" "p1O20" "p1O24" "p2C04" "p2C08" "p2C12" "p2C16" "p2C20" "p2C24" "p2G04" "p2G08" "p2G12" "p2G16"
[659] "p2G20" "p2G24" "p2K04" "p2K08" "p2K12" "p2K16" "p2K20" "p2K24" "p2O04" "p2O08" "p2O12" "p2O16" "p2O20" "p2O24"
[673] "p1B04" "p1B08" "p1B12" "p1B16" "p1B20" "p1B24" "p1F04" "p1F08" "p1F12" "p1F16" "p1F20" "p1F24" "p1J04" "p1J08"
[687] "p1J12" "p1J16" "p1J20" "p1J24" "p1N04" "p1N08" "p1N12" "p1N16" "p1N20" "p1N24" "p2B04" "p2B08" "p2B12" "p2B16"
[701] "p2B20" "p2B24" "p2F04" "p2F08" "p2F12" "p2F16" "p2F20" "p2F24" "p2J04" "p2J08" "p2J12" "p2J16" "p2J20" "p2J24"
[715] "p2N04" "p2N08" "p2N12" "p2N16" "p2N20" "p2N24" "p1A04" "p1A08" "p1A12" "p1A16" "p1A20" "p1A24" "p1E04" "p1E08"
[729] "p1E12" "p1E16" "p1E20" "p1E24" "p1I04" "p1I08" "p1I12" "p1I16" "p1I20" "p1I24" "p1M04" "p1M08" "p1M12" "p1M16"
[743] "p1M20" "p1M24" "p2A04" "p2A08" "p2A12" "p2A16" "p2A20" "p2A24" "p2E04" "p2E08" "p2E12" "p2E16" "p2E20" "p2E24"
[757] "p2I04" "p2I08" "p2I12" "p2I16" "p2I20" "p2I24" "p2M04" "p2M08" "p2M12" "p2M16" "p2M20" "p2M24"

> 
> ### merge.rglist
> 
> R <- G <- matrix(11:14,4,2)
> rownames(R) <- rownames(G) <- c("a","a","b","c")
> RG1 <- new("RGList",list(R=R,G=G))
> R <- G <- matrix(21:24,4,2)
> rownames(R) <- rownames(G) <- c("b","a","a","c")
> RG2 <- new("RGList",list(R=R,G=G))
> merge(RG1,RG2)
An object of class "RGList"
$R
  [,1] [,2] [,3] [,4]
a   11   11   22   22
a   12   12   23   23
b   13   13   21   21
c   14   14   24   24

$G
  [,1] [,2] [,3] [,4]
a   11   11   22   22
a   12   12   23   23
b   13   13   21   21
c   14   14   24   24

> merge(RG2,RG1)
An object of class "RGList"
$R
  [,1] [,2] [,3] [,4]
b   21   21   13   13
a   22   22   11   11
a   23   23   12   12
c   24   24   14   14

$G
  [,1] [,2] [,3] [,4]
b   21   21   13   13
a   22   22   11   11
a   23   23   12   12
c   24   24   14   14

> 
> ### background correction
> 
> RG <- new("RGList", list(R=c(1,2,3,4),G=c(1,2,3,4),Rb=c(2,2,2,2),Gb=c(2,2,2,2)))
> backgroundCorrect(RG)
An object of class "RGList"
$R
     [,1]
[1,]   -1
[2,]    0
[3,]    1
[4,]    2

$G
     [,1]
[1,]   -1
[2,]    0
[3,]    1
[4,]    2

> backgroundCorrect(RG, method="half")
An object of class "RGList"
$R
     [,1]
[1,]  0.5
[2,]  0.5
[3,]  1.0
[4,]  2.0

$G
     [,1]
[1,]  0.5
[2,]  0.5
[3,]  1.0
[4,]  2.0

> backgroundCorrect(RG, method="minimum")
An object of class "RGList"
$R
     [,1]
[1,]  0.5
[2,]  0.5
[3,]  1.0
[4,]  2.0

$G
     [,1]
[1,]  0.5
[2,]  0.5
[3,]  1.0
[4,]  2.0

> backgroundCorrect(RG, offset=5)
An object of class "RGList"
$R
     [,1]
[1,]    4
[2,]    5
[3,]    6
[4,]    7

$G
     [,1]
[1,]    4
[2,]    5
[3,]    6
[4,]    7

> 
> ### loessFit
> 
> x <- 1:100
> y <- rnorm(100)
> out <- loessFit(y,x)
> f1 <- quantile(out$fitted)
> r1 <- quantile(out$residuals)
> w <- rep(1,100)
> w[1:50] <- 0.5
> out <- loessFit(y,x,weights=w,method="weightedLowess")
> f2 <- quantile(out$fitted)
> r2 <- quantile(out$residuals)
> out <- loessFit(y,x,weights=w,method="locfit")
> f3 <- quantile(out$fitted)
> r3 <- quantile(out$residuals)
> out <- loessFit(y,x,weights=w,method="loess")
> f4 <- quantile(out$fitted)
> r4 <- quantile(out$residuals)
> w <- rep(1,100)
> w[2*(1:50)] <- 0
> out <- loessFit(y,x,weights=w,method="weightedLowess")
> f5 <- quantile(out$fitted)
> r5 <- quantile(out$residuals)
> data.frame(f1,f2,f3,f4,f5)
              f1           f2          f3          f4          f5
0%   -0.78835384 -0.687432210 -0.78957137 -0.76756060 -0.63778292
25%  -0.18340154 -0.179683572 -0.18979269 -0.16773223 -0.38064318
50%  -0.11492924 -0.114796040 -0.12087983 -0.07185314 -0.15971879
75%   0.01507921 -0.008145125 -0.01857508  0.04030634  0.07839396
100%  0.21653837  0.145106033  0.19214597  0.21417361  0.51836274
> data.frame(r1,r2,r3,r4,r5)
              r1          r2          r3           r4          r5
0%   -2.04434053 -2.05132680 -2.02404318 -2.101242874 -2.22280633
25%  -0.59321065 -0.57200209 -0.58975649 -0.577887481 -0.71037756
50%   0.05874864  0.04514326  0.08335198 -0.001769806  0.06785517
75%   0.56010750  0.55124530  0.57618740  0.561454370  0.65383830
100%  2.57936026  2.64549799  2.57549257  2.402324533  2.28648835
> 
> ### normalizeWithinArrays
> 
> RG <- new("RGList",list())
> RG$R <- matrix(rexp(100*2),100,2)
> RG$G <- matrix(rexp(100*2),100,2)
> RG$Rb <- matrix(rnorm(100*2,sd=0.02),100,2)
> RG$Gb <- matrix(rnorm(100*2,sd=0.02),100,2)
> RGb <- backgroundCorrect(RG,method="normexp",normexp.method="saddle")
Array 1 corrected
Array 2 corrected
Array 1 corrected
Array 2 corrected
> summary(cbind(RGb$R,RGb$G))
       V1                V2                V3               V4        
 Min.   :0.01626   Min.   :0.01213   Min.   :0.0000   Min.   :0.0000  
 1st Qu.:0.35497   1st Qu.:0.29133   1st Qu.:0.2745   1st Qu.:0.3953  
 Median :0.71793   Median :0.70294   Median :0.6339   Median :0.8223  
 Mean   :0.90184   Mean   :1.00122   Mean   :0.9454   Mean   :1.1324  
 3rd Qu.:1.16891   3rd Qu.:1.33139   3rd Qu.:1.4059   3rd Qu.:1.4221  
 Max.   :4.56267   Max.   :6.37947   Max.   :5.0486   Max.   :6.6295  
> RGb <- backgroundCorrect(RG,method="normexp",normexp.method="mle")
Array 1 corrected
Array 2 corrected
Array 1 corrected
Array 2 corrected
> summary(cbind(RGb$R,RGb$G))
       V1                V2                V3               V4        
 Min.   :0.01701   Min.   :0.01255   Min.   :0.0000   Min.   :0.0000  
 1st Qu.:0.35423   1st Qu.:0.29118   1st Qu.:0.2745   1st Qu.:0.3953  
 Median :0.71719   Median :0.70280   Median :0.6339   Median :0.8223  
 Mean   :0.90118   Mean   :1.00110   Mean   :0.9454   Mean   :1.1324  
 3rd Qu.:1.16817   3rd Qu.:1.33124   3rd Qu.:1.4059   3rd Qu.:1.4221  
 Max.   :4.56193   Max.   :6.37932   Max.   :5.0486   Max.   :6.6295  
> MA <- normalizeWithinArrays(RGb,method="loess")
> summary(MA$M)
       V1                V2          
 Min.   :-5.8801   Min.   :-5.66985  
 1st Qu.:-1.1850   1st Qu.:-1.57014  
 Median :-0.2164   Median : 0.04823  
 Mean   : 0.0349   Mean   :-0.05481  
 3rd Qu.: 1.4964   3rd Qu.: 1.45113  
 Max.   : 7.0751   Max.   : 6.19744  
> #MA <- normalizeWithinArrays(RG[,1:2], mouse.setup, method="robustspline")
> #MA$M[1:5,]
> #MA <- normalizeWithinArrays(mouse.data, mouse.setup)
> #MA$M[1:5,]
> 
> ### normalizeBetweenArrays
> 
> MA2 <- normalizeBetweenArrays(MA,method="scale")
> MA$M[1:5,]
           [,1]       [,2]
[1,] -1.1669590  4.5558123
[2,]  0.8969743  0.3296544
[3,]  2.8245754  1.4249960
[4,] -1.8532747  0.4804851
[5,]  1.9159023 -5.5087631
> MA$A[1:5,]
            [,1]       [,2]
[1,] -2.48465011 -2.4041550
[2,] -0.79230447 -0.9002250
[3,] -0.76237200  0.2071043
[4,]  0.09281027 -1.3880965
[5,]  0.22385828 -3.0855818
> MA2 <- normalizeBetweenArrays(MA,method="quantile")
> MA$M[1:5,]
           [,1]       [,2]
[1,] -1.1669590  4.5558123
[2,]  0.8969743  0.3296544
[3,]  2.8245754  1.4249960
[4,] -1.8532747  0.4804851
[5,]  1.9159023 -5.5087631
> MA$A[1:5,]
            [,1]       [,2]
[1,] -2.48465011 -2.4041550
[2,] -0.79230447 -0.9002250
[3,] -0.76237200  0.2071043
[4,]  0.09281027 -1.3880965
[5,]  0.22385828 -3.0855818
> 
> ### unwrapdups
> 
> M <- matrix(1:12,6,2)
> unwrapdups(M,ndups=1)
     [,1] [,2]
[1,]    1    7
[2,]    2    8
[3,]    3    9
[4,]    4   10
[5,]    5   11
[6,]    6   12
> unwrapdups(M,ndups=2)
     [,1] [,2] [,3] [,4]
[1,]    1    2    7    8
[2,]    3    4    9   10
[3,]    5    6   11   12
> unwrapdups(M,ndups=3)
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    1    2    3    7    8    9
[2,]    4    5    6   10   11   12
> unwrapdups(M,ndups=2,spacing=3)
     [,1] [,2] [,3] [,4]
[1,]    1    4    7   10
[2,]    2    5    8   11
[3,]    3    6    9   12
> 
> ### trigammaInverse
> 
> trigammaInverse(c(1e-6,NA,5,1e6))
[1] 1.000000e+06           NA 4.961687e-01 1.000001e-03
> 
> ### lmFit, eBayes, topTable
> 
> M <- matrix(rnorm(10*6,sd=0.3),10,6)
> rownames(M) <- LETTERS[1:10]
> M[1,1:3] <- M[1,1:3] + 2
> design <- cbind(First3Arrays=c(1,1,1,0,0,0),Last3Arrays=c(0,0,0,1,1,1))
> contrast.matrix <- cbind(First3=c(1,0),Last3=c(0,1),"Last3-First3"=c(-1,1))
> fit <- lmFit(M,design)
> fit2 <- eBayes(contrasts.fit(fit,contrasts=contrast.matrix))
> topTable(fit2)
       First3       Last3 Last3.First3      AveExpr           F      P.Value    adj.P.Val
A  1.77602021  0.06025114  -1.71576906  0.918135675 50.91471061 7.727200e-23 7.727200e-22
D -0.05454069  0.39127869   0.44581938  0.168369004  2.51638838 8.075072e-02 3.758388e-01
F -0.16249607 -0.33009728  -0.16760121 -0.246296671  2.18256779 1.127516e-01 3.758388e-01
G  0.30852468 -0.06873462  -0.37725930  0.119895035  1.61088775 1.997102e-01 4.992756e-01
H -0.16942269  0.20578118   0.37520387  0.018179245  1.14554368 3.180510e-01 6.361019e-01
J  0.21417623  0.07074940  -0.14342683  0.142462814  0.82029274 4.403027e-01 7.338379e-01
C -0.12236781  0.15095948   0.27332729  0.014295836  0.60885003 5.439761e-01 7.382414e-01
B -0.11982833  0.13529287   0.25512120  0.007732271  0.52662792 5.905931e-01 7.382414e-01
E  0.01897934  0.10434934   0.08536999  0.061664340  0.18136849 8.341279e-01 9.268088e-01
I -0.04720963  0.03996397   0.08717360 -0.003622829  0.06168476 9.401792e-01 9.401792e-01
> topTable(fit2,coef=3,resort.by="logFC")
        logFC      AveExpr          t      P.Value    adj.P.Val         B
D  0.44581938  0.168369004  1.7901232 8.100587e-02 3.494414e-01 -5.323150
H  0.37520387  0.018179245  1.5065768 1.397766e-01 3.494414e-01 -5.785971
C  0.27332729  0.014295836  1.0975061 2.789833e-01 5.196681e-01 -6.313399
B  0.25512120  0.007732271  1.0244023 3.118009e-01 5.196681e-01 -6.390202
I  0.08717360 -0.003622829  0.3500330 7.281504e-01 7.335508e-01 -6.849117
E  0.08536999  0.061664340  0.3427908 7.335508e-01 7.335508e-01 -6.851601
J -0.14342683  0.142462814 -0.5759097 5.679026e-01 7.098782e-01 -6.745563
F -0.16760121 -0.246296671 -0.6729784 5.048308e-01 7.098782e-01 -6.685541
G -0.37725930  0.119895035 -1.5148301 1.376783e-01 3.494414e-01 -5.773625
A -1.71576906  0.918135675 -6.8894222 2.674199e-08 2.674199e-07 16.590631
> topTable(fit2,coef=3,resort.by="p")
        logFC      AveExpr          t      P.Value    adj.P.Val         B
A -1.71576906  0.918135675 -6.8894222 2.674199e-08 2.674199e-07 16.590631
D  0.44581938  0.168369004  1.7901232 8.100587e-02 3.494414e-01 -5.323150
G -0.37725930  0.119895035 -1.5148301 1.376783e-01 3.494414e-01 -5.773625
H  0.37520387  0.018179245  1.5065768 1.397766e-01 3.494414e-01 -5.785971
C  0.27332729  0.014295836  1.0975061 2.789833e-01 5.196681e-01 -6.313399
B  0.25512120  0.007732271  1.0244023 3.118009e-01 5.196681e-01 -6.390202
F -0.16760121 -0.246296671 -0.6729784 5.048308e-01 7.098782e-01 -6.685541
J -0.14342683  0.142462814 -0.5759097 5.679026e-01 7.098782e-01 -6.745563
I  0.08717360 -0.003622829  0.3500330 7.281504e-01 7.335508e-01 -6.849117
E  0.08536999  0.061664340  0.3427908 7.335508e-01 7.335508e-01 -6.851601
> topTable(fit2,coef=3,sort.by="logFC",resort.by="t")
        logFC      AveExpr          t      P.Value    adj.P.Val         B
D  0.44581938  0.168369004  1.7901232 8.100587e-02 3.494414e-01 -5.323150
H  0.37520387  0.018179245  1.5065768 1.397766e-01 3.494414e-01 -5.785971
C  0.27332729  0.014295836  1.0975061 2.789833e-01 5.196681e-01 -6.313399
B  0.25512120  0.007732271  1.0244023 3.118009e-01 5.196681e-01 -6.390202
I  0.08717360 -0.003622829  0.3500330 7.281504e-01 7.335508e-01 -6.849117
E  0.08536999  0.061664340  0.3427908 7.335508e-01 7.335508e-01 -6.851601
J -0.14342683  0.142462814 -0.5759097 5.679026e-01 7.098782e-01 -6.745563
F -0.16760121 -0.246296671 -0.6729784 5.048308e-01 7.098782e-01 -6.685541
G -0.37725930  0.119895035 -1.5148301 1.376783e-01 3.494414e-01 -5.773625
A -1.71576906  0.918135675 -6.8894222 2.674199e-08 2.674199e-07 16.590631
> topTable(fit2,coef=3,resort.by="B")
        logFC      AveExpr          t      P.Value    adj.P.Val         B
A -1.71576906  0.918135675 -6.8894222 2.674199e-08 2.674199e-07 16.590631
D  0.44581938  0.168369004  1.7901232 8.100587e-02 3.494414e-01 -5.323150
G -0.37725930  0.119895035 -1.5148301 1.376783e-01 3.494414e-01 -5.773625
H  0.37520387  0.018179245  1.5065768 1.397766e-01 3.494414e-01 -5.785971
C  0.27332729  0.014295836  1.0975061 2.789833e-01 5.196681e-01 -6.313399
B  0.25512120  0.007732271  1.0244023 3.118009e-01 5.196681e-01 -6.390202
F -0.16760121 -0.246296671 -0.6729784 5.048308e-01 7.098782e-01 -6.685541
J -0.14342683  0.142462814 -0.5759097 5.679026e-01 7.098782e-01 -6.745563
I  0.08717360 -0.003622829  0.3500330 7.281504e-01 7.335508e-01 -6.849117
E  0.08536999  0.061664340  0.3427908 7.335508e-01 7.335508e-01 -6.851601
> topTable(fit2,coef=3,lfc=1)
      logFC   AveExpr         t      P.Value    adj.P.Val        B
A -1.715769 0.9181357 -6.889422 2.674199e-08 2.674199e-07 16.59063
> topTable(fit2,coef=3,p.value=0.2)
      logFC   AveExpr         t      P.Value    adj.P.Val        B
A -1.715769 0.9181357 -6.889422 2.674199e-08 2.674199e-07 16.59063
> topTable(fit2,coef=3,p.value=0.2,lfc=0.5)
      logFC   AveExpr         t      P.Value    adj.P.Val        B
A -1.715769 0.9181357 -6.889422 2.674199e-08 2.674199e-07 16.59063
> topTable(fit2,coef=3,p.value=0.2,lfc=0.5,sort.by="none")
      logFC   AveExpr         t      P.Value    adj.P.Val        B
A -1.715769 0.9181357 -6.889422 2.674199e-08 2.674199e-07 16.59063
> contrasts.fit(fit[1:3,],contrast.matrix[,0])
An object of class "MArrayLM"
$coefficients
 
A
B
C

$rank
[1] 2

$assign
NULL

$qr
$qr
     First3Arrays Last3Arrays
[1,]   -1.7320508   0.0000000
[2,]    0.5773503  -1.7320508
[3,]    0.5773503   0.0000000
[4,]    0.0000000   0.5773503
[5,]    0.0000000   0.5773503
[6,]    0.0000000   0.5773503

$qraux
[1] 1.57735 1.00000

$pivot
[1] 1 2

$tol
[1] 1e-07

$rank
[1] 2


$df.residual
[1] 4 4 4

$sigma
        A         B         C 
0.3299787 0.3323336 0.2315815 

$cov.coefficients
<0 x 0 matrix>

$stdev.unscaled
 
A
B
C

$pivot
[1] 1 2

$Amean
          A           B           C 
0.918135675 0.007732271 0.014295836 

$method
[1] "ls"

$design
     First3Arrays Last3Arrays
[1,]            1           0
[2,]            1           0
[3,]            1           0
[4,]            0           1
[5,]            0           1
[6,]            0           1

$contrasts
    
[1,]
[2,]

> fit$coefficients[1,1] <- NA
> contrasts.fit(fit[1:3,],contrast.matrix)$coefficients
      First3      Last3 Last3-First3
A         NA 0.06025114           NA
B -0.1198283 0.13529287    0.2551212
C -0.1223678 0.15095948    0.2733273
> 
> designlist <- list(Null=matrix(1,6,1),Two=design,Three=cbind(1,c(0,0,1,1,0,0),c(0,0,0,0,1,1)))
> out <- selectModel(M,designlist)
> table(out$pref)

 Null   Two Three 
    5     3     2 
> 
> ### marray object
> 
> #suppressMessages(suppressWarnings(gotmarray <- require(marray,quietly=TRUE)))
> #if(gotmarray) {
> #	data(swirl)
> #	snorm = maNorm(swirl)
> #	fit <- lmFit(snorm, design = c(1,-1,-1,1))
> #	fit <- eBayes(fit)
> #	topTable(fit,resort.by="AveExpr")
> #}
> 
> ### duplicateCorrelation
> 
> cor.out <- duplicateCorrelation(M)
> cor.out$consensus.correlation
[1] -0.09290714
> cor.out$atanh.correlations
[1] -0.4419130  0.4088967 -0.1964978 -0.6093769  0.3730118
> 
> ### gls.series
> 
> fit <- gls.series(M,design,correlation=cor.out$cor)
> fit$coefficients
     First3Arrays Last3Arrays
[1,]   0.82809594  0.09777201
[2,]  -0.08845425  0.27111909
[3,]  -0.07175836 -0.11287397
[4,]   0.06955100  0.06852328
[5,]   0.08348330  0.05535668
> fit$stdev.unscaled
     First3Arrays Last3Arrays
[1,]    0.3888215   0.3888215
[2,]    0.3888215   0.3888215
[3,]    0.3888215   0.3888215
[4,]    0.3888215   0.3888215
[5,]    0.3888215   0.3888215
> fit$sigma
[1] 0.7630059 0.2152728 0.3350370 0.3227781 0.3405473
> fit$df.residual
[1] 10 10 10 10 10
> 
> ### mrlm
> 
> fit <- mrlm(M,design)
Warning message:
In rlm.default(x = X, y = y, weights = w, ...) :
  'rlm' failed to converge in 20 steps
> fit$coefficients
  First3Arrays Last3Arrays
A   1.75138894  0.06025114
B  -0.11982833  0.10322039
C  -0.09302502  0.15095948
D  -0.05454069  0.33700045
E   0.07927938  0.10434934
F  -0.16249607 -0.34010852
G   0.30852468 -0.06873462
H  -0.16942269  0.24392984
I  -0.04720963  0.03996397
J   0.21417623 -0.05679272
> fit$stdev.unscaled
  First3Arrays Last3Arrays
A    0.5933418   0.5773503
B    0.5773503   0.6096497
C    0.6017444   0.5773503
D    0.5773503   0.6266021
E    0.6307703   0.5773503
F    0.5773503   0.5846707
G    0.5773503   0.5773503
H    0.5773503   0.6544564
I    0.5773503   0.5773503
J    0.5773503   0.6689776
> fit$sigma
 [1] 0.2894294 0.2679396 0.2090236 0.1461395 0.2309018 0.2827476 0.2285945 0.2267556 0.3537469 0.2172409
> fit$df.residual
 [1] 4 4 4 4 4 4 4 4 4 4
> 
> # Similar to Mette Langaas 19 May 2004
> set.seed(123)
> narrays <- 9
> ngenes <- 5
> mu <- 0
> alpha <- 2
> beta <- -2
> epsilon <- matrix(rnorm(narrays*ngenes,0,1),ncol=narrays)
> X <- cbind(rep(1,9),c(0,0,0,1,1,1,0,0,0),c(0,0,0,0,0,0,1,1,1))
> dimnames(X) <- list(1:9,c("mu","alpha","beta"))
> yvec <- mu*X[,1]+alpha*X[,2]+beta*X[,3]
> ymat <- matrix(rep(yvec,ngenes),ncol=narrays,byrow=T)+epsilon
> ymat[5,1:2] <- NA
> fit <- lmFit(ymat,design=X)
> test.contr <- cbind(c(0,1,-1),c(1,1,0),c(1,0,1))
> dimnames(test.contr) <- list(c("mu","alpha","beta"),c("alpha-beta","mu+alpha","mu+beta"))
> fit2 <- contrasts.fit(fit,contrasts=test.contr)
> eBayes(fit2)
An object of class "MArrayLM"
$coefficients
     alpha-beta mu+alpha   mu+beta
[1,]   3.537333 1.677465 -1.859868
[2,]   4.355578 2.372554 -1.983024
[3,]   3.197645 1.053584 -2.144061
[4,]   2.697734 1.611443 -1.086291
[5,]   3.502304 2.051995 -1.450309

$stdev.unscaled
     alpha-beta  mu+alpha   mu+beta
[1,]  0.8164966 0.5773503 0.5773503
[2,]  0.8164966 0.5773503 0.5773503
[3,]  0.8164966 0.5773503 0.5773503
[4,]  0.8164966 0.5773503 0.5773503
[5,]  1.1547005 0.8368633 0.8368633

$sigma
[1] 1.3425032 0.4647155 1.1993444 0.9428569 0.9421509

$df.residual
[1] 6 6 6 6 4

$cov.coefficients
           alpha-beta     mu+alpha       mu+beta
alpha-beta  0.6666667 3.333333e-01 -3.333333e-01
mu+alpha    0.3333333 3.333333e-01  1.110223e-16
mu+beta    -0.3333333 1.110223e-16  3.333333e-01

$pivot
[1] 1 2 3

$rank
[1] 3

$Amean
[1]  0.2034961  0.1954604 -0.2863347  0.1188659  0.1784593

$method
[1] "ls"

$design
  mu alpha beta
1  1     0    0
2  1     0    0
3  1     0    0
4  1     1    0
5  1     1    0
6  1     1    0
7  1     0    1
8  1     0    1
9  1     0    1

$contrasts
      alpha-beta mu+alpha mu+beta
mu             0        1       1
alpha          1        1       0
beta          -1        0       1

$df.prior
[1] 8134.845

$s2.prior
[1] 1.021387

$var.prior
[1] 15.664973 11.397823  9.122785

$proportion
[1] 0.01

$s2.post
[1] 1.021963 1.020793 1.021694 1.021289 1.021321

$t
     alpha-beta mu+alpha   mu+beta
[1,]   4.285525 2.874066 -3.186582
[2,]   5.279861 4.067315 -3.399536
[3,]   3.874497 1.805382 -3.673984
[4,]   3.269417 2.761856 -1.861797
[5,]   3.001258 2.426278 -1.714845

$df.total
[1] 28 28 28 28 28

$p.value
       alpha-beta     mu+alpha      mu+beta
[1,] 1.945874e-04 0.0076518793 0.0035226472
[2,] 1.290875e-05 0.0003507232 0.0020449743
[3,] 5.877177e-04 0.0817788496 0.0009997966
[4,] 2.854794e-03 0.0100337538 0.0731588447
[5,] 5.599946e-03 0.0219470179 0.0974229293

$lods
     alpha-beta   mu+alpha    mu+beta
[1,]  0.7356274 -2.7480831 -1.9651516
[2,]  3.2466921  0.1146964 -1.4669585
[3,] -0.2839280 -4.8267525 -0.8071472
[4,] -1.7300021 -2.9939736 -4.6385674
[5,] -2.1848828 -3.4282344 -4.5756693

$F
[1]  9.207280 14.049948  8.378781  5.547069  4.521367

$F.p.value
[1] 1.013549e-04 8.103854e-07 2.316764e-04 3.913618e-03 1.090148e-02

> 
> ### uniquegenelist
> 
> uniquegenelist(letters[1:8],ndups=2)
[1] "a" "c" "e" "g"
> uniquegenelist(letters[1:8],ndups=2,spacing=2)
[1] "a" "b" "e" "f"
> 
> ### classifyTests
> 
> tstat <- matrix(c(0,5,0, 0,2.5,0, -2,-2,2, 1,1,1), 4, 3, byrow=TRUE)
> classifyTestsF(tstat)
TestResults matrix
     [,1] [,2] [,3]
[1,]    0    1    0
[2,]    0    0    0
[3,]   -1   -1    1
[4,]    0    0    0
> classifyTestsF(tstat,fstat.only=TRUE)
[1] 8.333333 2.083333 4.000000 1.000000
attr(,"df1")
[1] 3
attr(,"df2")
[1] Inf
> limma:::.classifyTestsP(tstat)
TestResults matrix
     [,1] [,2] [,3]
[1,]    0    1    0
[2,]    0    1    0
[3,]    0    0    0
[4,]    0    0    0
> 
> ### avereps
> 
> x <- matrix(rnorm(8*3),8,3)
> colnames(x) <- c("S1","S2","S3")
> rownames(x) <- c("b","a","a","c","c","b","b","b")
> avereps(x)
          S1         S2         S3
b -0.2353018  0.5220094  0.2302895
a -0.4347701  0.6453498 -0.6758914
c  0.3482980 -0.4820695 -0.3841313
> 
> ### roast
> 
> y <- matrix(rnorm(100*4),100,4)
> sigma <- sqrt(2/rchisq(100,df=7))
> y <- y*sigma
> design <- cbind(Intercept=1,Group=c(0,0,1,1))
> iset1 <- 1:5
> y[iset1,3:4] <- y[iset1,3:4]+3
> iset2 <- 6:10
> roast(y=y,iset1,design,contrast=2)
         Active.Prop     P.Value
Down               0 0.997999500
Up                 1 0.002250563
UpOrDown           1 0.004500000
Mixed              1 0.004500000
> roast(y=y,iset1,design,contrast=2,array.weights=c(0.5,1,0.5,1))
         Active.Prop     P.Value
Down               0 0.998749687
Up                 1 0.001500375
UpOrDown           1 0.003000000
Mixed              1 0.003000000
> w <- matrix(runif(100*4),100,4)
> roast(y=y,iset1,design,contrast=2,weights=w)
         Active.Prop     P.Value
Down               0 0.996999250
Up                 1 0.003250813
UpOrDown           1 0.006500000
Mixed              1 0.006500000
> mroast(y=y,list(set1=iset1,set2=iset2),design,contrast=2,gene.weights=runif(100))
     NGenes PropDown PropUp Direction PValue    FDR PValue.Mixed FDR.Mixed
set1      5        0      1        Up 0.0055 0.0105       0.0055    0.0105
set2      5        0      0        Up 0.2025 0.2025       0.4715    0.4715
> mroast(y=y,list(set1=iset1,set2=iset2),design,contrast=2,array.weights=c(0.5,1,0.5,1))
     NGenes PropDown PropUp Direction PValue    FDR PValue.Mixed FDR.Mixed
set1      5        0      1        Up 0.0050 0.0095        0.005    0.0095
set2      5        0      0        Up 0.6845 0.6845        0.642    0.6420
> mroast(y=y,list(set1=iset1,set2=iset2),design,contrast=2,weights=w)
     NGenes PropDown PropUp Direction PValue    FDR PValue.Mixed FDR.Mixed
set1      5        0    1.0        Up 0.0030 0.0055        0.003    0.0055
set2      5        0    0.2      Down 0.9615 0.9615        0.496    0.4960
> mroast(y=y,list(set1=iset1,set2=iset2),design,contrast=2,weights=w,array.weights=c(0.5,1,0.5,1))
     NGenes PropDown PropUp Direction PValue    FDR PValue.Mixed FDR.Mixed
set1      5        0    1.0        Up 0.0025 0.0045       0.0025    0.0045
set2      5        0    0.2      Down 0.8930 0.8930       0.4380    0.4380
> fry(y=y,list(set1=iset1,set2=iset2),design,contrast=2,weights=w,array.weights=c(0.5,1,0.5,1))
     NGenes Direction      PValue         FDR PValue.Mixed    FDR.Mixed
set1      5        Up 0.001568924 0.003137848 0.0001156464 0.0002312929
set2      5      Down 0.932105219 0.932105219 0.4315499569 0.4315499569
> rownames(y) <- paste0("Gene",1:100)
> iset1A <- rownames(y)[1:5]
> fry(y=y,index=iset1A,design,contrast=2,weights=w,array.weights=c(0.5,1,0.5,1))
     NGenes Direction      PValue PValue.Mixed
set1      5        Up 0.001568924 0.0001156464
> 
> ### camera
> 
> camera(y=y,iset1,design,contrast=2,weights=c(0.5,1,0.5,1),allow.neg.cor=TRUE,inter.gene.cor=NA)
     NGenes Correlation Direction      PValue
set1      5  -0.2481655        Up 0.001050253
> camera(y=y,list(set1=iset1,set2=iset2),design,contrast=2,allow.neg.cor=TRUE,inter.gene.cor=NA)
     NGenes Correlation Direction       PValue        FDR
set1      5  -0.2481655        Up 0.0009047749 0.00180955
set2      5   0.1719094      Down 0.9068364378 0.90683644
> camera(y=y,iset1,design,contrast=2,weights=c(0.5,1,0.5,1))
     NGenes Direction       PValue
set1      5        Up 1.105329e-10
> camera(y=y,list(set1=iset1,set2=iset2),design,contrast=2)
     NGenes Direction       PValue          FDR
set1      5        Up 7.334400e-12 1.466880e-11
set2      5      Down 8.677115e-01 8.677115e-01
> camera(y=y,iset1A,design,contrast=2)
     NGenes Direction     PValue
set1      5        Up 7.3344e-12
> 
> ### with EList arg
> 
> y <- new("EList",list(E=y))
> roast(y=y,iset1,design,contrast=2)
         Active.Prop     P.Value
Down               0 0.996999250
Up                 1 0.003250813
UpOrDown           1 0.006500000
Mixed              1 0.006500000
> camera(y=y,iset1,design,contrast=2,allow.neg.cor=TRUE,inter.gene.cor=NA)
     NGenes Correlation Direction       PValue
set1      5  -0.2481655        Up 0.0009047749
> camera(y=y,iset1,design,contrast=2)
     NGenes Direction     PValue
set1      5        Up 7.3344e-12
> 
> ### eBayes with trend
> 
> fit <- lmFit(y,design)
> fit <- eBayes(fit,trend=TRUE)
> topTable(fit,coef=2)
           logFC     AveExpr         t      P.Value  adj.P.Val          B
Gene2   3.729512  1.73488969  4.865697 0.0004854886 0.02902331  0.1596831
Gene3   3.488703  1.03931081  4.754954 0.0005804663 0.02902331 -0.0144071
Gene4   2.696676  1.74060725  3.356468 0.0063282637 0.21094212 -2.3434702
Gene1   2.391846  1.72305203  3.107124 0.0098781268 0.24695317 -2.7738874
Gene33 -1.492317 -0.07525287 -2.783817 0.0176475742 0.29965463 -3.3300835
Gene5   2.387967  1.63066783  2.773444 0.0179792778 0.29965463 -3.3478204
Gene80 -1.839760 -0.32802306 -2.503584 0.0291489863 0.37972679 -3.8049642
Gene39  1.366141 -0.27360750  2.451133 0.0320042242 0.37972679 -3.8925860
Gene95 -1.907074  1.26297763 -2.414217 0.0341754107 0.37972679 -3.9539571
Gene50  1.034777  0.01608433  2.054690 0.0642289403 0.59978803 -4.5350317
> fit$df.prior
[1] 9.098442
> fit$s2.prior
    Gene1     Gene2     Gene3     Gene4     Gene5     Gene6     Gene7     Gene8     Gene9    Gene10    Gene11    Gene12 
0.6901845 0.6977354 0.3860494 0.7014122 0.6341068 0.2926337 0.3077620 0.3058098 0.2985145 0.2832520 0.3232434 0.3279710 
   Gene13    Gene14    Gene15    Gene16    Gene17    Gene18    Gene19    Gene20    Gene21    Gene22    Gene23    Gene24 
0.2816081 0.2943502 0.3127994 0.2894802 0.2812758 0.2840051 0.2839124 0.2954261 0.2838592 0.2812704 0.3157029 0.2844541 
   Gene25    Gene26    Gene27    Gene28    Gene29    Gene30    Gene31    Gene32    Gene33    Gene34    Gene35    Gene36 
0.4778832 0.2818242 0.2930360 0.2940957 0.2941862 0.3234399 0.3164779 0.2853510 0.2988244 0.3450090 0.3048596 0.3089086 
   Gene37    Gene38    Gene39    Gene40    Gene41    Gene42    Gene43    Gene44    Gene45    Gene46    Gene47    Gene48 
0.3104534 0.4551549 0.3220008 0.2813286 0.2826027 0.2822504 0.2823330 0.3170673 0.3146173 0.3146793 0.2916540 0.2975003 
   Gene49    Gene50    Gene51    Gene52    Gene53    Gene54    Gene55    Gene56    Gene57    Gene58    Gene59    Gene60 
0.3538946 0.2907240 0.3199596 0.2816641 0.2814293 0.2996822 0.2812885 0.2896157 0.2955317 0.2815907 0.2919420 0.2849675 
   Gene61    Gene62    Gene63    Gene64    Gene65    Gene66    Gene67    Gene68    Gene69    Gene70    Gene71    Gene72 
0.3540805 0.3491713 0.2975019 0.2939325 0.2986943 0.3265466 0.3402343 0.3394927 0.2813283 0.2814440 0.3089669 0.3030850 
   Gene73    Gene74    Gene75    Gene76    Gene77    Gene78    Gene79    Gene80    Gene81    Gene82    Gene83    Gene84 
0.2859286 0.2813216 0.3475231 0.3334419 0.2949550 0.3108702 0.2959688 0.3295294 0.3413700 0.2946268 0.3029565 0.2920284 
   Gene85    Gene86    Gene87    Gene88    Gene89    Gene90    Gene91    Gene92    Gene93    Gene94    Gene95    Gene96 
0.2926205 0.2818046 0.3425116 0.2882936 0.2945459 0.3077919 0.2892134 0.2823787 0.3048049 0.2961408 0.4590012 0.2812784 
   Gene97    Gene98    Gene99   Gene100 
0.2846345 0.2819651 0.3137551 0.2856081 
> summary(fit$s2.post)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
 0.2335  0.2603  0.2997  0.3375  0.3655  0.7812 
> 
> y$E[1,1] <- NA
> y$E[1,3] <- NA
> fit <- lmFit(y,design)
> fit <- eBayes(fit,trend=TRUE)
> topTable(fit,coef=2)
           logFC     AveExpr         t      P.Value  adj.P.Val          B
Gene3   3.488703  1.03931081  4.604490 0.0007644061 0.07644061 -0.2333915
Gene2   3.729512  1.73488969  4.158038 0.0016033158 0.08016579 -0.9438583
Gene4   2.696676  1.74060725  2.898102 0.0145292666 0.44537707 -3.0530813
Gene33 -1.492317 -0.07525287 -2.784004 0.0178150826 0.44537707 -3.2456324
Gene5   2.387967  1.63066783  2.495395 0.0297982959 0.46902627 -3.7272957
Gene80 -1.839760 -0.32802306 -2.491115 0.0300256116 0.46902627 -3.7343584
Gene39  1.366141 -0.27360750  2.440729 0.0328318388 0.46902627 -3.8172597
Gene1   2.638272  1.47993643  2.227507 0.0530016060 0.58890673 -3.9537576
Gene95 -1.907074  1.26297763 -2.288870 0.0429197808 0.53649726 -4.0642439
Gene50  1.034777  0.01608433  2.063663 0.0635275235 0.60439978 -4.4204731
> fit$df.residual[1]
[1] 0
> fit$df.prior
[1] 8.971891
> fit$s2.prior
  [1] 0.7014084 0.9646561 0.4276287 0.9716476 0.8458852 0.2910492 0.3097052 0.3074225 0.2985517 0.2786374 0.3267121
 [12] 0.3316013 0.2766404 0.2932679 0.3154347 0.2869186 0.2761395 0.2799884 0.2795119 0.2946468 0.2794412 0.2761282
 [23] 0.3186442 0.2806092 0.4596465 0.2767847 0.2924541 0.2939204 0.2930568 0.3269177 0.3194905 0.2814293 0.2989389
 [34] 0.3483845 0.3062977 0.3110287 0.3127934 0.4418052 0.3254067 0.2761732 0.2780422 0.2773311 0.2776653 0.3201314
 [45] 0.3174515 0.3175199 0.2897731 0.2972785 0.3567262 0.2885556 0.3232426 0.2767207 0.2762915 0.3000062 0.2761306
 [56] 0.2870975 0.2947817 0.2766152 0.2901489 0.2813183 0.3568982 0.3724440 0.2972804 0.2927300 0.2987764 0.3301406
 [67] 0.3437962 0.3430762 0.2761729 0.2763094 0.3110958 0.3041715 0.2822004 0.2761654 0.3507694 0.3371214 0.2940441
 [78] 0.3132660 0.2953388 0.3331880 0.3448949 0.2946558 0.3040162 0.2902616 0.2910320 0.2769211 0.3459946 0.2859057
 [89] 0.2935193 0.3097398 0.2865663 0.2774968 0.3062327 0.2955576 0.5425422 0.2761214 0.2808585 0.2771484 0.3164981
[100] 0.2817725
> summary(fit$s2.post)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
 0.2296  0.2581  0.3003  0.3453  0.3652  0.9158 
> 
> ### eBayes with robust
> 
> fitr <- lmFit(y,design)
> fitr <- eBayes(fitr,robust=TRUE)
> summary(fitr$df.prior)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  6.717   9.244   9.244   9.194   9.244   9.244 
> topTable(fitr,coef=2)
           logFC     AveExpr         t      P.Value   adj.P.Val          B
Gene2   3.729512  1.73488969  7.108463 1.752774e-05 0.001752774  3.3517310
Gene3   3.488703  1.03931081  5.041209 3.526138e-04 0.017630688  0.4056329
Gene4   2.696676  1.74060725  4.697690 6.150508e-04 0.020501693 -0.1463315
Gene5   2.387967  1.63066783  3.451807 5.245019e-03 0.131125480 -2.2678836
Gene1   2.638272  1.47993643  3.317593 8.651142e-03 0.173022847 -2.4400000
Gene33 -1.492317 -0.07525287 -2.716431 1.970991e-02 0.297950865 -3.5553166
Gene95 -1.907074  1.26297763 -2.685067 2.085656e-02 0.297950865 -3.6094982
Gene80 -1.839760 -0.32802306 -2.535926 2.727440e-02 0.340929958 -3.8653107
Gene39  1.366141 -0.27360750  2.469570 3.071854e-02 0.341317083 -3.9779817
Gene50  1.034777  0.01608433  1.973040 7.357960e-02 0.632875126 -4.7877548
> fitr <- eBayes(fitr,trend=TRUE,robust=TRUE)
> summary(fitr$df.prior)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  7.809   8.972   8.972   8.949   8.972   8.972 
> topTable(fitr,coef=2)
           logFC     AveExpr         t      P.Value  adj.P.Val          B
Gene2   3.729512  1.73488969  4.754160 0.0005999064 0.05999064 -0.0218247
Gene3   3.488703  1.03931081  3.761219 0.0031618743 0.15809372 -1.6338257
Gene4   2.696676  1.74060725  3.292262 0.0071993347 0.23997782 -2.4295326
Gene33 -1.492317 -0.07525287 -3.063180 0.0108203134 0.27050784 -2.8211394
Gene50  1.034777  0.01608433  2.645717 0.0228036320 0.38815282 -3.5304767
Gene5   2.387967  1.63066783  2.633901 0.0232891695 0.38815282 -3.5503445
Gene1   2.638272  1.47993643  2.204116 0.0550613420 0.58959402 -4.0334169
Gene80 -1.839760 -0.32802306 -2.332729 0.0397331916 0.56761702 -4.0496640
Gene39  1.366141 -0.27360750  2.210665 0.0492211477 0.58959402 -4.2469578
Gene95 -1.907074  1.26297763 -2.106861 0.0589594023 0.58959402 -4.4117140
> 
> ### voom
> 
> y <- matrix(rpois(100*4,lambda=20),100,4)
> design <- cbind(Int=1,x=c(0,0,1,1))
> v <- voom(y,design)
> names(v)
[1] "E"       "weights" "design"  "targets"
> summary(v$E)
       V1              V2              V3              V4       
 Min.   :12.38   Min.   :12.32   Min.   :12.17   Min.   :12.08  
 1st Qu.:13.11   1st Qu.:13.05   1st Qu.:13.11   1st Qu.:13.03  
 Median :13.34   Median :13.28   Median :13.35   Median :13.35  
 Mean   :13.29   Mean   :13.29   Mean   :13.28   Mean   :13.28  
 3rd Qu.:13.48   3rd Qu.:13.54   3rd Qu.:13.48   3rd Qu.:13.50  
 Max.   :14.01   Max.   :13.95   Max.   :14.03   Max.   :14.05  
> summary(v$weights)
       V1               V2               V3               V4        
 Min.   : 7.729   Min.   : 7.729   Min.   : 7.729   Min.   : 7.729  
 1st Qu.:13.859   1st Qu.:15.067   1st Qu.:14.254   1st Qu.:13.592  
 Median :15.913   Median :16.621   Median :16.081   Median :16.028  
 Mean   :16.773   Mean   :18.525   Mean   :18.472   Mean   :17.112  
 3rd Qu.:18.214   3rd Qu.:20.002   3rd Qu.:18.475   3rd Qu.:18.398  
 Max.   :34.331   Max.   :34.331   Max.   :34.331   Max.   :34.331  
> 
> ### goana
> 
> EB <- c("133746","1339","134","1340","134083","134111","134147","134187","134218","134266",
+ "134353","134359","134391","134429","134430","1345","134510","134526","134549","1346",
+ "134637","1347","134701","134728","1348","134829","134860","134864","1349","134957",
+ "135","1350","1351","135112","135114","135138","135152","135154","1352","135228",
+ "135250","135293","135295","1353","135458","1355","1356","135644","135656","1357",
+ "1358","135892","1359","135924","135935","135941","135946","135948","136","1360",
+ "136051","1361","1362","136227","136242","136259","1363","136306","136319","136332",
+ "136371","1364","1365","136541","1366","136647","1368","136853","1369","136991",
+ "1370","137075","1371","137209","1373","137362","1374","137492","1375","1376",
+ "137682","137695","137735","1378","137814","137868","137872","137886","137902","137964")
> go <- goana(fit,FDR=0.8,geneid=EB)
> topGO(go,number=10,truncate.term=30)
                                     Term Ont  N Up Down        P.Up      P.Down
GO:0032502          developmental process  BP 26  5    7 0.785697935 0.002720775
GO:0070062          extracellular exosome  CC  8  0    4 1.000000000 0.003047199
GO:0065010 extracellular membrane-boun...  CC  8  0    4 1.000000000 0.003047199
GO:0043230        extracellular organelle  CC  8  0    4 1.000000000 0.003047199
GO:1903561          extracellular vesicle  CC  8  0    4 1.000000000 0.003047199
GO:0006915              apoptotic process  BP  5  4    1 0.009503355 0.416247633
GO:0008219                     cell death  BP  5  4    1 0.009503355 0.416247633
GO:0012501          programmed cell death  BP  5  4    1 0.009503355 0.416247633
GO:0042981 regulation of apoptotic pro...  BP  5  4    1 0.009503355 0.416247633
GO:0043067 regulation of programmed ce...  BP  5  4    1 0.009503355 0.416247633
> topGO(go,number=10,truncate.term=30,sort="down")
                                     Term Ont  N Up Down      P.Up      P.Down
GO:0032502          developmental process  BP 26  5    7 0.7856979 0.002720775
GO:0070062          extracellular exosome  CC  8  0    4 1.0000000 0.003047199
GO:0065010 extracellular membrane-boun...  CC  8  0    4 1.0000000 0.003047199
GO:0043230        extracellular organelle  CC  8  0    4 1.0000000 0.003047199
GO:1903561          extracellular vesicle  CC  8  0    4 1.0000000 0.003047199
GO:0016485             protein processing  BP  6  0    3 1.0000000 0.012551076
GO:0043009 chordate embryonic developm...  BP  3  0    2 1.0000000 0.025788497
GO:0072359 circulatory system developm...  BP  3  0    2 1.0000000 0.025788497
GO:0009790             embryo development  BP  3  0    2 1.0000000 0.025788497
GO:0009792 embryo development ending i...  BP  3  0    2 1.0000000 0.025788497
> 
> proc.time()
   user  system elapsed 
   1.43    0.68    3.32 

Example timings

limma.Rcheck/limma-Ex.timings

nameusersystemelapsed
EList0.0050.0000.005
LargeDataObject000
PrintLayout000
TestResults000
alias2Symbol3.7760.3764.159
arrayWeights0.0110.0010.011
arrayWeightsQuick000
asMatrixWeights0.0000.0010.001
auROC0.0000.0000.001
avearrays0.0000.0010.001
avereps000
backgroundcorrect0.0030.0010.004
barcodeplot0.0240.0020.027
beadCountWeights000
blockDiag0.0000.0010.001
camera0.0380.0010.038
cbind0.0020.0000.002
changelog0.0060.0000.006
channel2M0.0000.0010.000
chooseLowessSpan0.0040.0000.004
classifytestsF0.0020.0010.002
contrastAsCoef0.0030.0000.003
contrasts.fit0.0090.0000.009
controlStatus0.0030.0000.002
coolmap0.0700.0030.072
cumOverlap0.0010.0000.001
detectionPValue000
diffSplice000
dim0.0000.0000.001
dupcor0.0640.0000.065
ebayes0.0060.0000.006
fitGammaIntercept0.0000.0010.001
fitfdist000
fitmixture0.0120.0010.012
genas0.0460.0040.050
geneSetTest0.0000.0010.000
getSpacing000
getlayout000
goana000
goanaTrend0.0330.0000.033
head0.0040.0000.004
heatdiagram000
helpMethods000
ids2indices000
imageplot0.0130.0010.014
intraspotCorrelation000
isfullrank0.0000.0000.001
isnumeric0.0000.0000.001
kooperberg000
limmaUsersGuide0.0010.0000.001
lm.series000
lmFit0.2120.0410.254
lmscFit0.0000.0000.001
loessfit0.0060.0000.006
logcosh000
logsumexp0.0010.0000.000
ma3x30.0000.0000.001
makeContrasts0.0000.0000.001
makeunique0.0000.0000.001
mdplot0.0030.0010.003
merge0.0030.0000.003
mergeScansRG000
modelMatrix0.0000.0000.001
modifyWeights0.0010.0000.000
nec000
normalizeMedianAbsValues0.0010.0000.000
normalizeRobustSpline0.0130.0010.014
normalizeVSN0.3340.0200.355
normalizebetweenarrays0.0010.0000.002
normalizeprintorder000
normexpfit0.0010.0000.001
normexpfitcontrol000
normexpfitdetectionp000
normexpsignal000
plotDensities000
plotExonJunc000
plotExons000
plotMD0.0520.0020.054
plotMDS0.0110.0000.011
plotRLDF0.0040.0010.005
plotSplice000
plotWithHighlights0.0050.0030.009
plotma0.0620.0040.065
poolvar0.0010.0000.000
predFCm0.0090.0000.009
printorder0.0000.0040.005
printtipWeights000
propTrueNull0.0020.0000.001
propexpr0.0000.0000.001
protectMetachar0.0010.0000.000
qqt0.0050.0000.005
qualwt000
rankSumTestwithCorrelation0.0040.0000.004
read.idat000
read.ilmn000
read.maimages000
readImaGeneHeader000
readgal000
removeBatchEffect0.0080.0000.007
removeext0.0010.0000.000
roast0.0580.0030.060
romer0.0110.0000.010
sampleInfoFromGEO000
selectmodel0.0060.0000.007
squeezeVar0.0000.0000.001
strsplit2000
subsetting0.0030.0000.002
targetsA2C0.0030.0000.003
topGO000
topRomer000
topSplice000
toptable000
tricubeMovingAverage0.0010.0010.001
trigammainverse000
trimWhiteSpace000
uniquegenelist000
unwrapdups000
venn0.0140.0000.013
volcanoplot000
voom0.0000.0000.001
vooma0.010.000.01
voomaLmFit0.0840.0020.087
weightedLowess0.0110.0000.011
weightedmedian000
writefit000
zscore0.0000.0000.001
zscoreT0.0000.0010.001