| fillNAs | R Documentation |
Efficiently fills NA values by carrying forward the last non-NA value. Uses vectorized operations for better performance than loop-based approaches.
fillNAs(x)
x |
Vector with NAs to fill |
Vector with NAs filled
## Not run:
fillNAs(c(1, NA, NA, 2, NA, 3)) # Returns: c(1, 1, 1, 2, 2, 3)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.