[BioC] combining data from two R arrays

Richard Harrison harryinashed at mac.com
Sat Oct 6 18:55:30 CEST 2007


Deal all,

I have two identically sized arrays, one logical and one numerical. I  
would like to take the TRUE/FALSE data from the logical array and set  
every false prediction to 0 in the numerical array. I tried:

     yn[throwOut,]=NA - where throwOut is the logical array and yn is  
the numerical one. I got the following error:

Error in yn[throwOut, ] = NA : incorrect number of subscripts on matrix

Any ideas?


Thanks
Richard Harrison




R version 2.5.1 (2007-06-27)
x86_64-unknown-linux-gnu

locale:
LC_CTYPE=en_GB.UTF-8;LC_NUMERIC=C;LC_TIME=en_GB.UTF-8;LC_COLLATE=en_GB.U 
TF-8;LC_MONETARY=en_GB.UTF-8;LC_MESSAGES=en_GB.UTF-8;LC_PAPER=en_GB.UTF- 
8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_GB.UTF-8;LC_ID 
ENTIFICATION=C

attached base packages:
[1] "splines"   "grid"      "tools"     "stats"     "graphics"   
"grDevices"
[7] "utils"     "datasets"  "methods"   "base"

other attached packages:
davidTiling           GO  tilingArray       pixmap  geneplotter       
lattice
      "1.0.4"     "1.16.0"     "1.14.0"      "0.4-7"     "1.14.0"     
"0.15-11"
     annotate   genefilter     survival          vsn        limma   
strucchange
     "1.14.1"     "1.14.1"       "2.32"      "2.2.0"      
"2.10.5"      "1.3-2"
     sandwich          zoo RColorBrewer         affy        
affyio      Biobase
      "2.0-2"      "1.3-2"      "0.2-3"     "1.14.2"      "1.4.1"      
"1.14.1"



More information about the Bioconductor mailing list