I have a zoo object which contains some NA values within it and I am writing it to an Excel file using the write.xlsx
command from the xlsx
package. However instead of giving NA
in the Excel file where required it provides #N/A
which Excel has trouble working with. Is this normal behaviour? If so, is there anyway around this?
Here is an example
y <- zoo(c(1:40), as.Date(1:40))
y[20] <- NA
write.xlsx(y, file = "test.xlsx")
Many thanks