You might consider using the 'bit' library and use two bits per base.  You
could then wrap this in an object with appropriate functions (bit.`[`,
etc.).

           -s

On Wed, Dec 24, 2008 at 10:26 AM, Gundala Viswanath <gundalav@gmail.com>wrote:

> Dear all,
>
> What's the R way to compress the string into smaller 2~3 char/digit length.
> In particular I want to compress string of length >=30 characters,
> e.g. ACGATACGGCGACCACCGAGATCTACACTCTTCC
>
> The reason I want to do that is because, there are billions
> of such string I want to print out. And I need to save disk space.
>
> - Gundala Viswanath
> Jakarta - Indonesia
>
> ______________________________________________
> R-help@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.
>

	[[alternative HTML version deleted]]

