if your matrix is stored in a text file then
xx <- read.table("x", na.strings="NULL")
where "x" is the name of the text file.
On Thu, 17 Apr 2008, Tim Smith wrote:
> Hi,
>
> I had a matrix with NULL values, which I wanted to replace with NA. Is there
> an efficient way to do this?
>
> Small sam
On Thu, 17 Apr 2008, Uwe Ligges wrote:
> Tim Smith wrote:
>> Hi,
>>
>> I had a matrix with NULL values, which I wanted to replace with NA. Is there
>> an efficient way to do this?
>>
>> Small sample input matrix:
>> A B C D E
>> 1 5222.18 6355.10 4392.68 2607.41 45
Tim Smith wrote:
> Hi,
>
> I had a matrix with NULL values, which I wanted to replace with NA. Is there
> an efficient way to do this?
>
> Small sample input matrix:
> A B C D E
> 1 5222.18 6355.10 4392.68 2607.41 4524.09
> 2NULL 257.33NULL 161.51 119.
Tim Smith wrote:
> Hi,
>
> I had a matrix with NULL values, which I wanted to replace with NA. Is there
> an efficient way to do this?
>
> Small sample input matrix:
> A B C D E
> 1 5222.18 6355.10 4392.68 2607.41 4524.09
> 2NULL 257.33NULL 161.51 11
Hi,
I had a matrix with NULL values, which I wanted to replace with NA. Is there an
efficient way to do this?
Small sample input matrix:
A B C D E
1 5222.18 6355.10 4392.68 2607.41 4524.09
2NULL 257.33NULL 161.51 119.44
3NULL 274.80 305.28 443.2
Try this:
x[x==""] <- NA
On 01/02/2008, My Coyne <[EMAIL PROTECTED]> wrote:
> I would like to replace all null ("") in a column of a matrix to NA, how
> would I do that without a do loop?
>
> Thanks
>
> --mc
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> [[alternative HTML version deleted]]
>
> __
I would like to replace all null ("") in a column of a matrix to NA, how
would I do that without a do loop?
Thanks
--mc
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/l
7 matches
Mail list logo