Displaying 2 results from an estimated 2 matches for "preprended".
Did you mean:
prepended
2016 Dec 20
3
Unexpected I(NULL) output
Hi all,
I believe there is an issue with passing NULL to the function I().
class(NULL) # "NULL" (as expected)
print(NULL) # NULL (as expected)
is.null(NULL) # TRUE (as expected)
According to the documentation I() should return a copy of its input
with class "AsIs" preprended:
class(I(NULL)) # "AsIs" (as expected)
print(I(NULL)) # list() (not expected! should be NULL)
is.null(I(NULL)) # FALSE (not expected! should be TRUE)
So, I() does not behave according to its documentation. In R, it is
not possible to give NULL attributes, but I(NULL) attempts to d...
2016 Dec 22
0
Unexpected I(NULL) output
...th passing NULL to the function I().
> class(NULL) # "NULL" (as expected)
> print(NULL) # NULL (as expected)
> is.null(NULL) # TRUE (as expected)
> According to the documentation I() should return a copy of its input
> with class "AsIs" preprended:
> class(I(NULL)) # "AsIs" (as expected)
> print(I(NULL)) # list() (not expected! should be NULL)
> is.null(I(NULL)) # FALSE (not expected! should be TRUE)
> So, I() does not behave according to its documentation.
yes.
> In R, it is
> n...