Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2007

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

Search the Archive

Re: remove whitespace

  • To: mathgroup at smc.vnet.net
  • Subject: [mg82588] Re: [mg82554] remove whitespace
  • From: "Thomas Dowling" <thomasgdowling at gmail.com>
  • Date: Fri, 26 Oct 2007 05:08:01 -0400 (EDT)
  • References: <200710240832.EAA05719@smc.vnet.net>

Hello,

Something like this?

aalist = "mkwvtfisll llfssaysrg vfrrdthkse iahrfkdlge ehfkglvlia \
fsqylqqcpf
 dehvklvnel tefaktcvad eshagceksl htlfgdelck vaslretygd madccekqep
 ernecflshk ddspdlpklk pdpntlcdef kadekkfwgk ylyeiarrhp yfyapellyy
 ankyngvfqe ccqaedkgac llpkietmre kvlassarqr lrcasiqkfg eralkawsva
 rlsqkfpkae fvevtklvtd ltkvhkecch gdllecaddr adlakyicdn qdtissklke
 ccdkplleks hciaevekda ipenlpplta dfaedkdvck nyqeakdafl gsflyeysrr
 hpeyavsvll rlakeyeatl eeccakddph acystvfdkl khlvdepqnl ikqncdqfek
 lgeygfqnal ivrytrkvpq vstptlvevs rslgkvgtrc ctkpesermp ctedylslil
 nrlcvlhekt pvsekvtkcc teslvnrrpc fsaltpdety vpkafdeklf tfhadictlp
 dtekqikkqt alvellkhkp kateeqlktv menfvafvdk ccaaddkeac favegpklvv
 stqtala
 "


aalist2 = StringReplace[aalist  , {" " -> "", "\n" -> ""}];

The following are now useful:

Sort[Tally[Characters[aalist2]]]

and

Count[Characters[aalist2], "a"]

(BSA is the protein, if anyone is interested)

Tom Dowling


On 10/24/07, vickyisai at gmail.com <vickyisai at gmail.com> wrote:
>
> hi all
>
> I have a txt file and i want to remove all whitespaces in that file .
> I am trying to get a list of all characters in that file ..and it
> takes whitespace too,which i wnat to eleminate.
>
> I used ReadList which works as I want, but it takes all
> whitespaces,....
> How can i overcome this problem.
>
> I use Mathematica 5.2
>
> Thanks
>
>
>



  • Prev by Date: Re: mathematica 6.0 for linux crashes when manipulating plots of
  • Next by Date: Re: Selecting Rows Where All Columns Satisfy a Condition
  • Previous by thread: remove whitespace
  • Next by thread: Re: remove whitespace