trasnforming log base 2 values into decimal values
2
0
Entering edit mode
@denrique-escobar-espinoza-1303
Last seen 9.6 years ago
hi, I am working with an expression matrix, I think I will use ratios for analysis of 2 conditions, does anyone know how to change values in a matrix. if I have 3 in log2 => 2^3=8 in decimal, how I do that in R for an entire vector or matrix? Thanks
• 699 views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 14 minutes ago
United States
D.Enrique ESCOBAR ESPINOZA wrote: > hi, > I am working with an expression matrix, > I think I will use ratios for analysis of 2 conditions, > does anyone know how to change values in a matrix. > > if I have 3 in log2 => 2^3=8 in decimal, > how I do that in R for an entire vector or matrix? Did you try the obvious? > x <- 1:5 > 2^x [1] 2 4 8 16 32 > y <- matrix(rep(1:5, 5), ncol=5) > 2^y [,1] [,2] [,3] [,4] [,5] [1,] 2 2 2 2 2 [2,] 4 4 4 4 4 [3,] 8 8 8 8 8 [4,] 16 16 16 16 16 [5,] 32 32 32 32 32 Best, Jim > Thanks > > _______________________________________________ > 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 -- James W. MacDonald, M.S. Biostatistician Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623 ********************************************************** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues.
ADD COMMENT
0
Entering edit mode
@benilton-carvalho-1375
Last seen 4.1 years ago
Brazil/Campinas/UNICAMP
vec = 1:10 mat = matrix(1:10, ncol=2) 2^vec 2^mat b On Jun 15, 2007, at 1:08 PM, D.Enrique ESCOBAR ESPINOZA wrote: > hi, > I am working with an expression matrix, > I think I will use ratios for analysis of 2 conditions, > does anyone know how to change values in a matrix. > > if I have 3 in log2 => 2^3=8 in decimal, > how I do that in R for an entire vector or matrix? > Thanks
ADD COMMENT

Login before adding your answer.

Traffic: 805 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