Hi all,

I am using reshape2 to reformat a data frame and all is great using:

Bats.melt <- melt(data = Bats)

Bats.cast <- dcast(data = Bats.melt, formula = Species ~ Location)

dput(Bats.cast,'C:/=Bat data working/Nica_new/Bats_niche.robj')

write.csv(Bat.cast,'C:/=Bat data working/Nica_new/test_Niche.csv')


The resulting file from both dput and write are great, however in order 
to run another R analysis I need to replace all the NA values in the 
output with a zero - 0 value.

I have just been opening this in Excel and using a simple find NA 
replace with 0 and saving then reopening in R.

There must be a simple way to do this in R.

Any suggestions welcomed.



	[[alternative HTML version deleted]]

