Skip to content
Prev 40462 / 63424 Next

Packages for R-CRAN (organizing aspects)

On Tue, Jun 07, 2011 at 10:30:12AM -0400, Gabor Grothendieck wrote:
read.jpeg in rimage does not give me a matrix like I would extpect in R,
for further working with the data.
It gives me an imagmatrix, which's value I can't access directly.
I only have a data structure that is closed to the functionality that the
rimage module provides.

Maybe I have overseen something,
but how would I plot a histogram
of R, G and B values and the according
grayvalue's histogram?

With my libjpeg reader it would be:

      library(libjpeg)
      pic <- readjpeg( picfilename )
      par(mfrof=c(4,1))
      hist( pic$r, breaks = 256, col="red")
      hist( pic$g, breaks = 256, col="green")
      hist( pic$b, breaks = 256, col="blue")
      hist( pic$bw, breaks = 256)

How would that be possible with rimage?


read.gif in caTools is giving back a matrix, and hence it's a fine function.
caTools btw. offers a lot of very interesting functions. :-)

readPNG of png package is agood hint,
I didn't knew that.
Ah the it's a new feature, which is not offered in the packages I can install
with install.packages and the default settings for this.

I had to use as.zoo() around my data to use rollapply from zoo-package.
Aha.
OK, thanks.

What about the documentation.
if I look for it on r-cran, but the module is form r-forge there will
be a mismatch.
Yes, with that version it works. :-)


Ciao,
   Oliver