search for: some_third_party_funct

Displaying 1 result from an estimated 1 matches for "some_third_party_funct".

2009 Dec 11
2
Why a list of NULL's are reduced to NULL?
The following examples are confusing to me. It is OK, to assigned NULL to one element in a list. The result is still a list. However, a list of NULL's are reduced to NULL. I don't understand how this conversion occurs. Could somebody let me know what is going on? > X=matrix(1:8, nr=4) > apply(X,1, function(x) {if(x[[1]]==3){NULL}else{x[[1]]}}) [[1]] [1] 1 [[2]] [1] 2 [[3]] NULL