Skip to content

Reading csv file with missing value

2 messages · Steven Yen, Bert Gunter

#
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
#
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: