[R] Reading csv file with missing value
Bert Gunter
bgunter.4567 at gmail.com
Fri Jun 24 23:05:28 CEST 2016
Read yesterday's and today's archives.
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Fri, Jun 24, 2016 at 1:55 PM, Steven Yen <syen04 at gmail.com> wrote:
> I read a csv file (with read.csv) containing missing values (as shown
> below). Is there a convenient way to set these NA into zeros?
> Better yet, is there an option to assign zeros to these blank cells in
> reading the csv file? Thank you!
>
> NA -1 NA NA NA 1 NA
> NA NA NA NA NA NA NA
> NA NA NA NA NA NA NA
> NA -1 NA NA NA NA NA
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
More information about the R-help
mailing list