I'm looking over good-code a post-doc in my lab wrote and trying to learn
how it works.  I came across the following:
rel.abundance <- as.matrix(read.delim("rel.abundance.csv",row.names=1,as.is
=TRUE))
rel.abundance <- log2(rel.abundance-min(rel.abundance)+1)

I'm not sure what the second line is doing.  I ran each line in R and
couldn't see a noticeable difference in the output.  I assume log2() takes
the log base 2 of the values?  I'm not clear what -min(rel.abundance) is
doing either...my hunch would be that it would take the smallest value in
each row?
I'd really like to figure out:
1) What's actually going on?
2) Is there a good way to run a command over a large dataset in R and better
be able to tell what is going on?  More specifically, when I run each line
in R it looks something like this (w/ dif. values per row):
Archaea|Euryarchaeota|Methanobacteria|Methanobacteriales|Methanobacteriaceae|Methanobrevibacter,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,23,0,3,0,0,0


There are a lot of cells w/ values per row, which is one reason why I think
it is difficult to detect a pattern....

Thanks in advance!

Ben

	[[alternative HTML version deleted]]

