Re: [R] how to implement a circular buffer with R

2009-05-25 Thread Wacek Kusnierczyk
milton ruser wrote: Hi Maura, It is not elegant but may work. actual.string- 12345abcdefgh12345abcdefgh actual.string actual.string-paste(substr(actual.string, nchar(actual.string),nchar(actual.string)), substr(actual.string, 1,nchar(actual.string)-1), sep=) actual.string #in a

[R] how to implement a circular buffer with R

2009-05-24 Thread mauede
Some wavelet analysis experts have implemented periodic boundary conditions for signals. I need to implement a circular buffer. Something like: 12345abcdefgh12345abcdefgh so that at each step the riightmost element is moved to the leftmost index and everything else is properly shifted:

Re: [R] how to implement a circular buffer with R

2009-05-24 Thread milton ruser
Hi Maura, It is not elegant but may work. actual.string- 12345abcdefgh12345abcdefgh actual.string actual.string-paste(substr(actual.string, nchar(actual.string),nchar(actual.string)), substr(actual.string, 1,nchar(actual.string)-1), sep=) actual.string #in a looping actual.string-

Re: [R] how to implement a circular buffer with R

2009-05-24 Thread Adrian Dusa
://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- View this message in context: http://www.nabble.com/how-to-implement-a-circular-buffer-with-R-tp23695934p23696838.html Sent from the R help mailing list archive at Nabble.com