[R] alignment algorithm or pattern frequency calculation

Weiwei Shi helprhelp at gmail.com
Fri Oct 19 01:06:57 CEST 2007


The rule is search on any combinations whose size is more than 1, like
ab, ac, abc, ...

The storage can be like b2
> b2
[[1]]
[1] "a" "b" "c" "d"

[[2]]
[1] "a" "b" "c"

[[3]]
[1] "b" "c"

[[4]]
[1] "a" "b" "c" "d" "e"


On 10/18/07, Nordlund, Dan (DSHS/RDA) <NordlDJ at dshs.wa.gov> wrote:
> > -----Original Message-----
> > From: r-help-bounces at r-project.org
> > [mailto:r-help-bounces at r-project.org] On Behalf Of Weiwei Shi
> > Sent: Thursday, October 18, 2007 3:32 PM
> > To: jim holtman
> > Cc: r-help at stat.math.ethz.ch
> > Subject: Re: [R] alignment algorithm or pattern frequency calculation
> >
> > for example,
> >
> > a,b: 3 which means a and b appear together 3 times in my input list.
> >
> > On 10/18/07, jim holtman <jholtman at gmail.com> wrote:
> > > It would be helpful if you explained what the numbers mean.
> > >
> > > On 10/18/07, Weiwei Shi <helprhelp at gmail.com> wrote:
> > > > Hi,
> > > >
> > > > I am looking for an algorithm (better if it is
> > implemented in R) which
> > > > can do the following:
> > > >
> > > > from the following list:
> > > > a,b,c,d
> > > > a,b,c
> > > > b,c
> > > > a,b,c,d,e
> > > >
> > > > to calculate
> > > > a,b,c,d: 2
> > > > a,b,c: 3
> > > > a,b: 3
> > > > a,c: 3
> > > > b,c: 4
> > > > b,c,d:2
> > > >
> > > > here, the order is not important.
> > > >
> > > > Thanks.
> > > >
>
> I guess I have more questions than answers.
> 1. What are the rules for deciding on which patterns to search for? You don't list c,d or c,d,e, or single character patterns.
> 2. Are these patterns stored in comma separated strings or as character vectors or...?
>
> Dan
>
> Daniel J. Nordlund
> Research and Data Analysis
> Washington State Department of Social and Health Services
> Olympia, WA  98504-5204
>
>
>
>


-- 
Weiwei Shi, Ph.D
Research Scientist
GeneGO, Inc.

"Did you always know?"
"No, I did not. But I believed..."
---Matrix III



More information about the R-help mailing list