Browse code

(1.13.2) Minor modification to log2 usage

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

Ben Bolstad authored on 01/12/2010 04:10:43
Showing2 changed files

... ...
@@ -1,5 +1,5 @@
1 1
 Package: preprocessCore
2
-Version: 1.13.1
2
+Version: 1.13.2
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>
... ...
@@ -134,7 +134,7 @@ void medianlog(double *data, int rows, int cols, double *results, double *result
134 134
   
135 135
   for (j=0; j < cols; j++){
136 136
     for (i = 0; i < rows; i++){
137
-      buffer[i] = log2(data[j*rows + i]);
137
+      buffer[i] = log(data[j*rows + i])/log(2.0);
138 138
     }
139 139
     results[j] = median_log(buffer,rows); 
140 140
     resultsSE[j] = R_NaReal;
... ...
@@ -151,7 +151,7 @@ void medianlog_no_copy(double *data, int rows, int cols, double *results, double
151 151
     
152 152
   for (j=0; j < cols; j++){
153 153
     for (i = 0; i < rows; i++){
154
-      data[j*rows + i]= log2(data[j*rows + i]);
154
+      data[j*rows + i]= log(data[j*rows + i])/log(2.0);
155 155
     }
156 156
     results[j] = median_log(&data[j*rows],rows); 
157 157
     resultsSE[j] = R_NaReal;