On 2011-03-11 01:07, Ivan Calandra wrote:
Hi,
From ?"$", you can see that using [[ instead would do what you're
looking for. You should read and try to understand the whole help file.
The reason is that for [[ the default is exact=TRUE, wheareas for $ the
only possible value is exact=FALSE, wh
On Mar 11, 2011, at 09:55 , Håvard Rue wrote:
>
> since NULL elements are removed from the list, and that A$a auto-expand
> to A$aa, my error appeared.
>
> To me, this seems not a feature I want in order to have a robust
> program.
>
Partial matching of arguments and list item names is
Hi,
From ?"$", you can see that using [[ instead would do what you're
looking for. You should read and try to understand the whole help file.
The reason is that for [[ the default is exact=TRUE, wheareas for $ the
only possible value is exact=FALSE, which means partial matching if
possible.
I had an obscure bug that boiled down to this ``feature'' in R,
Read 3921 items
> A = list(aa = 1)
> A
$aa
[1] 1
> if (A$a) print("a is there")
[1] "a is there"
The test appear to check is A$a is TRUE, but what happen is that it
auto-complete (silently), and expand to 'A$aa'.
The problem was
4 matches
Mail list logo