[R] NA problem

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Tue Sep 21 11:28:17 CEST 2010


Short answer: don't do that.

The format function is for preparing data for output. Do your data manipulations on a data frame you keep for such use, and only use format to prepare for output.

"n.vialma at libero.it" <n.vialma at libero.it> wrote:

>Dear R list
>I have a problem with NA, which should be a string, but R seems that it 
>doesn't recognize it.  What I do is first give the format command to my data 
>frame:
>
>format.data.frame(mydata,big.mark=" ")
>
>so I give a blank as thousand separator. All my records in my data frame 
>become strings, so instead of having NA I have "NA". I try to convert "NA" in 
>".",but it seems that R doesn't recognize "NA".
>
>Someone knows why and how to treats those "NA"??
>
>
>Thanks for your attention
>
>______________________________________________
>R-help at r-project.org mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.



More information about the R-help mailing list