> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Wincent
> Sent: Thursday, April 29, 2010 8:40 PM
> To: r help
> Subject: [R] replace elements in a list
>
> Dear all, I have a list like this: l &l
Thanks.
On 30 April 2010 12:14, Erik Iverson wrote:
> Wincent wrote:
>>
>> 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
Wincent wrote:
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, b
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
4 matches
Mail list logo