Dear Ruser,

Thank for your help.
I've just tried the command below and it works
Alldados[is.na(Alldados)]<-"NULL"

But I am facing other problem, since I need to format my data before feeding
my database.
 I am using the command below:

with(Alldados,sprintf("INSERT INTO OBS
(date,T_2M,TMAX_2M,TMIN_2M,TD_2M,PS,FF_10M,DD_10M,TOT_PRCP,CLCL,Station_NO)
VALUES (%s, %5.2f, %5.2f, %5.2f,%5.2f,%5.2f,%5.2f,%5.2f,%5.2f,%5.2f,%s)",

date2,T_2M,TMAX_2M,TMIN_2M,TD_2M,PS,FF_10M,DD_10M,TOT_PRCP,CLCL,Station_NO))

But it is not working anymore. Because now the same field can be numeric or
character.
How can I use the format command above the allow it.

I really appreciate any help.
Nilza





On Mon, May 9, 2011 at 12:55 PM, David Winsemius <dwinsemius@comcast.net>wrote:

>
> On May 9, 2011, at 10:07 AM, Nilza BARROS wrote:
>
> Dear R users,
>>
>> I am reading data from a file where there are some missing that are
>> represented by -9999.00.
>> I am using the command below.
>> =====My original data ===========
>>
>> PARM = TMPC;T12X;T12N;DWPC;PALT;SKNT;DRCT;P24M;CLCL
>>
>
> snipped
>
>
> But  I need to feed my database. These missings should be represented by
>> NULL.
>> I mean, all "NA" should be replaced by "NULL" in my database.
>>
>
> Do you mean a string that is spelled "NULL"
>
> If so, try:
>
> dfrm[is.na(dfrm)] <- "NULL"
>
>
> I am trying the command below to pick up the rows and columns with NA but I
>> don't know how to fill the original data :
>>
>> which(is.na(Alldados),arr.ind=TRUE)
>>
>> But I don't know how to replace each NA with NULL. I tried using as.null
>> but
>> NA is not replace at all.
>>
>
> If you set a column of a data.frame to NULL , it will erase it.
>
>
>
>> I hope someone could help me.
>>
>> Best Wishes,
>> Nilza Barros
>>
>>
> David Winsemius, MD
> West Hartford, CT
>
>


-- 
Abraço,
Nilza Barros

	[[alternative HTML version deleted]]

