Hi --

EBImage is a Bioconductor package so better to ask there

  http://bioconductor.org/help/mailing-list/

and to cc the packageDescription("EBImage")$Maintainer

Martin

On 06/20/2012 02:57 PM, Steven Winter wrote:
I am having trouble using the "resize" function (in the package EBImage) with 
matrices containing double values. Let's say I have a matrix 'b' with these values:

a = c(1.25,1.555,1.245,1.265,1.656,1.235,1.848,1.959,1.548,1.245454,1.989,1.24)
b = matrix(a,4,3)
b
       [,1]  [,2]     [,3]
[1,] 1.250 1.656 1.548000
[2,] 1.555 1.235 1.245454
[3,] 1.245 1.848 1.989000
[4,] 1.265 1.959 1.240000


I then use the resize function to increase the size of the matrix to a 6 by 10 
matrix, but unfortunately there is a glitch: all of the numbers come out as 
ones:
y = resize(b,6,10)
y
Image
   colormode: Grayscale
   storage.mode: double
   dim: 6 10
   nb.total.frames: 1
   nb.render.frames: 1
imageData(object)[1:5,1:6]:
      [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    1    1    1    1    1    1
[2,]    1    1    1    1    1    1
[3,]    1    1    1    1    1    1
[4,]    1    1    1    1    1    1
[5,]    1    1    1    1    1    1

Does anyone know why this is happening? When I use integer values, the function 
produces correct output.
Thank you for your help.
        [[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.


--
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793

______________________________________________
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.

Reply via email to