combining data from two R arrays
1
0
Entering edit mode
@richard-harrison-2386
Last seen 10.2 years ago
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.UT F- 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"
GO Survival annotate genefilter vsn tilingArray GO Survival annotate genefilter vsn • 1.1k views
ADD COMMENT
0
Entering edit mode
@richard-harrison-2386
Last seen 10.2 years ago
Thanks!!!!! On 6 Oct 2007, at 18:03, jsv at stat.osu.edu wrote: > drop the comma > >> 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_G >> B.U >> TF-8;LC_MONETARY=en_GB.UTF-8;LC_MESSAGES=en_GB.UTF-8;LC_PAPER=en_GB.U >> TF- >> 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" >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at stat.math.ethz.ch >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: >> http://news.gmane.org/gmane.science.biology.informatics.conductor >> > >
ADD COMMENT

Login before adding your answer.

Traffic: 620 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6