Displaying 1 result from an estimated 1 matches for "replaceinlist".
Did you mean:
replace_list
2010 Apr 30
3
replace elements in a list
Dear all, I have a list like this: l <- list(list(a=1,b=NULL), list(a=2,b=2))
I want to find out the elements with value of NULL and replace them with NA.
The actual case has a very long list, so manually find out and replace
them is not an option.
I can use for loop to do this, but I want to know if there is
vectorized way (or other ways) to do it?
Thanks
--
Wincent Rong-gui HUANG
Doctoral