Message-ID: <20030614131007.GA26789@mail2.sas.upenn.edu>
Date: 2003-06-14T13:10:07Z
From: Jonathan Baron
Subject: Normalizing data
In-Reply-To: <B6E43BA0-9E67-11D7-B0BC-0005026E2B43@vanderkogel.net>
On 06/14/03 14:57, Jonck van der Kogel wrote:
>Hello dear R-list members,
>I have a question about normalizing data. The goal is to normalize the
>dataset per column, so all the data in each column is scaled to the
>interval (0,1), will have a mean of 0 and a standard deviation of 1.
In psychology, we usually call this standardizing. "Normalizing"
is subtracting the mean but NOT dividing by the s.d.
>I know the way to do this is to take each datapoint, subtract the mean
>of the column it is located in and divide this by the standard
>deviation of the column. Now my question is: is there a function in R
>that does this, and if so, which function?
scale()
It will standardize (default) or normalize. And the default is to
it by column, as you describe.
--
Jonathan Baron, Professor of Psychology, University of Pennsylvania
R page: http://finzi.psych.upenn.edu/