Re: [R] strsplit on comma, with a trailing comma in input

From: dankelley <Dan.Kelley_at_dal.ca>
Date: Mon, 3 Dec 2007 16:19:57 -0800 (PST)

This works perfectly. Thanks!

Peter Dalgaard wrote:
>

>>   

> Hmm, I don't think strsplit can do that. However:
>
> > scan(textConnection("a,,b,"), sep=",", what="")
> Read 4 items
> [1] "a" "" "b" ""
>
> --
> O__ ---- Peter Dalgaard Ă˜ster Farimagsgade 5, Entr.B
> c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
> (*) \(*) -- University of Copenhagen Denmark Ph: (+45)
> 35327918
> ~~~~~~~~~~ - (p.dalgaard_at_biostat.ku.dk) FAX: (+45)
> 35327907
>
> ______________________________________________
> R-help_at_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.
>
>
-- 
View this message in context: http://www.nabble.com/strsplit-on-comma%2C-with-a-trailing-comma-in-input-tf4940023.html#a14142103
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help_at_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.
Received on Tue 04 Dec 2007 - 00:25:36 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 04 Dec 2007 - 00:30:17 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.