I have a time series in R Studio. Now I want to calculate the log() of this series. I tried the following:
i <- (x-y) ii <- log(i)
But
As I said in my comment, to know which observation generated the NaN, you can use function which:
NaN
which
i <- c(9,8,4,5,7,1,6,-1,8,4) which(is.nan(log(i))) # 8