Seth Falcon wrote:
> Uwe Ligges <[EMAIL PROTECTED]> writes:
>
>>>Point taken, but is the behavior of as.character correct?
>>>as.character(list(NULL))
>>>as.character(NULL)
>>
>>
>>I thought about it quite a while. I think the current bahaviour is
>>quite OK. What should as.character do in the fo
Uwe Ligges <[EMAIL PROTECTED]> writes:
>> Point taken, but is the behavior of as.character correct?
>> as.character(list(NULL))
>> as.character(NULL)
>
>
> I thought about it quite a while. I think the current bahaviour is
> quite OK. What should as.character do in the follwing case:
>as.charac
Seth Falcon wrote:
> Uwe Ligges <[EMAIL PROTECTED]> writes:
>
>>These are all dangerous, hence use the "safe" ways:
>>
>>sapply(a, is.null)
>>sapply(a, identical, "NULL")
>>sapply(a, is.na)
>>sapply(a, identical, "NA")
>
>
> Point taken, but is the behavior of as.character correct?
>
> as.char
Uwe Ligges wrote:
> Seth Falcon wrote:
>
>
>>Uwe Ligges <[EMAIL PROTECTED]> writes:
>>
>>
>>
>>>Charles Dupont wrote:
>>>
>>>
>>>
I was messing around with R and I found an example R behaving oddly:
a <- alist(NULL, "bob", c(3,6,2,3))
a
a == 'NULL'
a == "NULL"
a == 'c
Uwe Ligges <[EMAIL PROTECTED]> writes:
> These are all dangerous, hence use the "safe" ways:
>
> sapply(a, is.null)
> sapply(a, identical, "NULL")
> sapply(a, is.na)
> sapply(a, identical, "NA")
Point taken, but is the behavior of as.character correct?
as.character(list(NULL))
as.character(NULL)
Seth Falcon wrote:
> Uwe Ligges <[EMAIL PROTECTED]> writes:
>
>
>>Charles Dupont wrote:
>>
>>
>>>I was messing around with R and I found an example R behaving oddly:
>>>
>>>a <- alist(NULL, "bob", c(3,6,2,3))
>>>a
>>>a == 'NULL'
>>>a == "NULL"
>>>a == 'cat'
>>>
>>
>>
>>Always use is.null() to te
apucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web: http://www.med.kuleuven.be/biostat/
http://www.student.kuleuven.be/~m0390867/dimitris.htm
- Original Message -
From: "Seth Falcon" <[EMAIL PROTECTED]>
To:
Sent: Tuesday, March 07,
Uwe Ligges <[EMAIL PROTECTED]> writes:
> Charles Dupont wrote:
>
>> I was messing around with R and I found an example R behaving oddly:
>>
>> a <- alist(NULL, "bob", c(3,6,2,3))
>> a
>> a == 'NULL'
>> a == "NULL"
>> a == 'cat'
>>
>
>
> Always use is.null() to test on NULL, as in:
What should I
Charles Dupont wrote:
> I was messing around with R and I found an example R behaving oddly:
>
> a <- alist(NULL, "bob", c(3,6,2,3))
> a
> a == 'NULL'
> a == "NULL"
> a == 'cat'
>
Always use is.null() to test on NULL, as in:
sapply(a, is.null)
Uwe Ligges
> If I create a list with a NUL
I was messing around with R and I found an example R behaving oddly:
a <- alist(NULL, "bob", c(3,6,2,3))
a
a == 'NULL'
a == "NULL"
a == 'cat'
If I create a list with a NULL value
>a <- alist(NULL, "bob", c(3,6,2,3))
>a
[[1]]
NULL
[[2]]
[1] "bob"
[[3]]
c(3, 6, 2, 3)
and run some tests on '
10 matches
Mail list logo