Skip to content
Prev 248618 / 398503 Next

sapply puzzlement

R works by going down the columns. If you make the rows into columns, it then does what you want. You just have to make the columns back into rows to get the original shape of your matrix.

So the code in one line is :

t(t(z) - means)

---- Original message ----
--------------------------------------
Dario Strbenac
Research Assistant
Cancer Epigenetics
Garvan Institute of Medical Research
Darlinghurst NSW 2010
Australia