Re: [R] Nested functions.

2007-08-30 Thread Paul Hiemstra
nalluri pratap schreef: Hi All, I have two variables X, Y. The question is if the value of X is equal to one, then the values in Y have to be reversed other wise it should not perfom any action. I think this should be done using lapply function? Example Y values : 1 2

[R] Nested functions.

2007-08-28 Thread nalluri pratap
Hi All, I have two variables X, Y. The question is if the value of X is equal to one, then the values in Y have to be reversed other wise it should not perfom any action. I think this should be done using lapply function? Example Y values : 1 2 3 NA X Y (ORIGINAL) Y

Re: [R] Nested functions

2006-07-18 Thread John Wiedenhoeft
Am Montag, den 17.07.2006, 19:42 -0400 schrieb jim holtman: You were down at least 5300 levels in subroutine calls. Here is the first couple of lines from 'traceback()': 5363: vavb(a, b, n, v, x) ... 5316: vavb(a, b, n, v, x) The other thing is that there is no 'x' defined in the

Re: [R] Nested functions

2006-07-18 Thread John Wiedenhoeft
I was checking out your function and thinking of trying to make it more efficient when I noticed your comment above. :-D Yes, bioinformatics is full of this stuff - have a look at Bioconductor. I'm about it, but it'll take some time. It's a vast repository... For the meantime, I've

Re: [R] Nested functions

2006-07-18 Thread Richard M. Heiberger
Please look at http://www.turbulence.org/Works/song/ This is a website by Martin Wattenberg that visually displays the types of patterns you are looking for. He gave a paper at the Joint Statistics Meetings in Minneapolis 2005. __

Re: [R] Nested functions

2006-07-18 Thread Thomas Lumley
On Mon, 17 Jul 2006, John Wiedenhoeft wrote: Hi there, I'm having myself a hard time writing an algorithm for finding patterns within a given melody. In a vector I'd like to find ALL sequences that occur at least twice, without having to check all possible patterns via pattern matching.

Re: [R] Nested functions

2006-07-18 Thread John Wiedenhoeft
Am Dienstag, den 18.07.2006, 22:09 -0400 schrieb Jim Lemon: Hi John, Minor bug - I zeroed the hit counter in the wrong place. find.replay-function(tunestring,maxlen) { return(matchlist) } Dear Jim, many, many thanks for your effords :-D!!! Your program is great and very elegant

[R] Nested functions

2006-07-17 Thread John Wiedenhoeft
Hi there, I'm having myself a hard time writing an algorithm for finding patterns within a given melody. In a vector I'd like to find ALL sequences that occur at least twice, without having to check all possible patterns via pattern matching. I finally found a solution in a style that I'm used

Re: [R] Nested functions

2006-07-17 Thread John Wiedenhoeft
Thanks for your response! Am Montag, den 17.07.2006, 17:36 -0400 schrieb jim holtman: It would help if you could provide the calling script and the data that you are using. The code I sent is included in .Rprofile. One of my data vectors would be v = c(1, 1, 1, 5, 6, 1, 1, 1, 1, 6, 1, 1, 6,