As I said in my comment, to know which observation generated the NaN
, you can use function which
:
i <- c(9,8,4,5,7,1,6,-1,8,4) which(is.nan(log(i))) # 8
As I said in my comment, to know which observation generated the NaN
, you can use function which
:
i <- c(9,8,4,5,7,1,6,-1,8,4) which(is.nan(log(i))) # 8