How to get the number of non-NA values in the R programming language. More details: https://statisticsglobe.com/count-non...
R code of this video:
vec <- c(1, NA, 2, NA, NA, 1, 2, 1, NA) # Create example vector
vec # Print example vector
sum(!is.na(vec)) # Get number of non-NA values
data <- data.frame(x1 = c(5, NA, 7, NA, NA, 3), # Create example data frame
x2 = c("a", "b", NA, NA, "a", "c"))
colSums(!is.na(data)) # Get number of non-NA values in columns
rowSums(!is.na(data)) # Get number of non-NA values in rows
Follow me on Social Media:
Facebook – Statistics Globe Page: / statisticsglobecom
Facebook – R Programming Group for Discussions & Questions: / statisticsglobe
Facebook – Python Programming Group for Discussions & Questions: / statisticsglobepython
LinkedIn – Statistics Globe Page: / statisticsglobe
LinkedIn – R Programming Group for Discussions & Questions: / 12555223
LinkedIn – Python Programming Group for Discussions & Questions: / 12673534
Twitter: / joachimschork
Music by bensound.com
En esta página del sitio puede ver el video en línea Count Non-NA Values in R (2 Examples) | Vector & Data Frame Columns / Rows | sum & is.na Functions de Duración hora minuto segunda en buena calidad , que subió el usuario Statistics Globe 24 enero 2023, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 1,033 veces y le gustó 14 a los espectadores. Disfruta viendo!