Re: [R] replace NULL with NA in matrix

2008-04-17 Thread Katharine Mullen
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

Re: [R] replace NULL with NA in matrix

2008-04-17 Thread Prof Brian Ripley
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

Re: [R] replace NULL with NA in matrix

2008-04-17 Thread Marc Schwartz
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.

Re: [R] replace NULL with NA in matrix

2008-04-17 Thread Uwe Ligges
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

[R] replace NULL with NA in matrix

2008-04-17 Thread Tim Smith
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

Re: [R] replace Null with NA

2008-02-01 Thread Henrique Dallazuanna
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]] > > __

[R] replace Null with NA

2008-02-01 Thread My Coyne
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