Skip to content
Prev 177237 / 398503 Next

performing function on data frame

David Hajage <dhajage.r at gmail.com> writes:
Yes, and also a bit no.

Each column in my data frame represents one data set. For every
element in this data set I want to know the z value for that
element. I.e: I want to create a new data frame from the old data
frame, where each element in the new data frame is

newDF[i,j] = oldDF[i,j] - mean(d[,j]) / sddev(d[,j])

I could, I think, iterate like this over the data frame, but I keep
thinking that one of the apply functions should be employed...

Karin
Message-ID: <ypx6bpqwzycd.fsf@alanine.uio.no>
In-Reply-To: <979ffa270904150738l51077907p4ecbc8a61d64a142@mail.gmail.com> (David Hajage's message of "Wed\, 15 Apr 2009 16\:38\:45 +0200")