Hi,
I'm using gregexpr(). As a result something like this:
# starting positions of the match:
[[1]]
[1] 7 18
# length of the matched text:
attr(,match.length)
[1] 4 4
Now, I'd like to have a matrix,
74
18 4
but I don't know how to handle the attr(,match.length) ...?
The format of
Now I found a solution that seems to work OK for me:
attributes(gregexpr(expression, text)[[1]])
Petri
At 15:00 11.1.2006 +0100, Petri Palmu wrote:
Hi,
I'm using gregexpr(). As a result something like this:
# starting positions of the match:
[[1]]
[1] 7 18
# length of the matched text:
Petri Palmu petri.palmu at geneos.fi writes:
I'm using gregexpr(). As a result something like this:
# starting positions of the match:
[[1]]
[1] 7 18
# length of the matched text:
attr(,match.length)
[1] 4 4
Now, I'd like to have a matrix,
74
18 4
something like
x1
Hi Petri,
On 11 Jan 2006, [EMAIL PROTECTED] wrote:
I'm using gregexpr(). As a result something like this:
# starting positions of the match:
[[1]]
[1] 7 18
# length of the matched text:
attr(,match.length)
[1] 4 4
Now, I'd like to have a matrix,
74
18 4
but I don't know how