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
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:
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-
://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
4 matches
Mail list logo