MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Substitution in BinLists

  • To: mathgroup at smc.vnet.net
  • Subject: [mg41440] Re: Substitution in BinLists
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Tue, 20 May 2003 03:22:56 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <baa7q3$jpu$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

BinLists[a,{0,10,1}] /. {}-> {0}

may help.

Regards
  Jens

"Mark E. Berres" wrote:
> 
> Hi,
> I'm trying to substitute a zero (0) for bins that are empty when using
> BinLists:
> 
> In[192]:= <<Statistics`DataManipulation`
> In[193]:= a={1,2,3,4,10};
> In[194]:= BinLists[a,{0,10,1}]
> 
> Out[194]:= {{1},{2},{3},{4},{},{},{},{},{},{10}}
> 
> What I would like output is {1,2,3,4,0,0,0,0,0,10}.
> Flatten nearly gets me there but omits the empty bins {}: {1,2,3,4,10}.
> 
> Thanks
> -Mark


  • Prev by Date: Re: Substitution in BinLists
  • Next by Date: Re: Errors in Copying and Pasting Heads of Expressions
  • Previous by thread: Re: Substitution in BinLists
  • Next by thread: Re: Substitution in BinLists