Browse code

(1.27.1) Change tolerance on sum row.effects test

git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/preprocessCore@92139 bc3139a8-67e5-0310-9ffc-ced21a209358

bolstad authored on 03/07/2014 14:06:55
Showing 2 changed files

... ...
@@ -1,5 +1,5 @@
1 1
 Package: preprocessCore
2
-Version: 1.27.0
2
+Version: 1.27.1
3 3
 Title: A collection of pre-processing functions
4 4
 Author: Benjamin Milo Bolstad <bmb@bmbolstad.com>
5 5
 Maintainer: Benjamin Milo Bolstad <bmb@bmbolstad.com>
... ...
@@ -12,7 +12,7 @@ rcModelPLM <- function(y,row.effects=NULL, input.scale=NULL){
12 12
     if (length(row.effects) != nrow(y)){
13 13
        stop("row.effects parameter should be same length as number of rows")
14 14
     }  
15
-    if (abs(sum(row.effects)) > 10*.Machine$double.eps){
15
+    if (abs(sum(row.effects)) > length(row.effects)*.Machine$double.eps){
16 16
        stop("row.effects should sum to zero")
17 17
     }
18 18
     .Call("R_rlm_rma_given_probe_effects",y,as.double(row.effects),PsiCode,PsiK,input.scale,PACKAGE="preprocessCore") 
... ...
@@ -48,7 +48,7 @@ rcModelWPLM <- function(y, w, row.effects=NULL, input.scale=NULL){
48 48
     if (length(row.effects) != nrow(y)){
49 49
        stop("row.effects parameter should be same length as number of rows")
50 50
     }  
51
-    if (abs(sum(row.effects)) > 10*.Machine$double.eps){
51
+    if (abs(sum(row.effects)) > length(row.effects)*.Machine$double.eps){
52 52
        stop("row.effects should sum to zero")
53 53
     }
54 54
     .Call("R_wrlm_rma_given_probe_effects",y,as.double(row.effects),PsiCode,PsiK,as.double(w),input.scale,PACKAGE="preprocessCore")