Message-ID: <7837.1527263662@minshall-apollo.minshall.org>
Date: 2018-05-25T15:54:22Z
From: Greg Minshall
Subject: options other than regex
In-Reply-To: Your message of "Fri, 25 May 2018 09:43:19 -0400." <d5637496-fbdf-2ca2-61af-cd7d7c14f487@gmail.com>
Evan,
are you really looking at numbers, or just at character strings (that,
in your case, happen to be numbers)? if just characters, this rather
odd combination of strsplit() and Reduce() might do the trick:
----
> x <- '10110111'
> print(x)
[1] "10110111"
> y <- Reduce(function (x,y) { paste(x, y, sep=".") }, unlist(strsplit(x, "")), init="", right=TRUE)
> print(y)
[1] "1.0.1.1.0.1.1.1."
----
cheers.