NaN in R Explained (Example Code) | is.nan(), Count, Replace & Remove | Difference Between NaN & NA

preview_player
Показать описание
R code of this video:

5 / 2 # Basic computation in R

0 / 0 # Invalid computation returns NaN

x <- c(5, 9, NaN, 3, 8, NA, NaN) # Create example vector in R

x_remove # Print reduced vector to RStudio

x_replace <- x # Replicate example vector
x_replace # Print vector with replacement

Follow me on Social Media:

Рекомендации по теме
Комментарии
Автор

when i use n.omit R eliminate the whole dataset

alessandrorosati
Автор

❤Plz. advise; What to do if NaN appear in Output Result of a function even after Transforming dataset by log(df[, 1:56]+1) would it be correct if +2 is used instead of +1 & if it is left as it is then, How to interpret the Results❓

Hassan_MM.
Автор

Thank you for making these! You're a great teacher.

TheChrisSoria
Автор

can NAN be replace by mean of that row

amritpalsingh