On Fri, 13 Jul 2007, David Barron wrote:
Try having a look at the scale and sweep functions.
sweep applies to arrays, not data frames, and scale converts to a matrix.
For a data frame
df2 - df1
df2[] - lapply(df1, function(x) {r - range(x, na.rm=TRUE);
Try having a look at the scale and sweep functions.
David
On 13/07/07, Amir_17 [EMAIL PROTECTED] wrote:
Hi
I have dataframe which contain 5 columns and 1000 records. I want standard
each cell.
I want range each column between 0 and 1 . I think i must use loop?
could you help me?
Hi sergio,
Sergio Della Franca wrote:
Dear R-Helpers,
I want to perform a standardization of a variable with range method.
i.e.:
Standardization (range) == (var-min(var))/(max(var)-min(var))
Do you konw how can i develop this?
As you do ... but don't use var which is the name of
you can still use scale() (as you have been told), look at the help
page for more info, especially at the Arguments section, e.g.,
mat - matrix(rnorm(100*10), 100, 10)
rng - apply(mat, 2, range)
scale(mat, scale = rng[2, ] - rng[1, ])
or you could even use apply() directly, e.g.,
apply(mat,
On Tue, 2007-03-27 at 16:52 +0200, Sergio Della Franca wrote:
Dear R-Helpers,
I want to perform a stadardiazation of a variable with mehtod range.
How can i achve this results?
Thank you in advance.
Sergio Della Franca
See ?scale
HTH,
Marc Schwartz
I am not sure I understand your question, but you may want to have a
look at ?scale. It might get you started.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Sergio Della
Franca
Sent: Tuesday, March 27, 2007 10:52 AM
To: r-help@stat.math.ethz.ch
Sorry,
I try to explain better my problem.
Standardization (range) == (var-mean(var))/(max(var)-min(var))
Thank you in advance
2007/3/27, Bos, Roger [EMAIL PROTECTED]:
I am not sure I understand your question, but you may want to have a
look at ?scale. It might get you started.
On 3/27/07, Sergio Della Franca [EMAIL PROTECTED] wrote:
Dear R-Helpers,
I want to perform a stadardiazation of a variable with mehtod range.
How can i achve this results?
One way is the rescaler method in the reshape package. It can scale
to common range, mean 0 sd 1, or ranks. Compared
So, scale() is the answer. Have you looked at the help?
Giovanni
Date: Tue, 27 Mar 2007 17:37:08 +0200
From: Sergio Della Franca [EMAIL PROTECTED]
Sender: [EMAIL PROTECTED]
Cc: r-help@stat.math.ethz.ch
Precedence: list
Sorry,
I try to explain better my problem.
Standardization
Dylan == Dylan Beaudette [EMAIL PROTECTED]
on Mon, 22 May 2006 17:33:47 -0700 writes:
Dylan Greetings, Experimenting with the cluster package,
Dylan and am starting to scratch my head in regards to the
Dylan *best* way to standardize my data. Both functions can
Dylan
Philip Bermingham [EMAIL PROTECTED] writes:
SAS Enterprise Miner recommendeds to standardize using X / STDEV(X)
versus [X mean(X)] / STDEV(X)
Any thoughts on this? Pros Cons
When???
This makes absolutely no sense out of context.
--
O__ Peter Dalgaard Blegdamsvej 3
Peter Dalgaard wrote:
SAS Enterprise Miner recommendeds to standardize using X / STDEV(X)
versus [X mean(X)] / STDEV(X)
This makes absolutely no sense out of context.
To paraphrase Tanenbaum: The nice thing about standardization is that
there's so many ways to do it.
Baz
[[
Free On-line
Barry Rowlingson [EMAIL PROTECTED] writes:
The nice thing about standards is that there are so many of
them to choose from,
Curiously enough, the same quote came up today on dk.edb.system.unix
in the context of translations.
--
O__ Peter Dalgaard Blegdamsvej 3
c/
My thoughts on this is:
Do not trust what SAS say´s and least of all what the Enterprise Miner said.
Robust Statisticians recommendends to standardize using e.g.
(X - median(X)) / ( MAD(X) / 0.675 )
Best,
Matthias
SAS Enterprise Miner recommendeds to standardize using X / STDEV(X)
versus
You asked another question about clustering, so I presume you want to
standardize some variables before clustering. In SAS, PROC STDIZE
offers 18 standardization methods. See
http://support.sas.com/91doc/getDoc/statug.hlp/stdize_sect12.htm#stat_stdize_stdizesm
for details. If you're really
15 matches
Mail list logo