Re: Integer Length Count

• To: mathgroup at smc.vnet.net
• Subject: [mg128768] Re: Integer Length Count
• From: Ray Koopman <koopman at sfu.ca>
• Date: Sat, 24 Nov 2012 02:28:06 -0500 (EST)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• Delivered-to: l-mathgroup@wolfram.com
• Delivered-to: mathgroup-newout@smc.vnet.net
• Delivered-to: mathgroup-newsend@smc.vnet.net
• References: <k8nc79\$dh1\$1@smc.vnet.net>

```On Nov 23, 12:32 am, sylvieho... at comcast.net wrote:
> I use a function in SAS that takes, in my case, a billion different integers of varying length and counts the frequency of the length of each integer by converting the digits in the integers into alpha characters and counting the frequency of the right most position of the alpha character.
>
> I am trying to do more and more routine programming in Mathematica and after poking around in documentation for the past 4 hours have yet to find the parallel function in Mathematica for counting the integer frequency length in a big data set. My family wants me to drop everything and put the Turkey in the oven. My cat Sylvester even fell asleep on his back in front of the refrigerator with his little legs up in the air, so he want miss the transfer of the Turkey from the stove to the refrigerator. OH WELL -- IT'S SHOW TIME!
>
> Meanwhile, let me know any recommendations you have on a Mathematica function that parallels the SAS Function.
>
> Sylvia Hobbs

data = RandomInteger[9999, 100]

{6169, 9014,  239, 4874, 1339, 2885, 2828, 5885, 5372, 2491, 6211,
2833,  257, 5671, 3473, 5014, 2437, 1261, 9269, 9883,  587, 7745,
4909, 9986, 9510, 5161, 5278, 4182, 3251, 6873, 7248, 8240, 5027,
4364, 2660, 4769, 7637, 6913, 9587, 4991, 8116, 4252, 2981, 3840,
7352, 1616, 8446, 7901, 8812, 7688, 9850, 3611, 3359,  392, 8364,
180, 6287, 7749, 2951, 7420, 4604, 5137, 7893, 5008, 8839, 9027,
5122, 8253,  232, 6432, 2753, 4974, 9565, 4648, 1439, 9703, 1823,
2903, 8958, 5337, 5929, 9587, 4154, 4020, 1722,  377,  993, 1153,
3779, 3619, 2619, 1377, 2909, 8666, 4808, 2444,  125, 2867, 7919,
1029}

Sort @ Tally @ IntegerLength @ data

{{3, 9}, {4, 91}}

```

• Prev by Date: Re: Integer Length Count
• Next by Date: Re: Model fitting
• Previous by thread: Re: Integer Length Count
• Next by thread: Re: Integer Length Count