Skip to content

length of empty string

5 messages · Jaensch, Steffen [TIBBE], Milan Bouchet-Valat, David Winsemius +2 more

#
Le vendredi 18 novembre 2011 ? 16:09 +0100, Jaensch, Steffen [TIBBE] a
?crit :
Probably because it contains one element, "".
a <- ""
a == ""
[1] TRUE

Seems to be enough to me. ;-)


Cheers
#
On Nov 18, 2011, at 10:09 AM, Jaensch, Steffen [TIBBE] wrote:

            
character(0) is not the same as ""
#
[1] 0
On Friday 18 November 2011 16:09:38 Jaensch, Steffen [TIBBE] wrote:
Because it's a character vector with only one element, which just happens to be empty - sort of like why the cardinality of the set { /O } is one. (/O being my best shot at the empty set symbol in plain text). 

You might be thinking of nchar(). 

Michael
On Nov 18, 2011, at 10:09 AM, "Jaensch, Steffen [TIBBE]" <SJAENSCH at its.jnj.com> wrote: