I am quite new with R and intend to generate a single plot of image histogram from multiple images.
Found that this EBImage package will generate quite simple method to generate the histogram.
I used these simple lines:
But, this loop only gather each of the histogram. I am not sure how to make it simpler and faster.
I was thinking to grab only counts and intensity number from each of the image and pool them in a multidimensional array. I just don't have a clue to do it. Maybe anyone in this forum could help me regarding this issue?
sure, but also library(tidyverse) includes this and other commonly used things, so I find it convenient. You can do as you please, glad it worked for you.
Yes, you are right. I think I still try to figure out the library in R.
Seems we have to put the environment as well when setting up new directory (new to me).
Btw, have you experience adding labels such as a straight line with different colour or colouring some part of the histogram as well? or, print the histogram data as csv?
I tried to add:
write.csv(histogram,'histogram.csv')
but didn't work, seems I have to convert it into a list first.