remove or find NaN in R
x2 <- na.omit(x2)
may work for you.
Simply this
x2 = x2[!is.na(x2)];
The function subset
could be useful for using complex indicators.
subset(x2, !is.nan(x2[[1]]))
x2 <- na.omit(x2)
may work for you.
Simply this
x2 = x2[!is.na(x2)];
The function subset
could be useful for using complex indicators.
subset(x2, !is.nan(x2[[1]]))