Re: [R] Pack and Unpack Strings in R

2009-01-09 Thread jim holtman
see: http://www.nabble.com/Compressing-String-in-R-td21160453.html On Fri, Jan 9, 2009 at 10:50 AM, Gundala Viswanath wrote: > Dear all, > > Does R has any function/package that can pack > and unpack string into bit size? > > The reason I want to do this in R is that R > has much more native sta

Re: [R] Pack and Unpack Strings in R

2009-01-09 Thread Martin Morgan
Gundala -- Gundala Viswanath wrote: Dear all, Does R has any function/package that can pack and unpack string into bit size? All of your questions relate to DNA strings. The R/Bioconductor package Biostrings is designed to manipulate such objects. It does not necessarily address this partic

Re: [R] Pack and Unpack Strings in R

2009-01-09 Thread Henrique Dallazuanna
Try this: ## 1 map <- list(A = '00', C = '01', G = '10', T = '11') myStr <- 'GATTA' paste(map[unlist(strsplit(myStr, NULL))], collapse = "") ## 2 cod <- "100000" library(gsubfn) strapply(cod, '[0-9]{2}') names(map)[match(unlist(strapply(cod, '[0-9]{2}')), map)] On Fri, Jan 9, 2009 at 1:50 P

[R] Pack and Unpack Strings in R

2009-01-09 Thread Gundala Viswanath
Dear all, Does R has any function/package that can pack and unpack string into bit size? The reason I want to do this in R is that R has much more native statistical function than Perl. Yet the data I need to process is so large that it required me to compress it into smaller unit -> process it