Hi,
You could try:
strsplit(c("a,b;c","d;e,f"),",|;")
#[[1]]
#[1] "a" "b" "c"
#
#[[2]]
#[1] "d" "e" "f"
A.K.
- Original Message -
From: Sam Steingold
To: r-help@r-project.org
Cc:
Sent: Wednes
er a|b|c|d|e. It's also more compact and easier to
read.
H.
#[[1]]
#[1] "a" "b" "c"
#
#[[2]]
#[1] "d" "e" "f"
A.K.
- Original Message -
From: Sam Steingold
To: r-help@r-project.org
Cc:
Sent: Wednesday, September 18, 2
On Sep 18, 2013, at 10:42 AM, Sam Steingold wrote:
> Hi,
> I find this behavior unexpected:
> --8<---cut here---start->8---
>> strsplit(c("a,b;c","d;e,f"),c(",",";"))
> [[1]]
> [1] "a" "b;c"
>
> [[2]]
> [1] "d" "e,f"
> --8<---cut here--
Hi,
I find this behavior unexpected:
--8<---cut here---start->8---
> strsplit(c("a,b;c","d;e,f"),c(",",";"))
[[1]]
[1] "a" "b;c"
[[2]]
[1] "d" "e,f"
--8<---cut here---end--->8---
I thought that it should be identical to th
4 matches
Mail list logo