[R] Decile

From: J. Arturo Coral Alamo <arturo.coral_at_gmail.com>
Date: Wed, 16 Jun 2010 18:10:14 -0500


Hello comunity,

I'm trying to find a similar function as decile of SPSS, NTILES (10)  some of you know about that, I will appreciate your help in advance.

In SPSS
VARIABLES=Sales (A) /NTILES (10) /PRINT=NO

for example if I have Next data input:

case IdCust Sales Profit 1 265 140.81 314.31 2 266 1778.96 408.32 3 267 2663.66 820.85 4 268 2994.14 913.73 5 269 2185.58 686.64 6 271 105.21 18.94

Output must be:

case IdCust Sales Profit Ntil-Sales Ntil-Profi 1 265 140.81 314.31 2 2 2 266 1778.96 408.32 4 4 3 267 2663.66 820.85 8 8 4 268 2994.14 913.73 10 10 5 269 2185.58 686.64 6 6 6 271 105.21 18.94 1 1

Best regards,



Arturo Coral Alamo
Business Researcher Team
SOLUCION ESTRATEGICA Inc.
Genera competitividad en tu empresa
Móvil: (+511) 988 567 000

Fijo: (+511) 528 50 44
www.seincperu.com

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 16 Jun 2010 - 23:12:58 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 17 Jun 2010 - 00:30:31 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive