Skip to content

reading csv file : blanks

3 messages · Nattu, Jim Lemon, Dimitri Liakhovitski

#
Nattu wrote:
Hi Nataraju,
You have to explicitly specify the strings that you want to be read as 
NA with the na.strings argument.

na.strings=""

if an empty string represents NA.

Jim
#
When you read in a .csv file with some empty cells using read.csv,
there is no need to specify anything - empty cells will be recorded as
NAs automatically:

try:

data1<-read.csv("oa_2006.csv")

Dimitri
On Wed, Apr 29, 2009 at 7:54 AM, Jim Lemon <jim at bitwrit.com.au> wrote: