findmiss | R Documentation |
This function identifies the indices of missing values (NA) in a given numeric vector. It is useful for data cleaning and preprocessing steps where identification of missing data points is required.
findmiss(x)
x |
A numeric vector potentially containing NA values. The values can range from -infinity to infinity. |
An integer vector containing the indices where NA values are found in 'x'. These indices can be used directly to reference or manipulate elements in other vectors of the same length or for subsetting the original vector.
vec <- c(1, 2, NA, 4, NA, 6)
findmiss(vec)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.