Hi, mat1<- matrix(log(1:20),ncol=5) exp(mat1) # [,1] [,2] [,3] [,4] [,5] #[1,] 1 5 9 13 17 #[2,] 2 6 10 14 18 #[3,] 3 7 11 15 19 #[4,] 4 8 12 16 20 mat2<- matrix(log2(1:20),ncol=5) 2^mat2 # [,1] [,2] [,3] [,4] [,5] #[1,] 1 5 9 13 17 #[2,] 2 6 10 14 18 #[3,] 3 7 11 15 19 #[4,] 4 8 12 16 20 A.K.
----- Original Message ----- From: JiangZhengyu <zhyjiang2...@hotmail.com> To: "r-help@r-project.org" <r-help@r-project.org> Cc: Sent: Monday, May 13, 2013 2:41 PM Subject: [R] recover log of matrix Dear all, I have a matrix with all values being log transformed. I want them back to the values before the transformation. i.e. 2^matrix M. Is there any easy code to do this? Thanks,Zhengyu [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.