[Rd] strsplit ignores empty fields (PR#8271)

From: <beissbarth_at_wehi.edu.au>
Date: Tue 01 Nov 2005 - 17:36:04 GMT


Full_Name: Tim Beissbarth
Version: 2.2.0
OS: Windows
Submission from: (NULL) (193.174.58.254)

strsplit ignores empty strings at the end.

> strsplit(paste(c("", "a", ""), collapse="#"), split="#", fixed=TRUE)
[[1]]
[1] "" "a"

This should really give:
[1] "" "a" ""

Some might say this is a feature, but strsplit should be the reverse of paste, I think.



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed Nov 02 04:41:08 2005

This archive was generated by hypermail 2.1.8 : Mon 20 Feb 2006 - 03:21:33 GMT