Re: [R] performing function on data frame

2009-04-16 Thread Mike Lawrence
ale > > Hope that helps. > > Michael Conklin > > > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of Karin Lagesen > Sent: Thursday, April 16, 2009 5:29 AM > To: r-help@r-project.org > Subject: Re:

Re: [R] performing function on data frame

2009-04-16 Thread ONKELINX, Thierry
org Onderwerp: Re: [R] performing function on data frame David Hajage writes: > Hi Karin, > > I'm not sure I understand... Is this what you want ? > > d$y - mean(d$y)/sd(d$y) Yes, and also a bit no. Each column in my data frame represents one data set. For every element

Re: [R] performing function on data frame

2009-04-16 Thread Michael Conklin
[R] performing function on data frame David Hajage writes: > Hi Karin, > > I'm not sure I understand... Is this what you want ? > > d$y - mean(d$y)/sd(d$y) 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

Re: [R] performing function on data frame

2009-04-16 Thread Karin Lagesen
David Hajage writes: > Hi Karin, > > I'm not sure I understand... Is this what you want ? > > d$y - mean(d$y)/sd(d$y) 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 c

Re: [R] performing function on data frame

2009-04-15 Thread David Hajage
Hi Karin, I'm not sure I understand... Is this what you want ? d$y - mean(d$y)/sd(d$y) 2009/4/15 Karin Lagesen > > Hi! > > First, pardon me if this is a faq. I think I should be using some sort > of apply, but I am not managing to figure those out. > > I have a data frame similar to this: > >

[R] performing function on data frame

2009-04-15 Thread Karin Lagesen
Hi! First, pardon me if this is a faq. I think I should be using some sort of apply, but I am not managing to figure those out. I have a data frame similar to this: > d <- data.frame(x = LETTERS[1:5], y = rnorm(5), z = rnorm(5)) > d x y z 1 A 0.1605464 -0.2719820 2 B -0.925