Hi Ryszard,

Try

strsplit("a.b", "[.]")[[1]]

and see "Extended Regular Expressions" in ?regexp.

HTH,
Jorge,-


On Thu, Jan 12, 2012 at 10:15 AM, Czerminski, Ryszard <> wrote:

> Any ideas what is wrong?
>
> > strsplit("a.b", ".") # generates empty strings with split="."
> [[1]]
> [1] "" "" ""
>
> > strsplit("a b", " ") # seems to work fine with split=" ", and other
> characters...
> [[1]]
> [1] "a" "b"
> >
>
> > R.Version()
> $platform
> [1] "x86_64-unknown-linux-gnu"
> $arch
> [1] "x86_64"
> $os
> [1] "linux-gnu"
> $system
> [1] "x86_64, linux-gnu"
> $status
> [1] ""
> $major
> [1] "2"
> $minor
> [1] "14.1"
> $year
> [1] "2011"
> $month
> [1] "12"
> $day
> [1] "22"
> $`svn rev`
> [1] "57956"
> $language
> [1] "R"
> $version.string
> [1] "R version 2.14.1 (2011-12-22)"
>
> Best regards,
> Ryszard
>
>
>
> Ryszard Czerminski
> AstraZeneca Pharmaceuticals LP
> 35 Gatehouse Drive
> Waltham, MA 02451
> USA
> 781-839-4304
> ryszard.czermin...@astrazeneca.com
>
>
> --------------------------------------------------------------------------
> Confidentiality Notice: This message is private and may ...{{dropped:11}}
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to